-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Modify Aws Backup Selection Resource #8546
Modify Aws Backup Selection Resource #8546
Conversation
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.
Thanks so much, @kterada0509, looks good with two small consistency updates that will be handled on merge. 🚀
Output from AWS Standard acceptance testing:
--- PASS: TestAccAwsBackupSelection_disappears (17.90s)
--- PASS: TestAccAwsBackupSelection_basic (19.08s)
--- PASS: TestAccAwsBackupSelection_withTags (19.20s)
--- PASS: TestAccAwsBackupSelection_withResources (19.37s)
--- PASS: TestAccAwsBackupSelection_updateTag (31.67s)
func resourceAwsBackupSelectionImportState(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { | ||
idParts := strings.Split(d.Id(), "|") | ||
if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { | ||
return nil, fmt.Errorf("unexpected format of ID (%q), expected <plan-id>:<selection-id>", d.Id()) |
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.
The delimiter above is |
not :
return nil, fmt.Errorf("unexpected format of ID (%q), expected <plan-id>:<selection-id>", d.Id()) | |
return nil, fmt.Errorf("unexpected format of ID (%q), expected <plan-id>|<selection-id>", d.Id()) |
Backup selection can be imported using the role plan_id and id separated by `|`. | ||
|
||
``` | ||
$ terraform import aws_backup_selection.example plan-id/selection-id |
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.
The delimiter in the import state function is |
not :
$ terraform import aws_backup_selection.example plan-id/selection-id | |
$ terraform import aws_backup_selection.example plan-id|selection-id |
@@ -152,6 +205,31 @@ func testAccCheckAwsBackupSelectionDisappears(selection *backup.GetBackupSelecti | |||
} | |||
} | |||
|
|||
func testAccCheckAwsBackupSelectionRecreated(t *testing.T, |
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.
💯 Thanks for adding this.
This has been released in version 2.11.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Fixes #8443
Release note for CHANGELOG:
Output from acceptance testing: