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_cloudformation_stack_set: Wait for update operation completion and report any errors #11726

Merged
merged 1 commit into from
Feb 4, 2020

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Jan 23, 2020

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" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Release note for CHANGELOG:

* resource/aws_cloudformation_stack_set: Wait for update operation completion (default timeout of 30 minutes) and report any errors

Previously in the acceptance testing:

--- FAIL: TestAccAWSCloudFormationStackSet_Parameters (35.78s)
    testing.go:640: Step 4 error: errors during apply:

        Error: error updating CloudFormation Stack Set (tf-acc-test-5503547290025742409): OperationInProgressException: Another Operation on StackSet arn:aws:cloudformation:us-west-2:*******:stackset/tf-acc-test-5503547290025742409:55908c5e-ea0e-482f-b21c-2c1fb21fb1ac is in progress
        	status code: 409, request id: c123a6e4-3577-4c85-8964-a898d81c597d

          on /opt/teamcity-agent/temp/buildTmp/tf-test708526898/main.tf line 7:
          (source code not available)

    testing.go:701: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during apply: error deleting CloudFormation Stack Set (tf-acc-test-5503547290025742409): OperationInProgressException: Operation terraform-20200122114208738100000003 on StackSet arn:aws:cloudformation:us-west-2:*******:stackset/tf-acc-test-5503547290025742409:55908c5e-ea0e-482f-b21c-2c1fb21fb1ac is in progress
        	status code: 409, request id: b8059f09-effd-494a-8f43-17a6cac30d81

There are no StackSetOperation associated with CreateStackSet or DeleteStackSet.

Output from acceptance testing:

--- PASS: TestAccAWSCloudFormationStackSet_Description (38.41s)
--- PASS: TestAccAWSCloudFormationStackSet_disappears (41.35s)
--- PASS: TestAccAWSCloudFormationStackSet_ExecutionRoleName (57.63s)
--- PASS: TestAccAWSCloudFormationStackSet_Name (61.53s)
--- PASS: TestAccAWSCloudFormationStackSet_basic (72.71s)
--- PASS: TestAccAWSCloudFormationStackSet_TemplateUrl (73.85s)
--- PASS: TestAccAWSCloudFormationStackSet_AdministrationRoleArn (78.93s)
--- PASS: TestAccAWSCloudFormationStackSet_Parameters (104.93s)
--- PASS: TestAccAWSCloudFormationStackSet_TemplateBody (108.84s)
--- PASS: TestAccAWSCloudFormationStackSet_Tags (134.72s)

…letion and report any errors

Previously in the acceptance testing:

```
--- FAIL: TestAccAWSCloudFormationStackSet_Parameters (35.78s)
    testing.go:640: Step 4 error: errors during apply:

        Error: error updating CloudFormation Stack Set (tf-acc-test-5503547290025742409): OperationInProgressException: Another Operation on StackSet arn:aws:cloudformation:us-west-2:*******:stackset/tf-acc-test-5503547290025742409:55908c5e-ea0e-482f-b21c-2c1fb21fb1ac is in progress
        	status code: 409, request id: c123a6e4-3577-4c85-8964-a898d81c597d

          on /opt/teamcity-agent/temp/buildTmp/tf-test708526898/main.tf line 7:
          (source code not available)

    testing.go:701: Error destroying resource! WARNING: Dangling resources
        may exist. The full state and error is shown below.

        Error: errors during apply: error deleting CloudFormation Stack Set (tf-acc-test-5503547290025742409): OperationInProgressException: Operation terraform-20200122114208738100000003 on StackSet arn:aws:cloudformation:us-west-2:*******:stackset/tf-acc-test-5503547290025742409:55908c5e-ea0e-482f-b21c-2c1fb21fb1ac is in progress
        	status code: 409, request id: b8059f09-effd-494a-8f43-17a6cac30d81
```

Output from acceptance testing:

```
--- PASS: TestAccAWSCloudFormationStackSet_Description (38.41s)
--- PASS: TestAccAWSCloudFormationStackSet_disappears (41.35s)
--- PASS: TestAccAWSCloudFormationStackSet_ExecutionRoleName (57.63s)
--- PASS: TestAccAWSCloudFormationStackSet_Name (61.53s)
--- PASS: TestAccAWSCloudFormationStackSet_basic (72.71s)
--- PASS: TestAccAWSCloudFormationStackSet_TemplateUrl (73.85s)
--- PASS: TestAccAWSCloudFormationStackSet_AdministrationRoleArn (78.93s)
--- PASS: TestAccAWSCloudFormationStackSet_Parameters (104.93s)
--- PASS: TestAccAWSCloudFormationStackSet_TemplateBody (108.84s)
--- PASS: TestAccAWSCloudFormationStackSet_Tags (134.72s)
```
@bflad bflad added the bug Addresses a defect in current functionality. label Jan 23, 2020
@bflad bflad requested a review from a team January 23, 2020 02:22
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/cloudformation Issues and PRs that pertain to the cloudformation service. documentation Introduces or discusses updates to documentation. labels Jan 23, 2020
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Jan 23, 2020
@gdavison gdavison self-assigned this Jan 30, 2020
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

There are intermittent errors in TeamCity:

Error: error waiting for CloudFormation Stack Set Instance (tf-acc-test-3697492415319361987,*******,us-west-2) creation: Operation (terraform-20200130031205795500000004) Results:
        Account (*******) Region (us-west-2) Status (FAILED) Status Reason: Account ******* should have 'tf-acc-test-3697492415319361987-Execution' role with trust relationship to Role 'tf-acc-test-3697492415319361987-Administration'.

@bflad
Copy link
Contributor Author

bflad commented Jan 30, 2020

@gdavison failures with the aws_cloudformation_stack_set_instance resource are unrelated to the changes/fixes here.

Copy link
Contributor

@gdavison gdavison 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.48.0 milestone Feb 4, 2020
@bflad bflad merged commit 27359a1 into master Feb 4, 2020
@bflad bflad deleted the b-aws_cloudformation_stack_set-wait-for-updates branch February 4, 2020 01:35
bflad added a commit that referenced this pull request Feb 4, 2020
@ghost
Copy link

ghost commented Feb 7, 2020

This has been released in version 2.48.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 Mar 27, 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 27, 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. documentation Introduces or discusses updates to documentation. service/cloudformation Issues and PRs that pertain to the cloudformation service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants