[Enhancement]: aws_ec2_serial_console_access deletion should revert back to its initial status #40290
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
needs-triage
Waiting for first response or review from a maintainer.
service/ec2
Issues and PRs that pertain to the ec2 service.
Description
#18503 introduced aws_ec2_serial_console_access to turn on / off EC2 serial console access.
The current behavior on deletion is to disable it: https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/ec2/ec2_serial_console_access.go#L83-L94
However, this is problematic in the following case:
aws_ec2_serial_console_access
resource withenabled = true
At this point, the EC2 serial console access should be left to its initial state ("enabled") that was here before Terraform ran.
From an implementation perspective, I'd suggest:
Feedback/thoughts welcome
cc @ewbankkit who worked on the initial PR
Affected Resource(s) and/or Data Source(s)
Potential Terraform Configuration
No response
References
#18503
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered: