File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,10 @@ locals {
155155
156156 ocir_namespace = data. oci_objectstorage_namespace . object_namespace . namespace
157157
158- ocir_user = format (" %s/%s" , local. ocir_namespace , var. ocir_user )
158+ ocir_namespace_with_slash = format (" %s/" ,local. ocir_namespace )
159+ ocir_user_starts_with = substr (var. ocir_user , 0 , length (local. ocir_namespace_with_slash ))
160+ 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 )} "
161+
159162 region_keys = data. oci_identity_regions . all_regions . regions . * . key
160163 region_names = data. oci_identity_regions . all_regions . regions . * . name
161164 ocir_region = var. ocir_region == " " ? lower (element (local. region_keys , index (local. region_names , lower (var. region )))) : var. ocir_region
You can’t perform that action at this time.
0 commit comments