Prisma Cloud: Terraform Error 400 when onboarding Oracle "OCI-terraform.tf line 1, in resource "oci_identity_user"

Prisma Cloud: Terraform Error 400 when onboarding Oracle "OCI-terraform.tf line 1, in resource "oci_identity_user"

5208
Created On 08/08/22 13:11 PM - Last Modified 02/07/25 21:42 PM


Symptom


Error when running "Terraform apply" in Oracle when onboarding your cloud account into Prisma Cloud. 
oci_identity_user.user,
on OCI-terraform.tf line 1, in resource "oci_identity_user" "user": 
resource "oci_identity_user" "user" {
oci-error-1 (3).png
 


Environment


  • Prisma Cloud
  • Terraform
  • OCI (Oracle)


Cause


Expected Behavior

Terraform provider documentation states that oci_identity_user email attribute is optional.
email - (Optional) (Updatable) The email you assign to the user. Has to be unique across the tenancy.


Actual Behavior

It seems like the email attribute is required. 
email - (Required) (Updatable) The email you assign to the user. Has to be unique across the tenancy.
Terraform output error message: 

Error":{"messageId":"error.identity.user.primaryEmailNotSpecified"}}

 



Resolution


  1. In Prisma Cloud Download the OCI cloud account Terraform template after completing the onboarding steps here

GUI Path: Settings > Providers > Add Cloud Account > Oracle > 3. Terraform Template

Screen Shot 2022-08-12 at 3.55.11 PM.png

  1. Configure Variables in Oracle with below configurations. 
GUI Path: Create Stack > Stack Information > Configure Variables 
Screen Shot 2022-08-12 at 4.05.40 PM.png
  1. Please include both attribute sections in the terraform.tf file after downloading the terraform template from Prisma Cloud and uploading it into Oracle under Stack Information. Example Usage: 

resource "oci_identity_user" "test_user" {
     #Required
     compartment_id = var.tenancy_ocid
     description = var.user_description
     name = var.user_name

     #Required
     defined_tags = {"Operations.CostCenter"= "42"}
     email = var.user_email
     freeform_tags = {"Department"= "Finance"}
}



Additional Information


This appears to be an issue in the terraform-provider-oci, a request has already been filed for this here.

Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000Cr6bCAC&lang=en_US%E2%80%A9&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language