-
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
resource/aws_ssm_association: Allow updating targets #2807
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 for this PR too @atsushi-ishibashi
Can you also rebase & resolve the conflicts, please?
aws/resource_aws_ssm_association.go
Outdated
@@ -75,7 +75,7 @@ func resourceAwsSsmAssociation() *schema.Resource { | |||
Optional: true, | |||
ForceNew: 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.
Since we're now able to update this I think we should also remove ForceNew
from here, otherwise the new code will never be executed. 😉
@@ -40,6 +40,7 @@ func TestAccAWSSSMAssociation_withTargets(t *testing.T) { | |||
Config: testAccAWSSSMAssociationBasicConfigWithTargets(name), | |||
Check: resource.ComposeTestCheckFunc( | |||
testAccCheckAWSSSMAssociationExists("aws_ssm_association.foo"), | |||
resource.TestCheckResourceAttr("aws_ssm_association.foo", "targets.#", "2"), |
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.
Do you mind adding a test step here which will add or remove a target and check the no of targets in each step to verify that the update actually works?
ee0bba2
to
b35c233
Compare
@radeksimko Ok👍
|
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, thanks - I just fixed a typo & casing in the attached test. I hope you don't mind.
This has been released in version 1.10.0 of the 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! |
Fixed: #2536
Update MaxItems of targets. ref