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/apprunner_service: fix resource creation with instance role and instance_configuration #19483

Merged
merged 1 commit into from
May 24, 2021

Conversation

anGie44
Copy link
Contributor

@anGie44 anGie44 commented May 23, 2021

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

Closes #19484

Notes:

  • AccTest TestAccAwsAppRunnerService_ImageRepository_InstanceConfiguration was previously failing due to failure to assume role (iam eventual consistency 🤦‍♀️), so retry handling has been added.
  • While fixing the mentioned test, it became apparent that the instance_configuration cpu and memory values returned from API and set in state did not match original values if configured in vCPU or GB, respectively. Thus DiffSuppressFuncs have been added to address these.

Output from acceptance testing:

--- PASS: TestAccAwsAppRunnerService_ImageRepository_basic (241.08s)
--- PASS: TestAccAwsAppRunnerService_disappears (246.84s)
--- PASS: TestAccAwsAppRunnerService_tags (278.58s)
--- PASS: TestAccAwsAppRunnerService_ImageRepository_AutoScalingConfiguration (315.06s)
--- PASS: TestAccAwsAppRunnerService_ImageRepository_InstanceConfiguration (361.75s)
--- PASS: TestAccAwsAppRunnerService_ImageRepository_HealthCheckConfiguration (484.59s)
--- PASS: TestAccAwsAppRunnerService_ImageRepository_EncryptionConfiguration (533.10s)

@anGie44 anGie44 requested a review from a team as a code owner May 23, 2021 20:26
@ghost ghost added size/M Managed by automation to categorize the size of a PR. labels May 23, 2021
@github-actions github-actions bot added service/apprunner Issues and PRs that pertain to the apprunner service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels May 23, 2021
@anGie44 anGie44 added the bug Addresses a defect in current functionality. label May 23, 2021
@anGie44 anGie44 force-pushed the t-apprunner-service-instance-role branch from d3e6b77 to 463d39b Compare May 23, 2021 20:37
@ewbankkit ewbankkit self-assigned this May 24, 2021
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

Commercial
% make testacc TEST=./aws TESTARGS='-run=TestAccAwsAppRunnerService_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsAppRunnerService_ -timeout 180m
=== RUN   TestAccAwsAppRunnerService_ImageRepository_basic
=== PAUSE TestAccAwsAppRunnerService_ImageRepository_basic
=== RUN   TestAccAwsAppRunnerService_ImageRepository_AutoScalingConfiguration
=== PAUSE TestAccAwsAppRunnerService_ImageRepository_AutoScalingConfiguration
=== RUN   TestAccAwsAppRunnerService_ImageRepository_EncryptionConfiguration
=== PAUSE TestAccAwsAppRunnerService_ImageRepository_EncryptionConfiguration
=== RUN   TestAccAwsAppRunnerService_ImageRepository_HealthCheckConfiguration
=== PAUSE TestAccAwsAppRunnerService_ImageRepository_HealthCheckConfiguration
=== RUN   TestAccAwsAppRunnerService_ImageRepository_InstanceConfiguration
=== PAUSE TestAccAwsAppRunnerService_ImageRepository_InstanceConfiguration
=== RUN   TestAccAwsAppRunnerService_disappears
=== PAUSE TestAccAwsAppRunnerService_disappears
=== RUN   TestAccAwsAppRunnerService_tags
=== PAUSE TestAccAwsAppRunnerService_tags
=== CONT  TestAccAwsAppRunnerService_ImageRepository_basic
=== CONT  TestAccAwsAppRunnerService_ImageRepository_InstanceConfiguration
=== CONT  TestAccAwsAppRunnerService_tags
=== CONT  TestAccAwsAppRunnerService_ImageRepository_EncryptionConfiguration
=== CONT  TestAccAwsAppRunnerService_ImageRepository_AutoScalingConfiguration
=== CONT  TestAccAwsAppRunnerService_disappears
=== CONT  TestAccAwsAppRunnerService_ImageRepository_HealthCheckConfiguration
--- PASS: TestAccAwsAppRunnerService_ImageRepository_basic (229.38s)
--- PASS: TestAccAwsAppRunnerService_tags (248.20s)
--- PASS: TestAccAwsAppRunnerService_disappears (257.13s)
--- PASS: TestAccAwsAppRunnerService_ImageRepository_InstanceConfiguration (375.09s)
--- PASS: TestAccAwsAppRunnerService_ImageRepository_AutoScalingConfiguration (382.60s)
--- PASS: TestAccAwsAppRunnerService_ImageRepository_EncryptionConfiguration (449.17s)
--- PASS: TestAccAwsAppRunnerService_ImageRepository_HealthCheckConfiguration (507.23s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	510.794s

@ewbankkit ewbankkit removed their assignment May 24, 2021
@anGie44 anGie44 added this to the v3.43.0 milestone May 24, 2021
@anGie44 anGie44 merged commit 9f35bcd into main May 24, 2021
@anGie44 anGie44 deleted the t-apprunner-service-instance-role branch May 24, 2021 16:11
@ghost
Copy link

ghost commented Jun 1, 2021

This has been released in version 3.43.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!

@github-actions
Copy link

github-actions bot commented Jul 2, 2021

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 2, 2021
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. service/apprunner Issues and PRs that pertain to the apprunner service. size/M 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.

tests/apprunner_service: TestAccAwsAppRunnerService_ImageRepository_InstanceConfiguration consistently failing
2 participants