diff --git a/terraform/locals.tf b/terraform/locals.tf index 6a23e6b..78a4e05 100644 --- a/terraform/locals.tf +++ b/terraform/locals.tf @@ -160,8 +160,7 @@ locals { ocir_namespace = data.oci_objectstorage_namespace.object_namespace.namespace ocir_namespace_with_slash = format("%s/", local.ocir_namespace) - ocir_user_starts_with = substr(var.ocir_user, 0, length(local.ocir_namespace_with_slash)) - ocir_user = local.ocir_user_starts_with == local.ocir_namespace_with_slash ? var.ocir_user : "${format("%s%s", local.ocir_namespace_with_slash, var.ocir_user)}" + ocir_user = length(regexall("/", var.ocir_user)) > 0 ? var.ocir_user : "${format("%s%s", local.ocir_namespace_with_slash, var.ocir_user)}" region_keys = data.oci_identity_regions.all_regions.regions.*.key region_names = data.oci_identity_regions.all_regions.regions.*.name diff --git a/terraform/schema.yaml b/terraform/schema.yaml index e10330d..d40812b 100644 --- a/terraform/schema.yaml +++ b/terraform/schema.yaml @@ -2601,7 +2601,7 @@ variables: - ${use_autoscaling} type: string title: "Registry User Name" - description: "The user name to access the Oracle Cloud Infrastructure Registry (OCIR) for deploying autoscaling OCI functions, which has the format {identity domain name}/{username}. If your tenancy is using Oracle Identity Cloud Service, use the format oracleidentitycloudservice/{username}." + description: "The user name to access the Oracle Cloud Infrastructure Registry (OCIR) for deploying autoscaling OCI functions, which has the format either {username} or {tenancy_namespace}/{identity domain name}/{username}. If your tenancy is using Oracle Identity Cloud Service, use the format {tenancy_namespace}/oracleidentitycloudservice/{username}." required: true ocir_auth_token_compartment_id: diff --git a/terraform/schema_14110.yaml b/terraform/schema_14110.yaml index f66a273..00005fe 100644 --- a/terraform/schema_14110.yaml +++ b/terraform/schema_14110.yaml @@ -2138,7 +2138,7 @@ variables: - ${use_autoscaling} type: string title: "Registry User Name" - description: "The user name to access the Oracle Cloud Infrastructure Registry (OCIR) for deploying autoscaling OCI functions, which has the format {identity domain name}/{username}. If your tenancy is using Oracle Identity Cloud Service, use the format oracleidentitycloudservice/{username}." + description: "The user name to access the Oracle Cloud Infrastructure Registry (OCIR) for deploying autoscaling OCI functions, which has the format either {username} or {tenancy_namespace}/{identity domain name}/{username}. If your tenancy is using Oracle Identity Cloud Service, use the format {tenancy_namespace}/oracleidentitycloudservice/{username}." required: true ocir_auth_token_compartment_id: diff --git a/terraform/schema_14120.yaml b/terraform/schema_14120.yaml index 8d23688..c844085 100644 --- a/terraform/schema_14120.yaml +++ b/terraform/schema_14120.yaml @@ -2610,7 +2610,7 @@ variables: - ${use_autoscaling} type: string title: "Registry User Name" - description: "The user name to access the Oracle Cloud Infrastructure Registry (OCIR) for deploying autoscaling OCI functions, which has the format {identity domain name}/{username}. If your tenancy is using Oracle Identity Cloud Service, use the format oracleidentitycloudservice/{username}." + description: "The user name to access the Oracle Cloud Infrastructure Registry (OCIR) for deploying autoscaling OCI functions, which has the format either {username} or {tenancy_namespace}/{identity domain name}/{username}. If your tenancy is using Oracle Identity Cloud Service, use the format {tenancy_namespace}/oracleidentitycloudservice/{username}." required: true ocir_auth_token_compartment_id: diff --git a/terraform/schema_15110.yaml b/terraform/schema_15110.yaml index ac0209e..7cd643f 100644 --- a/terraform/schema_15110.yaml +++ b/terraform/schema_15110.yaml @@ -2138,7 +2138,7 @@ variables: - ${use_autoscaling} type: string title: "Registry User Name" - description: "The user name to access the Oracle Cloud Infrastructure Registry (OCIR) for deploying autoscaling OCI functions, which has the format {identity domain name}/{username}. If your tenancy is using Oracle Identity Cloud Service, use the format oracleidentitycloudservice/{username}." + description: "The user name to access the Oracle Cloud Infrastructure Registry (OCIR) for deploying autoscaling OCI functions, which has the format either {username} or {tenancy_namespace}/{identity domain name}/{username}. If your tenancy is using Oracle Identity Cloud Service, use the format {tenancy_namespace}/oracleidentitycloudservice/{username}." required: true ocir_auth_token_compartment_id: