diff --git a/spectro-registry.tf b/spectro-registry.tf index ba03348..00106d2 100644 --- a/spectro-registry.tf +++ b/spectro-registry.tf @@ -15,8 +15,10 @@ resource "spectrocloud_registry_oci" "oci_registry" { is_private = true credentials { credential_type = each.value.credential_type - arn = each.value.arn - external_id = each.value.external_id + arn = try(each.value.arn, "") + external_id = try(each.value.external_id, "") + access_key = try(each.value.access_key, "") + secret_key = try(each.value.secret_key, "") } } diff --git a/spectro-s3-sts-backup.tf b/spectro-s3-sts-backup.tf index 1479d84..01dbfd3 100644 --- a/spectro-s3-sts-backup.tf +++ b/spectro-s3-sts-backup.tf @@ -21,8 +21,10 @@ resource "spectrocloud_backup_storage_location" "bsl" { region = each.value.region bucket_name = each.value.bucket_name s3 { - credential_type = "sts" - arn = each.value.arn - external_id = each.value.external_id + credential_type = each.value.credential_type + arn = try(each.value.arn, "") + external_id = try(each.value.external_id, "") + access_key = try(each.value.access_key, "") + secret_key = try(each.value.secret_key, "") } } \ No newline at end of file