-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Add automatic recovery property to aws_launch_template
and aws_instance
#24377
Add automatic recovery property to aws_launch_template
and aws_instance
#24377
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @Nnachevvv 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
…eInstanceMetadataOptionsRequest'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccEC2Instance_basic\|TestAccEC2Instance_autoRecovery\|TestAccEC2LaunchTemplate_data\|TestAccEC2InstanceDataSource_autoRecovery\|TestAccEC2LaunchTemplateDataSource_name\|TestAccEC2LaunchTemplate_basic' PKG=ec2 ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 3 -run=TestAccEC2Instance_basic\|TestAccEC2Instance_autoRecovery\|TestAccEC2LaunchTemplate_data\|TestAccEC2InstanceDataSource_autoRecovery\|TestAccEC2LaunchTemplateDataSource_name\|TestAccEC2LaunchTemplate_basic -timeout 180m
=== RUN TestAccEC2InstanceDataSource_autoRecovery
=== PAUSE TestAccEC2InstanceDataSource_autoRecovery
=== RUN TestAccEC2Instance_basic
=== PAUSE TestAccEC2Instance_basic
=== RUN TestAccEC2Instance_autoRecovery
=== PAUSE TestAccEC2Instance_autoRecovery
=== RUN TestAccEC2LaunchTemplateDataSource_name
=== PAUSE TestAccEC2LaunchTemplateDataSource_name
=== RUN TestAccEC2LaunchTemplate_basic
=== PAUSE TestAccEC2LaunchTemplate_basic
=== RUN TestAccEC2LaunchTemplate_data
=== PAUSE TestAccEC2LaunchTemplate_data
=== CONT TestAccEC2InstanceDataSource_autoRecovery
=== CONT TestAccEC2LaunchTemplateDataSource_name
=== CONT TestAccEC2Instance_autoRecovery
--- PASS: TestAccEC2LaunchTemplateDataSource_name (43.68s)
=== CONT TestAccEC2LaunchTemplate_data
--- PASS: TestAccEC2LaunchTemplate_data (14.99s)
=== CONT TestAccEC2Instance_basic
--- PASS: TestAccEC2Instance_basic (86.84s)
=== CONT TestAccEC2LaunchTemplate_basic
--- PASS: TestAccEC2Instance_autoRecovery (155.51s)
--- PASS: TestAccEC2LaunchTemplate_basic (13.69s)
--- PASS: TestAccEC2InstanceDataSource_autoRecovery (178.38s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 182.308s
@Nnachevvv Thanks for the contribution 🎉 👏. |
Appreciate involved for addressing this swiftly! 👏 🙇 |
This functionality has been released in v4.12.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! |
|
||
The `maintenance_options` block supports the following: | ||
|
||
* `auto_recovery` - (Optional) The automatic recovery behavior of the Instance. Can be `"default"` or `"dedicated"`. See [Recover your instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html) for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the two valid values are default
and disabled
. dedicated
is a type of instance tenancy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ewbankkit pls see ^^, I think documentation probably needs a quick touch up? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relates #24462.
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. |
Community Note
Closes : #24039
This PR introduces new property
automatic_recovery_behavior
toaws_launch_template
andaws_instance
. More details can be found in Recover your instance .Output from acceptance testing: