Closed bbung closed 3 months ago
Terraform v1.9.1 on darwin_arm64
opentelekomcloud_dds_instance_v3
resource "opentelekomcloud_kms_key_v1" "mdb" { key_alias = "mdb" pending_days = "7" key_description = "database encryptionkey" realm = "eu-de" is_enabled = true lifecycle { prevent_destroy = true } } resource "opentelekomcloud_dds_instance_v3" "mdb" { name = "mdb" region = "eu-de" datastore { type = "DDS-Community" version = "4.0" storage_engine = "wiredTiger" } availability_zone = "eu-de-01,eu-de-02,eu-de-03" vpc_id = data.opentelekomcloud_vpc_v1.workload-vpc.id subnet_id = one(data.opentelekomcloud_vpc_subnet_ids_v1.subnet_ids.ids) security_group_id = data.opentelekomcloud_networking_secgroup_v2.nodes-to-documentdb.id password = "CHANGEME_PLS" mode = "ReplicaSet" flavor { type = "replica" num = 1 storage = "ULTRAHIGH" size = 10 // divisible by 10 spec_code = "dds.mongodb.s2.medium.4.repset" # 1vCPU 4Gi RAM # terraform state show data.opentelekomcloud_dds_flavors_v3.replica_flavors } disk_encryption_id = opentelekomcloud_kms_key_v1.mdb.id ### ADDED AFTER FIRST APPLY vvvvv backup_strategy { start_time = "02:00-03:00" keep_days = "30" } ### ADDED AFTER FIRST APPLY ^^^^ ssl = true lifecycle { // API for passwordchange is not available ignore_changes = [ password ] prevent_destroy = true } depends_on = [ opentelekomcloud_kms_key_v1.mdb ] }
terraform apply
or
The backup strategy should change according to the configuration.
~ backup_strategy { ~ keep_days = 7 -> 8 # forces replacement ~ start_time = "22:00-23:00" -> "02:00-03:00" # forces replacement }
So changing the backup strategy will destroy the database. 🙅
Depends-On: https://github.com/opentelekomcloud/gophertelekomcloud/pull/709
Hi @bbung please check the latest v1.36.17
Working as expected. Thanks for the quick fix!
Terraform provider version
Terraform v1.9.1 on darwin_arm64
Affected Resource(s)
opentelekomcloud_dds_instance_v3
Terraform Configuration Files
Debug Output/Panic Output
Steps to Reproduce
terraform apply
without backup strategy configor
Expected Behavior
The backup strategy should change according to the configuration.
Actual Behavior
So changing the backup strategy will destroy the database. 🙅
Important Factoids
References