Closed
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version and Provider Version
Terraform v1.10.5
oci provider 6.27.0 (and 6.28.0)
Affected Resource(s)
oci_database_database
Terraform Configuration Files
resource oci_database_database "Standby" {
database {
database_admin_password = var.admin_password
character_set = var.character_set
db_name = var.db_name
ncharacter_set = var.ncharacter_set
is_active_data_guard_enabled = var.is_active_data_guard_enabled
protection_mode = var.protection_mode
source_database_id = var.primary_ocid
source_tde_wallet_password = var.admin_password
transport_type = var.transport_type
source_encryption_key_location_details {
hsm_password = var.hsm_password
provider_type = var.provider_type
}
}
db_home_id = var.db_home_standby
source = "DATAGUARD"
timeouts {
create = "2h"
}
}
Debug Output
2025-02-26T12:59:56.404Z [DEBUG] provider.terraform-provider-oci_v6.27.0: DEBUG 2025/02/26 12:59:56.404242 http.go:668: Marshaled body is: {"database":{"databaseAdminPassword":"**************","isActiveDataGuardEnabled":false,"protectionMode":"MAXIMUM_PERFORMANCE","sourceDatabaseId":"ocid1.database.oc1.eu-paris-1.anrwiljreen7geqabhnv2m2dq2d6wgcmry3qwucxigzmylzpegoesojtvyda","sourceTdeWalletPassword":"**************","transportType":"ASYNC"},"dbHomeId":"ocid1.dbhome.oc1.eu-frankfurt-1.antheljs7sg3ynqajqaovaknz45rcujw27bqgi6yyy433ctrh6moejloy74q","source":"DATAGUARD"}
As you can see sourceEncryptionKeyLocationDetails is missing
--->
Panic Output
2025-02-26T12:59:57.638Z [DEBUG] provider.terraform-provider-oci_v6.27.0: "code" : "InvalidParameter",
2025-02-26T12:59:57.638Z [DEBUG] provider.terraform-provider-oci_v6.27.0: "message" : "The primary database is configured with external HSM key encryption. Data Guard setup for the standby database requires external HSM configuration details."
Expected Behavior
Should use attribute sourceEncryptionKeyLocationDetails as documented in API :
https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/CreateStandbyDetails
Actual Behavior
sourceEncryptionKeyLocationDetails is not included in payload despite being present in terraform code.
Steps to Reproduce
terraform apply
Important Factoids
N/A
References
N/A