-
Notifications
You must be signed in to change notification settings - Fork 676
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
Add ibm_cbr_zone_addresses resource #5505
Conversation
This PR requires There is a compatibility issue with that version of the SDK that is causing the current build failure. #5499 fixes that issue and, thus, that PR must be merged before this one. |
please make sure you do this manual test:
|
reviewed the PR, sent some comments directly to Matt |
Thanks, I have pushed a commit to fix an issue found during this test. |
|
||
func resourceIBMCbrZoneAddressesCreate(context context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { | ||
addressId, _ := uuid.GenerateUUID() | ||
d.SetId(composeZoneAddressesId(d.Get("zone_id").(string), "TF-"+addressId)) |
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.
We are setting ID before we actually add addresses in resourceReplaceZoneAddresses method which is in correct .
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.
Fixed in latest commit.
if err != nil { | ||
return diag.FromErr(fmt.Errorf("Error setting addresses: %s", err)) | ||
} | ||
err = resourceReplaceZoneAddresses(context, d, meta, true) |
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.
What does resourceReplaceZoneAddresses do when its destroy.
Can we just do d.SetId("") and return if we don't have Delete specific API
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.
resourceReplaceZoneAddresses
is called to remove any associated addresses from the zone before deleting the zone addresses TF resource.
Fix the conflicts in go.mod |
Community Note
Relates OR Closes #0000
Output from acceptance testing: