Skip to content

Commit 9acc897

Browse files
Changing the logic of adding the namespace to ocir_user
1 parent ea9db9c commit 9acc897

File tree

3 files changed

+1
-2
lines changed

3 files changed

+1
-2
lines changed

remove_resources.py

Whitespace-only changes.

terraform/locals.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ locals {
160160
ocir_namespace = data.oci_objectstorage_namespace.object_namespace.namespace
161161

162162
ocir_namespace_with_slash = format("%s/", local.ocir_namespace)
163-
ocir_user_starts_with = substr(var.ocir_user, 0, length(local.ocir_namespace_with_slash))
164-
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)}"
163+
ocir_user = length(regexall("/", var.ocir_user)) > 0 ? var.ocir_user : "${format("%s%s", local.ocir_namespace_with_slash, var.ocir_user)}"
165164

166165
region_keys = data.oci_identity_regions.all_regions.regions.*.key
167166
region_names = data.oci_identity_regions.all_regions.regions.*.name

verify.py

Whitespace-only changes.

0 commit comments

Comments
 (0)