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_document: Ensure content attribute is refreshed and support resource import #9313

Merged
merged 3 commits into from
Jul 11, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Jul 11, 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 #7516

Sorry for the dual bug and enhancement pull request, but import support is generally the easiest way to verify all attributes are properly being refreshed during the resource Read function.

Release note for CHANGELOG:

ENHANCEMENTS:

* resource/aws_ssm_document: Support resource import

BUG FIXES:

* resource/aws_ssm_document: Ensure `content` attribute is always refreshed

Output from acceptance testing:

--- PASS: TestAccAWSSSMDocument_session (20.77s)
--- PASS: TestAccAWSSSMDocument_permission_public (20.81s)
--- PASS: TestAccAWSSSMDocument_params (27.54s)
--- PASS: TestAccAWSSSMDocument_permission_batching (35.68s)
--- PASS: TestAccAWSSSMDocument_basic (35.72s)
--- PASS: TestAccAWSSSMDocument_permission_private (38.92s)
--- PASS: TestAccAWSSSMDocument_update (48.37s)
--- PASS: TestAccAWSSSMDocument_SchemaVersion_1 (48.81s)
--- PASS: TestAccAWSSSMDocument_Tags (52.70s)
--- PASS: TestAccAWSSSMDocument_automation (53.60s)
--- PASS: TestAccAWSSSMDocument_permission_change (59.26s)
--- PASS: TestAccAWSSSMDocument_DocumentFormat_YAML (60.57s)
PASS

bflad added 3 commits July 10, 2019 15:53
… as expected, remove extraneous skip update code

Output from acceptance testing:

```
--- PASS: TestAccAWSSSMDocument_basic (22.85s)
--- PASS: TestAccAWSSSMDocument_session (23.28s)
--- PASS: TestAccAWSSSMDocument_params (30.43s)
--- PASS: TestAccAWSSSMDocument_permission_batching (32.29s)
--- PASS: TestAccAWSSSMDocument_update (33.08s)
--- PASS: TestAccAWSSSMDocument_permission_private (35.62s)
--- PASS: TestAccAWSSSMDocument_DocumentFormat_YAML (43.34s)
--- PASS: TestAccAWSSSMDocument_Tags (43.64s)
--- PASS: TestAccAWSSSMDocument_automation (46.07s)
--- PASS: TestAccAWSSSMDocument_SchemaVersion_1 (57.55s)
--- PASS: TestAccAWSSSMDocument_permission_change (66.23s)
--- PASS: TestAccAWSSSMDocument_permission_public (72.01s)
```
… state for drift detection

Reference: #7516

Output from acceptance testing:

```
--- PASS: TestAccAWSSSMDocument_params (21.85s)
--- PASS: TestAccAWSSSMDocument_permission_private (21.85s)
--- PASS: TestAccAWSSSMDocument_permission_public (26.31s)
--- PASS: TestAccAWSSSMDocument_permission_batching (36.87s)
--- PASS: TestAccAWSSSMDocument_automation (38.18s)
--- PASS: TestAccAWSSSMDocument_SchemaVersion_1 (41.09s)
--- PASS: TestAccAWSSSMDocument_update (42.55s)
--- PASS: TestAccAWSSSMDocument_DocumentFormat_YAML (44.60s)
--- PASS: TestAccAWSSSMDocument_session (47.62s)
--- PASS: TestAccAWSSSMDocument_permission_change (50.90s)
--- PASS: TestAccAWSSSMDocument_Tags (54.43s)
--- PASS: TestAccAWSSSMDocument_basic (70.90s)
PASS
```
Output from acceptance testing:

```
--- PASS: TestAccAWSSSMDocument_session (20.77s)
--- PASS: TestAccAWSSSMDocument_permission_public (20.81s)
--- PASS: TestAccAWSSSMDocument_params (27.54s)
--- PASS: TestAccAWSSSMDocument_permission_batching (35.68s)
--- PASS: TestAccAWSSSMDocument_basic (35.72s)
--- PASS: TestAccAWSSSMDocument_permission_private (38.92s)
--- PASS: TestAccAWSSSMDocument_update (48.37s)
--- PASS: TestAccAWSSSMDocument_SchemaVersion_1 (48.81s)
--- PASS: TestAccAWSSSMDocument_Tags (52.70s)
--- PASS: TestAccAWSSSMDocument_automation (53.60s)
--- PASS: TestAccAWSSSMDocument_permission_change (59.26s)
--- PASS: TestAccAWSSSMDocument_DocumentFormat_YAML (60.57s)
PASS
```
@bflad bflad added bug Addresses a defect in current functionality. enhancement Requests to existing resources that expand the functionality or scope. service/ssm Issues and PRs that pertain to the ssm service. labels Jul 11, 2019
@bflad bflad requested a review from a team July 11, 2019 13:46
@ghost ghost added size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Jul 11, 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 👍 👍

--- PASS: TestAccAWSSSMDocument_permission_public (29.00s)
--- PASS: TestAccAWSSSMDocument_session (30.39s)
--- PASS: TestAccAWSSSMDocument_params (30.71s)
--- PASS: TestAccAWSSSMDocument_basic (34.31s)
--- PASS: TestAccAWSSSMDocument_permission_batching (37.76s)
--- PASS: TestAccAWSSSMDocument_SchemaVersion_1 (45.79s)
--- PASS: TestAccAWSSSMDocument_update (46.25s)
--- PASS: TestAccAWSSSMDocument_DocumentFormat_YAML (48.13s)
--- PASS: TestAccAWSSSMDocument_automation (48.84s)
--- PASS: TestAccAWSSSMDocument_permission_change (67.74s)
--- PASS: TestAccAWSSSMDocument_permission_private (69.60s)
--- PASS: TestAccAWSSSMDocument_Tags (75.17s)

@bflad bflad added this to the v2.19.0 milestone Jul 11, 2019
@bflad bflad merged commit c7d1f77 into master Jul 11, 2019
@bflad bflad deleted the b-aws_ssm_document-schema_version-1-forcenew branch July 11, 2019 19:30
bflad added a commit that referenced this pull request Jul 11, 2019
@bflad
Copy link
Contributor Author

bflad commented Jul 11, 2019

This has been released in version 2.19.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Nov 2, 2019

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 Nov 2, 2019
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. documentation Introduces or discusses updates to documentation. 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. 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_document should be deleted/recreated when it can't be versioned
2 participants