hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.85k stars 9.2k forks source link

[Enhancement]: Request warning for possible OpenSearch blue/green deployments #40045

Open cl-bsouth opened 2 weeks ago

cl-bsouth commented 2 weeks ago

Description

May be applicable to similar scenarios for other AWS managed services.

Observed behaviour: Certain changes to Opensearch cluster or Elasticsearch domain resources show "will be updated in place" in a terraform plan. However, as as described in Making configuration changes in Amazon OpenSearch Service - Amazon OpenSearch Service a number of these changes would result in a blue/green deployment which could potentially take several hours to complete and could be operationally disruptive (no other changes can be made while a blue/green change is in progress) if the user performing the terraform apply or approving a workflow is unaware or unfamiliar with these operations on these managed services. For those familiar with the terraform provider and AWS managed service in question this is somewhat expected behavior as the resource being "updated in place" is the definition of the managed service not the cluster itself, and then the managed service acts on the changes in the definition that you have requested and applies those to the cluster in the manner that one familiar with that service might expect, but to the uninitiated this could come as a surprise.

Desired behaviour: When one of the operations which would result in a blue/green deployment is detected in a terraform plan, the provider should issue a warning in the plan which would alert the reviewer of that plan to the potential for a blue/green deployment or other long running operations which may extend beyond the timeframe of the terraform apply operation or prevent other changes while such operations are in-flight.

Affected Resource(s) and/or Data Source(s)

aws_elasticsearch_domain aws_opensearch_domain

Potential Terraform Configuration

No response

References

Making configuration changes in Amazon OpenSearch Service - Amazon OpenSearch Service

Would you like to implement a fix?

None

github-actions[bot] commented 2 weeks ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue