oracle / terraform-provider-oci

Terraform Oracle Cloud Infrastructure provider
https://www.terraform.io/docs/providers/oci/
Mozilla Public License 2.0
759 stars 675 forks source link

The terraform-provider-oci_v5.21.0 plugin crashed! #1993

Open francescomerola opened 10 months ago

francescomerola commented 10 months ago

Terraform Version and Provider Version

Terraform v1.6.4 terraform-provider-oci_v5.21.0

Affected Resource(s)

oci_identity_domains_app

Terraform Configuration Files

resource oci_identity_domains_app resource_app_thales { access_token_expiry = "3600" active = "true" all_url_schemes_allowed = "false" allow_access_control = "false" allowed_grants = [ "client_credentials", ] allowed_operations = [ ] attr_rendering_metadata { name = "aliasApps" section = "" visible = "false" widget = "" } audience = "https://xx.xx.xx.xx/" based_on_template { value = "CustomWebAppTemplateId" well_known_id = "CustomWebAppTemplateId" } bypass_consent = "false" client_ip_checking = "" client_type = "confidential" delegated_service_names = [ ] display_name = "resource_app_thales" idcs_endpoint = "https://idcs-xxx.identity.oraclecloud.com:443"
is_alias_app = "false" is_enterprise_app = "false" is_kerberos_realm = "false" is_login_target = "true" is_mobile_target = "false" is_oauth_client = "true" is_oauth_resource = "true" is_saml_service_provider = "false" is_unmanaged_app = "false" is_web_tier_policy = "false" login_mechanism = "OIDC" post_logout_redirect_uris = [ ] redirect_uris = [ ] schemas = [ "urn:ietf:params:scim:schemas:oracle:idcs:App", "urn:ietf:params:scim:schemas:oracle:idcs:extension:OCITags", ] scopes { display_name = "oci_hyok_decrypt" value = "oci_hyok_decrypt" } scopes { display_name = "oci_hyok_encrypt" value = "oci_hyok_encrypt" } scopes { display_name = "oci_hyok_generateRandomBytes" value = "oci_hyok_generateRandomBytes" } scopes { display_name = "oci_hyok_getKeyVersionMetadata" value = "oci_hyok_getKeyVersionMetadata" } scopes { display_name = "oci_hyok_getKeyMetadata" value = "oci_hyok_getKeyMetadata" } scopes { display_name = "oci_hyok_getVaultMetadata" value = "oci_hyok_getVaultMetadata" } secondary_audiences = [ ] show_in_my_apps = "false" trust_scope = "Explicit" }

Debug Output

Github Gist: https://gist.github.com/francescomerola/c42e23efb3908b6b0fe3abc49c162242

Panic Output

Github Gist: https://gist.github.com/francescomerola/60a087ef9327625bb24234f5236160a5

Expected Behavior

It should create a confidential application in the domain

Actual Behavior

The terraform-provider-oci_v5.21.0 plugin crashed!

Steps to Reproduce

1.Create the file .tf with the above configuration, insert the vaule of the IDCS endpoint 2.create a provider.tf file 3.terraform apply

tf-oci-pub commented 10 months ago

Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.

zzx88991 commented 8 months ago

This error occurs when you declare multiple scopes in your resource_app_thales. Unfortunately, I don't have a solution to this yet.

zzx88991 commented 8 months ago

Actually removing the display_name in the scopes would help. The exception was thrown from https://github.com/oracle/terraform-provider-oci/blob/master/internal/service/identity_domains/identity_domains_app_resource.go#L8261

caroline-hughes commented 2 months ago

I am having the same issue. This bug was originally filed 9 months ago. Has it still not been resolved?