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_parameter: Remove Tier from PutParameter if unsupported, fix testing for GovCloud #8664

Merged
merged 2 commits into from
May 17, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented May 16, 2019

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Closes #8662

AWS China does not yet support the API field. As noted in #8662 another option would instead be to switch to removing the attribute Default, using d.GetOk() with the PutParameter API call, and implementing DiffSuppressFunc on the attribute to prevent the difference of "Standard" to "".

Release note for CHANGELOG:

resource/aws_ssm_parameter: Remove Tier from PutParameter if unsupported (fixes AWS China support)

Output from AWS Standard acceptance testing:

--- PASS: TestAccAWSSSMParameter_disappears (11.04s)
--- PASS: TestAccAWSSSMParameter_fullPath (15.19s)
--- PASS: TestAccAWSSSMParameter_secure (15.33s)
--- PASS: TestAccAWSSSMParameter_basic (15.34s)
--- PASS: TestAccAWSSSMParameter_importBasic (19.48s)
--- PASS: TestAccAWSSSMParameter_changeNameForcesNew (26.56s)
--- PASS: TestAccAWSSSMParameter_updateTags (29.97s)
--- PASS: TestAccAWSSSMParameter_updateDescription (31.60s)
--- PASS: TestAccAWSSSMParameter_overwrite (32.77s)
--- PASS: TestAccAWSSSMParameter_secure_with_key (46.83s)
--- PASS: TestAccAWSSSMParameter_Tier (52.33s)
--- PASS: TestAccAWSSSMParameter_secure_keyUpdate (69.30s)

Output from AWS GovCloud (US) acceptance testing:

--- PASS: TestAccAWSSSMParameter_disappears (15.31s)
--- PASS: TestAccAWSSSMParameter_basic (21.15s)
--- PASS: TestAccAWSSSMParameter_secure (21.27s)
--- PASS: TestAccAWSSSMParameter_importBasic (22.57s)
--- PASS: TestAccAWSSSMParameter_fullPath (22.80s)
--- PASS: TestAccAWSSSMParameter_overwrite (35.12s)
--- PASS: TestAccAWSSSMParameter_changeNameForcesNew (38.59s)
--- PASS: TestAccAWSSSMParameter_updateDescription (39.42s)
--- PASS: TestAccAWSSSMParameter_updateTags (41.84s)
--- PASS: TestAccAWSSSMParameter_Tier (48.40s)
--- PASS: TestAccAWSSSMParameter_secure_with_key (51.69s)
--- PASS: TestAccAWSSSMParameter_secure_keyUpdate (65.74s)

bflad added 2 commits May 16, 2019 16:09
…lARN to make testing partition agnostic

Output from AWS Standard acceptance testing:

```
--- PASS: TestAccAWSSSMParameter_disappears (11.87s)
--- PASS: TestAccAWSSSMParameter_fullPath (18.76s)
--- PASS: TestAccAWSSSMParameter_secure (19.57s)
--- PASS: TestAccAWSSSMParameter_importBasic (21.88s)
--- PASS: TestAccAWSSSMParameter_basic (22.18s)
--- PASS: TestAccAWSSSMParameter_updateTags (27.94s)
--- PASS: TestAccAWSSSMParameter_changeNameForcesNew (28.67s)
--- PASS: TestAccAWSSSMParameter_overwrite (29.42s)
--- PASS: TestAccAWSSSMParameter_updateDescription (39.28s)
--- PASS: TestAccAWSSSMParameter_Tier (44.38s)
--- PASS: TestAccAWSSSMParameter_secure_with_key (47.89s)
--- PASS: TestAccAWSSSMParameter_secure_keyUpdate (71.05s)
```

Output from AWS GovCloud (US) acceptance testing:

```
--- PASS: TestAccAWSSSMParameter_disappears (15.13s)
--- PASS: TestAccAWSSSMParameter_importBasic (22.73s)
--- PASS: TestAccAWSSSMParameter_fullPath (22.85s)
--- PASS: TestAccAWSSSMParameter_secure (23.19s)
--- PASS: TestAccAWSSSMParameter_basic (23.31s)
--- PASS: TestAccAWSSSMParameter_changeNameForcesNew (35.53s)
--- PASS: TestAccAWSSSMParameter_overwrite (35.85s)
--- PASS: TestAccAWSSSMParameter_updateDescription (37.38s)
--- PASS: TestAccAWSSSMParameter_updateTags (38.71s)
--- PASS: TestAccAWSSSMParameter_Tier (49.46s)
--- PASS: TestAccAWSSSMParameter_secure_with_key (59.80s)
--- PASS: TestAccAWSSSMParameter_secure_keyUpdate (66.03s)
```
…all where unsupported and default during Read if omitted

Reference: #8662

Output from AWS Standard acceptance testing:

```
--- PASS: TestAccAWSSSMParameter_disappears (11.04s)
--- PASS: TestAccAWSSSMParameter_fullPath (15.19s)
--- PASS: TestAccAWSSSMParameter_secure (15.33s)
--- PASS: TestAccAWSSSMParameter_basic (15.34s)
--- PASS: TestAccAWSSSMParameter_importBasic (19.48s)
--- PASS: TestAccAWSSSMParameter_changeNameForcesNew (26.56s)
--- PASS: TestAccAWSSSMParameter_updateTags (29.97s)
--- PASS: TestAccAWSSSMParameter_updateDescription (31.60s)
--- PASS: TestAccAWSSSMParameter_overwrite (32.77s)
--- PASS: TestAccAWSSSMParameter_secure_with_key (46.83s)
--- PASS: TestAccAWSSSMParameter_Tier (52.33s)
--- PASS: TestAccAWSSSMParameter_secure_keyUpdate (69.30s)
```

Output from AWS GovCloud (US) acceptance testing:

```
--- PASS: TestAccAWSSSMParameter_disappears (15.31s)
--- PASS: TestAccAWSSSMParameter_basic (21.15s)
--- PASS: TestAccAWSSSMParameter_secure (21.27s)
--- PASS: TestAccAWSSSMParameter_importBasic (22.57s)
--- PASS: TestAccAWSSSMParameter_fullPath (22.80s)
--- PASS: TestAccAWSSSMParameter_overwrite (35.12s)
--- PASS: TestAccAWSSSMParameter_changeNameForcesNew (38.59s)
--- PASS: TestAccAWSSSMParameter_updateDescription (39.42s)
--- PASS: TestAccAWSSSMParameter_updateTags (41.84s)
--- PASS: TestAccAWSSSMParameter_Tier (48.40s)
--- PASS: TestAccAWSSSMParameter_secure_with_key (51.69s)
--- PASS: TestAccAWSSSMParameter_secure_keyUpdate (65.74s)
```
@bflad bflad added bug Addresses a defect in current functionality. service/ssm Issues and PRs that pertain to the ssm service. partition/aws-cn Pertains to the aws-cn partition. labels May 16, 2019
@bflad bflad requested a review from a team May 16, 2019 20:32
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels May 16, 2019
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bflad bflad added this to the v2.11.0 milestone May 17, 2019
@bflad bflad merged commit b203096 into master May 17, 2019
@bflad bflad deleted the b-aws_ssm_parameter-tier-validationexception branch May 17, 2019 12:01
bflad added a commit that referenced this pull request May 17, 2019
@bflad
Copy link
Contributor Author

bflad commented May 17, 2019

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.

@ghost
Copy link

ghost commented Mar 30, 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 Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. partition/aws-cn Pertains to the aws-cn partition. service/ssm Issues and PRs that pertain to the ssm service. size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_ssm_parameter fails to create parameters in AWS China, provider version 2.10
2 participants