Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we merge this change, I think we will likely modify the description in

because if the person creating the stack specifies a user in an identity domain that is not default, he will need to specify something like "mydomain/myuser" and then length(regexall("/", var.ocir_user)) > 0 will be true and the namespace will not be prefixed to the user, so he will need to specify the namespace

I think we can make that change in a separate PR, because that description needs to change anyways, because this part is not correct:
If your tenancy is using Oracle Identity Cloud Service, use the format oracleidentitycloudservice/{username}.
Because the identity domain name can be different from oracleidentitycloudservice

But also, this could be a change in behavior. If a user is already specifying the ocir user as mydomain/myuser, and we introduce this change, then provisioning will fail,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have discussed with Adrian on this and had raised the same topic. This change is being done according to his proposal that if we the customer is entering anything with a '/', then he has to enter all the details including the tenancy_namespace, domain name and the username.
We will have to make changes to our documentation as well accordingly for which I will be filing a doc bug.
This was discussed in the standup and I did get consensus from Abhi on the same.


region_keys = data.oci_identity_regions.all_regions.regions.*.key
region_names = data.oci_identity_regions.all_regions.regions.*.name
Expand Down