hashicorp/terraform-provider-aws

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

Open

#40,045 opened on Nov 7, 2024

 (2 comments) (5 reactions) (0 assignees)Go (10,312 forks)github user discovery
enhancementgood first issueservice/elasticsearchservice/opensearch

Repository metrics

Stars
 (11,045 stars)
PR merge metrics
 (Avg merge 19d 21h) (251 merged PRs in 30d)

Description

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

Contributor guide