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

f/Start/Stop DB Instance Resource #40180

Merged
merged 20 commits into from
Nov 20, 2024
Merged

Conversation

nam054
Copy link
Contributor

@nam054 nam054 commented Nov 19, 2024

Description

New resource to start and stop RDS DB Instance. This follows the previous established pattern with the EC2 Instance resource and the EC2 Instance State resource.

Relations

Closes #29757

References

Output from Acceptance Testing

> make testacc TESTARGS='-run=TestAccRDSInstanceState_' PKG=rds
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/rds/... -v -count 1 -parallel 20  -run=TestAccRDSInstanceState_ -timeout 360m
2024/11/18 23:59:11 Initializing Terraform AWS Provider...
=== RUN   TestAccRDSInstanceState_basic
=== PAUSE TestAccRDSInstanceState_basic
=== RUN   TestAccRDSInstanceState_update
=== PAUSE TestAccRDSInstanceState_update
=== RUN   TestAccRDSInstanceState_disappears_Instance
=== PAUSE TestAccRDSInstanceState_disappears_Instance
=== CONT  TestAccRDSInstanceState_basic
=== CONT  TestAccRDSInstanceState_disappears_Instance
=== CONT  TestAccRDSInstanceState_update
--- PASS: TestAccRDSInstanceState_basic (542.03s)
--- PASS: TestAccRDSInstanceState_disappears_Instance (542.69s)
--- PASS: TestAccRDSInstanceState_update (960.12s)
PASS

...

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/rds Issues and PRs that pertain to the rds service. generators Relates to code generators. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Nov 19, 2024
@nam054 nam054 marked this pull request as ready for review November 19, 2024 16:58
@nam054 nam054 requested a review from a team as a code owner November 19, 2024 16:58
@YakDriver YakDriver self-assigned this Nov 20, 2024
YakDriver
YakDriver previously approved these changes Nov 20, 2024
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

This is cool. Some say it breaks declarative but if people find it useful, I say, 🎉

% make testacc TESTARGS='-run=TestAccRDSInstanceState_' PKG=rds
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/rds/... -v -count 1 -parallel 20  -run=TestAccRDSInstanceState_ -timeout 360m
2024/11/19 18:53:05 Initializing Terraform AWS Provider...
=== RUN   TestAccRDSInstanceState_basic
=== PAUSE TestAccRDSInstanceState_basic
=== RUN   TestAccRDSInstanceState_update
=== PAUSE TestAccRDSInstanceState_update
=== RUN   TestAccRDSInstanceState_disappears_Instance
=== PAUSE TestAccRDSInstanceState_disappears_Instance
=== CONT  TestAccRDSInstanceState_basic
=== CONT  TestAccRDSInstanceState_disappears_Instance
=== CONT  TestAccRDSInstanceState_update
--- PASS: TestAccRDSInstanceState_basic (554.67s)
--- PASS: TestAccRDSInstanceState_disappears_Instance (627.12s)
--- PASS: TestAccRDSInstanceState_update (1096.34s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	1100.377s

internal/service/rds/instance.go Outdated Show resolved Hide resolved
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

A couple minor suggestions, but I really like the simplicity of the implementation 👍

website/docs/r/rds_instance_state.html.markdown Outdated Show resolved Hide resolved
internal/service/rds/rds_instance_state.go Outdated Show resolved Hide resolved
internal/service/rds/instance.go Outdated Show resolved Hide resolved
internal/service/rds/instance.go Outdated Show resolved Hide resolved
YakDriver
YakDriver previously approved these changes Nov 20, 2024
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

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

After latest:

% make t T=TestAccRDSInstanceState_ K=rds
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/rds/... -v -count 1 -parallel 20 -run='TestAccRDSInstanceState_'  -timeout 360m
2024/11/20 12:40:09 Initializing Terraform AWS Provider...
=== RUN   TestAccRDSInstanceState_basic
=== PAUSE TestAccRDSInstanceState_basic
=== RUN   TestAccRDSInstanceState_update
=== PAUSE TestAccRDSInstanceState_update
=== RUN   TestAccRDSInstanceState_disappears_Instance
=== PAUSE TestAccRDSInstanceState_disappears_Instance
=== CONT  TestAccRDSInstanceState_basic
=== CONT  TestAccRDSInstanceState_disappears_Instance
=== CONT  TestAccRDSInstanceState_update
--- PASS: TestAccRDSInstanceState_basic (546.86s)
--- PASS: TestAccRDSInstanceState_disappears_Instance (547.64s)
--- PASS: TestAccRDSInstanceState_update (1099.80s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	1103.763s

@YakDriver YakDriver enabled auto-merge November 20, 2024 18:06
@YakDriver YakDriver merged commit 8b9c87b into main Nov 20, 2024
35 checks passed
@YakDriver YakDriver deleted the f/start-stop-db-instance-resource branch November 20, 2024 21:58
@github-actions github-actions bot added this to the v5.77.0 milestone Nov 20, 2024
terraform-aws-provider bot pushed a commit that referenced this pull request Nov 20, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Nov 21, 2024
Copy link

This functionality has been released in v5.77.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. Thank you!

Copy link

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 Dec 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. generators Relates to code generators. service/rds Issues and PRs that pertain to the rds service. 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.

[Enhancement]: Stopping an Amazon RDS DB instance temporarily
3 participants