Skip to content
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

Merged
merged 3 commits into from
Feb 12, 2018

Conversation

atsushi-ishibashi
Copy link
Contributor

Fixed: #2536
Update MaxItems of targets. ref

TF_ACC=1 go test ./aws -v -run=TestAccAWSSSMAssociation_withTargets -timeout 120m
=== RUN   TestAccAWSSSMAssociation_withTargets
--- PASS: TestAccAWSSSMAssociation_withTargets (41.74s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	41.774s

@radeksimko radeksimko added the enhancement Requests to existing resources that expand the functionality or scope. label Jan 2, 2018
@bflad bflad added the service/ssm Issues and PRs that pertain to the ssm service. label Jan 28, 2018
@radeksimko radeksimko added bug Addresses a defect in current functionality. enhancement Requests to existing resources that expand the functionality or scope. and removed enhancement Requests to existing resources that expand the functionality or scope. bug Addresses a defect in current functionality. labels Feb 8, 2018
Copy link
Member

@radeksimko radeksimko left a 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?

@@ -75,7 +75,7 @@ func resourceAwsSsmAssociation() *schema.Resource {
Optional: true,
ForceNew: true,
Copy link
Member

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"),
Copy link
Member

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?

@radeksimko radeksimko added the waiting-response Maintainers are waiting on response from community or contributor. label Feb 8, 2018
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Feb 10, 2018
@atsushi-ishibashi
Copy link
Contributor Author

@radeksimko Ok👍

TF_ACC=1 go test ./aws -v -run=TestAccAWSSSMAssociation_withTargets -timeout 120m
=== RUN   TestAccAWSSSMAssociation_withTargets
--- PASS: TestAccAWSSSMAssociation_withTargets (116.95s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	116.984s

@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Feb 12, 2018
@radeksimko radeksimko changed the title r/ssm_association: Allow targets to update, increase maxitems of targets resource/aws_ssm_association: Allow updating targets Feb 12, 2018
Copy link
Member

@radeksimko radeksimko left a 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.

@radeksimko radeksimko merged commit 00dc965 into hashicorp:master Feb 12, 2018
@bflad bflad added this to the v1.10.0 milestone Feb 27, 2018
@bflad
Copy link
Contributor

bflad commented Feb 27, 2018

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.

@ghost
Copy link

ghost commented Apr 7, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
@breathingdust breathingdust removed the waiting-response Maintainers are waiting on response from community or contributor. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ssm Issues and PRs that pertain to the ssm service. size/L Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot change targets on aws_ssm_association
4 participants