oracle / terraform-provider-oci

Terraform Oracle Cloud Infrastructure provider
https://www.terraform.io/docs/providers/oci/
Mozilla Public License 2.0
760 stars 683 forks source link

ARS oci_recovery_protected_database fails update if database_size = AUTO #2248

Open jeliker1 opened 3 days ago

jeliker1 commented 3 days ago

Community Note

Terraform Version and Provider Version

Terraform v1.7.4
on darwin_arm64
+ provider registry.terraform.io/oracle/oci v6.18.0

Affected Resource(s)

affected_resources = oci_recovery_protected_database

Terraform Configuration Files

resource "oci_recovery_protected_database" "the_protected_database" {
    compartment_id       = var.compartment_id
    db_unique_name       = var.db_unique_name
    display_name         = var.display_name
    password             = var.password
    protection_policy_id = var.protection_policy_id
    recovery_service_subnets {
        recovery_service_subnet_id = var.recovery_service_subnet_id
    }

    database_id          = var.database_id
    database_size        = "AUTO"
    deletion_schedule    = "DELETE_AFTER_RETENTION_PERIOD"
    is_redo_logs_shipped = false
}

Debug Output

2024-11-22T11:47:33.051-0500 [ERROR] vertex "oci_recovery_protected_database.the_protected_database" error: 400-InvalidParameter, Database Size must be one of [XS, S, M, L, XL, XXL].
Suggestion: Please update the parameter(s) in the Terraform config as per error message Database Size must be one of [XS, S, M, L, XL, XXL].
Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/recovery_protected_database 
API Reference: https://docs.oracle.com/iaas/api/#/en/recovery-service/20210216/ProtectedDatabase/UpdateProtectedDatabase 
Request Target: PUT https://recovery.us-phoenix-1.oci.oraclecloud.com/20210216/protectedDatabases/ocid1.recoveryserviceprotecteddatabase.oc1.phx.amaaaaaaj2wepuqadjg3fbjid22cdimvim6ghnv63bpgur22ynlz2dboskdq 
Provider version: 6.18.0, released on 2024-11-13. This provider is 1 Update(s) behind to current. 
Service: Recovery Protected Database 
Operation Name: UpdateProtectedDatabase 
OPC request ID: 5f2eb1de433c70c9f8572041d35a07a7/70C89EE41EC8FD416412282CED39631E/6FA352319AB40F54DD614E9DFD4B6339

Panic Output

Expected Behavior

I expect database_size="AUTO" to be accepted as valid value

Actual Behavior

When specifying database_size="AUTO" on update, error occurs

Steps to Reproduce

  1. terraform apply

Important Factoids

References