-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Cloud Databases): remove bluemix-go dependency for allowlist #4222
Conversation
if hasWhitelist { | ||
ipAddresses = d.Get("whitelist").(*schema.Set) | ||
} else { | ||
ipAddresses = d.Get("allowlist").(*schema.Set) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are moving on to allowlist
should that get preference here?
ie,
if hasAllowlist {
ipAddresses = d.Get("allowlist").(*schema.Set)
} else {
ipAddresses = d.Get("whitelist").(*schema.Set)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@obai-1 Only one will be set since these attributes conflict with each other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha
if hasWhitelist { | ||
d.Set("whitelist", flex.FlattenAllowlist(allowlist.IPAddresses)) | ||
} else { | ||
d.Set("allowlist", flex.FlattenAllowlist(allowlist.IPAddresses)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if hasWhitelist { | ||
_, entries = d.GetChange("whitelist") | ||
} else if hasAllowlist { | ||
_, entries = d.GetChange("allowlist") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related Issue: #4220
This PR:
PUT /v5/ibm/deployments/{id}/allowlists/ip_addresses
endpoint for setting allowlistsCommunity Note
Relates OR Closes #0000
Output from acceptance testing: