-
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 for multiple targets #2297
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 the work, looks really good :)
Just left a nitpick about adding checks on the state regarding targets.
Can you also resolve conflicts?
Good work! 👍
{ | ||
Config: testAccAWSSSMAssociationBasicConfigWithMultipleTargets(name), | ||
Check: resource.ComposeTestCheckFunc( | ||
testAccCheckAWSSSMAssociationExists("aws_ssm_association.foo"), |
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.
Can you add steps checking that the targets are well set in the state?
Wasn't able to run all the tests this time - apparently we have too many S3 buckets. |
@Ninir I think this should be good to go now 👍 |
The AWS docs say that targets may have up to 50 items now: http://docs.aws.amazon.com/systems-manager/latest/APIReference/API_Target.html |
@ziggythehamster The docs for CreateAssociation I linked above still shows a maximum of 5. I tried setting the max to 50 and ran a test with 6 associations:
|
@Ninir Is there anything else I can do to help get this merged? |
1fbf164
to
3a52453
Compare
Fixed conflicts.
|
@radeksimko Is there anything I can do to help get this merged? |
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.
Hey @tom-henderson
This is looking very good! thanks for the work & follow-up! 🚀 👍 ⭐️ 🎆
$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSSSMAssociation_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSSSMAssociation_ -timeout 120m
=== RUN TestAccAWSSSMAssociation_basic
--- PASS: TestAccAWSSSMAssociation_basic (157.78s)
=== RUN TestAccAWSSSMAssociation_withTargets
--- PASS: TestAccAWSSSMAssociation_withTargets (29.34s)
=== RUN TestAccAWSSSMAssociation_withMultipleTargets
--- PASS: TestAccAWSSSMAssociation_withMultipleTargets (30.26s)
=== RUN TestAccAWSSSMAssociation_withParameters
--- PASS: TestAccAWSSSMAssociation_withParameters (48.49s)
=== RUN TestAccAWSSSMAssociation_withDocumentVersion
--- PASS: TestAccAWSSSMAssociation_withDocumentVersion (31.05s)
=== RUN TestAccAWSSSMAssociation_withOutputLocation
--- PASS: TestAccAWSSSMAssociation_withOutputLocation (132.76s)
=== RUN TestAccAWSSSMAssociation_withScheduleExpression
--- PASS: TestAccAWSSSMAssociation_withScheduleExpression (49.32s)
PASS
ok github.com/terraform-providers/terraform-provider-aws-clone/aws 479.046s
This has been released in terraform-provider-aws version 1.7.0. 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! |
AWS SSM Association supports a maximum of 5 targets - http://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html