aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.11k stars 54 forks source link

[AWS::OpenSearchService::Domain] engine version upgrades should not be destructive by default #1862

Open thedoc31 opened 9 months ago

thedoc31 commented 9 months ago

Name of the resource

AWS::OpenSearchService::Domain

Resource name

No response

Description

I have several OpenSearch stacks provisioned using CloudFormation. I need to update the EngineVersion from 2.5 to 2.9, which should be seamless. However, if I do not specify the EnableVersionUpgrade UpdatePolicy, my entire domain and all data contained within will be deleted, per [1] and [2].

As an administrator, I believe that EngineVersionUpgrade = true behavior should be the default in this scenario, for the following reasons:

  1. If I use the OpenSearch UI, CLI/API, or SDK [3] to upgrade versions, OpenSearch performs the upgrade seamlessly without requiring extra flags.
  2. An extra flag to enable the behavior is confusing and dangerous. It could easily be missed by someone who did not refer back to the documentation before changing the version in the template.
  3. If I DID want to delete all my data in a domain created by CloudFormation, I would simply delete the entire stack or the resource from the template.

I created support case [4] to address this issue, if you want to read through the details.

Thanks for considering this!

Other Details

[1] https://docs.aws.amazon.com/en_us/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-domain.html#cfn-opensearchservice-domain-engineversion [2] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html#cfn-attributes-updatepolicy-upgradeopensearchdomain [3] https://docs.aws.amazon.com/opensearch-service/latest/developerguide/version-migration.html#starting-upgrades [4] Case ID 170024197001085