oracle / terraform-provider-oci

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

PKCS#8 not supported as default #1647

Open blacksd opened 2 years ago

blacksd commented 2 years ago

Community Note

Terraform Version and Provider Version

❯ terraform -v
Terraform v1.1.1
on darwin_amd64
+ provider registry.terraform.io/oracle/oci v4.87.0

Affected Resource(s)

affected_resources = terraform

Terraform Configuration Files

terraform {
  required_providers {
    oci = {
      source  = "oracle/oci"
      version = "4.87.0"
    }
  }
  required_version = "~> 1.1.0"
}

provider "oci" {}

variable "tenancy_ocid" {}

resource "oci_identity_compartment" "test_compartment" {
  compartment_id = var.tenancy_ocid
  description    = "A description"
  name           = "Test"
}

The content of the default ~/.oci/config after the oci setup bootstrap is

❯ cat ~/.oci/config

[DEFAULT]
user=ocid1.user.oc1..<REDACTED>
fingerprint=<REDACTED>
key_file=/Users/marco/.oci/sessions/DEFAULT/oci_api_key.pem
tenancy=ocid1.tenancy.oc1..<REDACTED>
region=eu-frankfurt-1
pass_phrase=myencpass

The bootstrap phase creates a PKCS#8 key:

❯ head -n 2 /Users/marco/.oci/sessions/DEFAULT/oci_api_key.pem
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIFLTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQIyL2bV6F7mJsCAggA

Expected Behavior

❯ terraform plan -var "compartment_id=ocid1.tenancy.oc1..<REDACTED>"

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # oci_identity_compartment.test_compartment will be created
  + resource "oci_identity_compartment" "test_compartment" {
      + compartment_id = "ocid1.tenancy.oc1..<REDACTED>"
      + defined_tags   = (known after apply)
      + description    = "A Description"
      + freeform_tags  = (known after apply)
      + id             = (known after apply)
      + inactive_state = (known after apply)
      + is_accessible  = (known after apply)
      + name           = "Test"
      + state          = (known after apply)
      + time_created   = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Actual Behavior

The provider isn't able to perform access with the default key.

β•·
β”‚ Error: can not create client, bad configuration: did not find a proper configuration for private key
β”‚ 
β”‚   with provider["registry.terraform.io/oracle/oci"],
β”‚   on providers.tf line 12, in provider "oci":
β”‚   12: provider "oci" {
β”‚ 
β•΅
Full TRACE log: ```sh ❯ TF_LOG=TRACE OCI_GO_SDK_DEBUG=1 terraform plan 2022-08-08T08:34:34.944+0200 [INFO] Terraform version: 1.1.1 2022-08-08T08:34:34.945+0200 [INFO] Go runtime version: go1.17.2 2022-08-08T08:34:34.945+0200 [INFO] CLI args: []string{"terraform", "plan"} 2022-08-08T08:34:34.945+0200 [TRACE] Stdout is a terminal of width 292 2022-08-08T08:34:34.945+0200 [TRACE] Stderr is a terminal of width 292 2022-08-08T08:34:34.945+0200 [TRACE] Stdin is a terminal 2022-08-08T08:34:34.945+0200 [DEBUG] Attempting to open CLI config file: /Users/marco/.terraformrc 2022-08-08T08:34:34.945+0200 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. 2022-08-08T08:34:34.945+0200 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins 2022-08-08T08:34:34.945+0200 [DEBUG] ignoring non-existing provider search directory /Users/marco/.terraform.d/plugins 2022-08-08T08:34:34.945+0200 [DEBUG] ignoring non-existing provider search directory /Users/marco/Library/Application Support/io.terraform/plugins 2022-08-08T08:34:34.945+0200 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins 2022-08-08T08:34:34.945+0200 [INFO] CLI command args: []string{"plan"} 2022-08-08T08:34:34.947+0200 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config 2022-08-08T08:34:34.947+0200 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory 2022-08-08T08:34:34.947+0200 [DEBUG] New state was assigned lineage "222769df-75a4-dcd4-d5bb-bd8aac1daafe" 2022-08-08T08:34:34.947+0200 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend) 2022-08-08T08:34:34.947+0200 [TRACE] Meta.Backend: instantiated backend of type 2022-08-08T08:34:34.948+0200 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers 2022-08-08T08:34:34.948+0200 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/oracle/oci v4.86.0 for darwin_amd64 at .terraform/providers/registry.terraform.io/oracle/oci/4.86.0/darwin_amd64 2022-08-08T08:34:34.948+0200 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/oracle/oci v4.87.0 for darwin_amd64 at .terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64 2022-08-08T08:34:34.948+0200 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/oracle/oci/4.86.0/darwin_amd64 as a candidate package for registry.terraform.io/oracle/oci 4.86.0 2022-08-08T08:34:34.948+0200 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64 as a candidate package for registry.terraform.io/oracle/oci 4.87.0 2022-08-08T08:34:35.519+0200 [DEBUG] checking for provisioner in "." 2022-08-08T08:34:35.522+0200 [DEBUG] checking for provisioner in "/usr/local/bin" 2022-08-08T08:34:35.522+0200 [TRACE] Meta.Backend: backend does not support operations, so wrapping it in a local backend 2022-08-08T08:34:35.523+0200 [INFO] backend/local: starting Plan operation 2022-08-08T08:34:35.523+0200 [TRACE] backend/local: requesting state manager for workspace "default" 2022-08-08T08:34:35.523+0200 [TRACE] backend/local: state manager for workspace "default" will: - read initial snapshot from terraform.tfstate - write new snapshots to terraform.tfstate - create any backup at terraform.tfstate.backup 2022-08-08T08:34:35.523+0200 [TRACE] backend/local: requesting state lock for workspace "default" 2022-08-08T08:34:35.526+0200 [TRACE] statemgr.Filesystem: preparing to manage state snapshots at terraform.tfstate 2022-08-08T08:34:35.526+0200 [TRACE] statemgr.Filesystem: no previously-stored snapshot exists 2022-08-08T08:34:35.526+0200 [TRACE] statemgr.Filesystem: locking terraform.tfstate using fcntl flock 2022-08-08T08:34:35.526+0200 [TRACE] statemgr.Filesystem: writing lock metadata to .terraform.tfstate.lock.info 2022-08-08T08:34:35.526+0200 [TRACE] backend/local: reading remote state for workspace "default" 2022-08-08T08:34:35.526+0200 [TRACE] statemgr.Filesystem: reading latest snapshot from terraform.tfstate 2022-08-08T08:34:35.526+0200 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay 2022-08-08T08:34:35.526+0200 [TRACE] statemgr.Filesystem: read nil snapshot 2022-08-08T08:34:35.526+0200 [TRACE] backend/local: populating backend.LocalRun for current working directory 2022-08-08T08:34:35.527+0200 [TRACE] Config.VerifyDependencySelections: provider registry.terraform.io/oracle/oci has 4.87.0 to satisfy "4.87.0" 2022-08-08T08:34:35.527+0200 [TRACE] terraform.NewContext: starting 2022-08-08T08:34:35.527+0200 [TRACE] terraform.NewContext: complete 2022-08-08T08:34:35.527+0200 [TRACE] backend/local: requesting interactive input, if necessary 2022-08-08T08:34:35.527+0200 [TRACE] LoadSchemas: retrieving schema for provider type "registry.terraform.io/oracle/oci" 2022-08-08T08:34:35.527+0200 [TRACE] terraform.contextPlugins: Initializing provider "registry.terraform.io/oracle/oci" to read its schema 2022-08-08T08:34:35.527+0200 [DEBUG] created provider logger: level=trace 2022-08-08T08:34:35.527+0200 [INFO] provider: configuring client automatic mTLS 2022-08-08T08:34:35.541+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0 args=[.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0] 2022-08-08T08:34:35.560+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0 pid=14788 2022-08-08T08:34:35.561+0200 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0 2022-08-08T08:34:35.609+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: INFO 2022/08/08 08:34:35.608889 log.go:106: logger level set to: 3 2022-08-08T08:34:35.609+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: INFO 2022/08/08 08:34:35.609127 eventual_consistency.go:75: (pid=14788, gid=1) OCI_GO_SDK_EC_CONFIG: Unknown ec mode '', assuming 'inprocess' 2022-08-08T08:34:35.610+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: INFO 2022/08/08 08:34:35.609376 log.go:106: logger level set to: 3 2022-08-08T08:34:35.676+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: 2022/08/08 08:34:35 [INFO] terraform-provider-oci 4.87.0 2022-08-08T08:34:35.676+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: 2022/08/08 08:34:35 Executable runs in Terraform plugin mode by default. For additional usage options, please run with the '-help' flag. 2022-08-08T08:34:35.677+0200 [INFO] provider.terraform-provider-oci_v4.87.0: configuring server automatic mTLS: timestamp=2022-08-08T08:34:35.677+0200 2022-08-08T08:34:35.690+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: plugin address: address=/var/folders/_j/1f08n4495fjcyhddm0r408y00000gn/T/plugin3286662218 network=unix timestamp=2022-08-08T08:34:35.690+0200 2022-08-08T08:34:35.690+0200 [DEBUG] provider: using plugin: version=5 2022-08-08T08:34:35.707+0200 [TRACE] GRPCProvider: GetProviderSchema 2022-08-08T08:34:35.708+0200 [TRACE] provider.stdio: waiting for stdio data 2022-08-08T08:34:36.023+0200 [TRACE] GRPCProvider: Close 2022-08-08T08:34:36.024+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" 2022-08-08T08:34:36.030+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0 pid=14788 2022-08-08T08:34:36.030+0200 [DEBUG] provider: plugin exited 2022-08-08T08:34:36.030+0200 [TRACE] Context.Input: Prompting for provider arguments 2022-08-08T08:34:36.030+0200 [TRACE] Context.Input: Provider provider.oci declared at providers.tf:12,1-15 2022-08-08T08:34:36.030+0200 [TRACE] Context.Input: Input for provider.oci: map[string]cty.Value{} 2022-08-08T08:34:36.030+0200 [TRACE] backend/local: running validation operation 2022-08-08T08:34:36.030+0200 [DEBUG] Building and walking validate graph 2022-08-08T08:34:36.030+0200 [TRACE] Executing graph transform *terraform.ConfigTransformer 2022-08-08T08:34:36.030+0200 [TRACE] ConfigTransformer: Starting for path: 2022-08-08T08:34:36.031+0200 [TRACE] Completed graph transform *terraform.ConfigTransformer with new graph: oci_identity_compartment.test_compartment - *terraform.NodeValidatableResource ------ 2022-08-08T08:34:36.031+0200 [TRACE] Executing graph transform *terraform.RootVariableTransformer 2022-08-08T08:34:36.031+0200 [TRACE] Completed graph transform *terraform.RootVariableTransformer with new graph: oci_identity_compartment.test_compartment - *terraform.NodeValidatableResource var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.031+0200 [TRACE] Executing graph transform *terraform.ModuleVariableTransformer 2022-08-08T08:34:36.031+0200 [TRACE] Completed graph transform *terraform.ModuleVariableTransformer (no changes) 2022-08-08T08:34:36.031+0200 [TRACE] Executing graph transform *terraform.LocalTransformer 2022-08-08T08:34:36.031+0200 [TRACE] Completed graph transform *terraform.LocalTransformer (no changes) 2022-08-08T08:34:36.031+0200 [TRACE] Executing graph transform *terraform.OutputTransformer 2022-08-08T08:34:36.031+0200 [TRACE] Completed graph transform *terraform.OutputTransformer (no changes) 2022-08-08T08:34:36.031+0200 [TRACE] Executing graph transform *terraform.OrphanResourceInstanceTransformer 2022-08-08T08:34:36.031+0200 [TRACE] Completed graph transform *terraform.OrphanResourceInstanceTransformer (no changes) 2022-08-08T08:34:36.031+0200 [TRACE] Executing graph transform *terraform.StateTransformer 2022-08-08T08:34:36.031+0200 [TRACE] StateTransformer: creating nodes for deposed instance objects only 2022-08-08T08:34:36.031+0200 [TRACE] Completed graph transform *terraform.StateTransformer (no changes) 2022-08-08T08:34:36.031+0200 [TRACE] Executing graph transform *terraform.AttachStateTransformer 2022-08-08T08:34:36.031+0200 [TRACE] Completed graph transform *terraform.AttachStateTransformer (no changes) 2022-08-08T08:34:36.031+0200 [TRACE] Executing graph transform *terraform.OrphanOutputTransformer 2022-08-08T08:34:36.031+0200 [TRACE] Completed graph transform *terraform.OrphanOutputTransformer (no changes) 2022-08-08T08:34:36.031+0200 [TRACE] Executing graph transform *terraform.AttachResourceConfigTransformer 2022-08-08T08:34:36.031+0200 [TRACE] AttachResourceConfigTransformer: attaching to "oci_identity_compartment.test_compartment" (*terraform.NodeValidatableResource) config from compartment.tf:1,1-55 2022-08-08T08:34:36.031+0200 [TRACE] AttachResourceConfigTransformer: attaching provider meta configs to oci_identity_compartment.test_compartment 2022-08-08T08:34:36.031+0200 [TRACE] Completed graph transform *terraform.AttachResourceConfigTransformer (no changes) 2022-08-08T08:34:36.031+0200 [TRACE] Executing graph transform *terraform.graphTransformerMulti 2022-08-08T08:34:36.031+0200 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderConfigTransformer 2022-08-08T08:34:36.031+0200 [TRACE] ProviderConfigTransformer: attaching to "provider[\"registry.terraform.io/oracle/oci\"]" provider configuration from providers.tf:12,1-15 2022-08-08T08:34:36.031+0200 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderConfigTransformer with new graph: oci_identity_compartment.test_compartment - *terraform.NodeValidatableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.031+0200 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.MissingProviderTransformer 2022-08-08T08:34:36.031+0200 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.MissingProviderTransformer (no changes) 2022-08-08T08:34:36.031+0200 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderTransformer 2022-08-08T08:34:36.031+0200 [TRACE] ProviderTransformer: exact match for provider["registry.terraform.io/oracle/oci"] serving oci_identity_compartment.test_compartment 2022-08-08T08:34:36.031+0200 [DEBUG] ProviderTransformer: "oci_identity_compartment.test_compartment" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/oracle/oci"] 2022-08-08T08:34:36.031+0200 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderTransformer with new graph: oci_identity_compartment.test_compartment - *terraform.NodeValidatableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.031+0200 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.PruneProviderTransformer 2022-08-08T08:34:36.031+0200 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.PruneProviderTransformer (no changes) 2022-08-08T08:34:36.031+0200 [TRACE] Completed graph transform *terraform.graphTransformerMulti with new graph: oci_identity_compartment.test_compartment - *terraform.NodeValidatableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.031+0200 [TRACE] Executing graph transform *terraform.RemovedModuleTransformer 2022-08-08T08:34:36.031+0200 [TRACE] Completed graph transform *terraform.RemovedModuleTransformer (no changes) 2022-08-08T08:34:36.031+0200 [TRACE] Executing graph transform *terraform.AttachSchemaTransformer 2022-08-08T08:34:36.031+0200 [TRACE] AttachSchemaTransformer: attaching provider config schema to provider["registry.terraform.io/oracle/oci"] 2022-08-08T08:34:36.032+0200 [TRACE] AttachSchemaTransformer: attaching resource schema to oci_identity_compartment.test_compartment 2022-08-08T08:34:36.032+0200 [TRACE] Completed graph transform *terraform.AttachSchemaTransformer (no changes) 2022-08-08T08:34:36.032+0200 [TRACE] Executing graph transform *terraform.ModuleExpansionTransformer 2022-08-08T08:34:36.032+0200 [TRACE] Completed graph transform *terraform.ModuleExpansionTransformer (no changes) 2022-08-08T08:34:36.032+0200 [TRACE] Executing graph transform *terraform.ReferenceTransformer 2022-08-08T08:34:36.032+0200 [DEBUG] ReferenceTransformer: "var.compartment_tags" references: [] 2022-08-08T08:34:36.032+0200 [DEBUG] ReferenceTransformer: "var.tenancy_ocid" references: [] 2022-08-08T08:34:36.032+0200 [DEBUG] ReferenceTransformer: "var.first_level_compartment" references: [] 2022-08-08T08:34:36.032+0200 [DEBUG] ReferenceTransformer: "var.compartment_parent_id" references: [] 2022-08-08T08:34:36.032+0200 [DEBUG] ReferenceTransformer: "var.compartment_description" references: [] 2022-08-08T08:34:36.032+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/oracle/oci\"]" references: [] 2022-08-08T08:34:36.032+0200 [DEBUG] ReferenceTransformer: "oci_identity_compartment.test_compartment" references: [var.compartment_tags var.compartment_tags var.compartment_description var.first_level_compartment var.tenancy_ocid var.compartment_parent_id var.compartment_name] 2022-08-08T08:34:36.032+0200 [DEBUG] ReferenceTransformer: "var.compartment_name" references: [] 2022-08-08T08:34:36.032+0200 [TRACE] Completed graph transform *terraform.ReferenceTransformer with new graph: oci_identity_compartment.test_compartment - *terraform.NodeValidatableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.032+0200 [TRACE] Executing graph transform *terraform.AttachDependenciesTransformer 2022-08-08T08:34:36.032+0200 [TRACE] Completed graph transform *terraform.AttachDependenciesTransformer (no changes) 2022-08-08T08:34:36.032+0200 [TRACE] Executing graph transform *terraform.attachDataResourceDependsOnTransformer 2022-08-08T08:34:36.032+0200 [TRACE] Completed graph transform *terraform.attachDataResourceDependsOnTransformer (no changes) 2022-08-08T08:34:36.032+0200 [TRACE] Executing graph transform *terraform.TargetsTransformer 2022-08-08T08:34:36.032+0200 [TRACE] Completed graph transform *terraform.TargetsTransformer (no changes) 2022-08-08T08:34:36.032+0200 [TRACE] Executing graph transform *terraform.ForcedCBDTransformer 2022-08-08T08:34:36.032+0200 [TRACE] Completed graph transform *terraform.ForcedCBDTransformer (no changes) 2022-08-08T08:34:36.032+0200 [TRACE] Executing graph transform *terraform.CloseProviderTransformer 2022-08-08T08:34:36.032+0200 [TRACE] Completed graph transform *terraform.CloseProviderTransformer with new graph: oci_identity_compartment.test_compartment - *terraform.NodeValidatableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider provider["registry.terraform.io/oracle/oci"] (close) - *terraform.graphNodeCloseProvider oci_identity_compartment.test_compartment - *terraform.NodeValidatableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.032+0200 [TRACE] Executing graph transform *terraform.CloseRootModuleTransformer 2022-08-08T08:34:36.032+0200 [TRACE] Completed graph transform *terraform.CloseRootModuleTransformer with new graph: oci_identity_compartment.test_compartment - *terraform.NodeValidatableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider provider["registry.terraform.io/oracle/oci"] (close) - *terraform.graphNodeCloseProvider oci_identity_compartment.test_compartment - *terraform.NodeValidatableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider root - *terraform.nodeCloseModule provider["registry.terraform.io/oracle/oci"] (close) - *terraform.graphNodeCloseProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.032+0200 [TRACE] Executing graph transform *terraform.TransitiveReductionTransformer 2022-08-08T08:34:36.032+0200 [TRACE] Completed graph transform *terraform.TransitiveReductionTransformer with new graph: oci_identity_compartment.test_compartment - *terraform.NodeValidatableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider provider["registry.terraform.io/oracle/oci"] (close) - *terraform.graphNodeCloseProvider oci_identity_compartment.test_compartment - *terraform.NodeValidatableResource root - *terraform.nodeCloseModule provider["registry.terraform.io/oracle/oci"] (close) - *terraform.graphNodeCloseProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.033+0200 [DEBUG] Starting graph walk: walkValidate 2022-08-08T08:34:36.033+0200 [TRACE] vertex "var.compartment_description": starting visit (*terraform.NodeRootVariable) 2022-08-08T08:34:36.033+0200 [TRACE] vertex "var.compartment_description": visit complete 2022-08-08T08:34:36.033+0200 [TRACE] vertex "var.compartment_name": starting visit (*terraform.NodeRootVariable) 2022-08-08T08:34:36.033+0200 [TRACE] vertex "var.compartment_name": visit complete 2022-08-08T08:34:36.033+0200 [TRACE] vertex "var.compartment_tags": starting visit (*terraform.NodeRootVariable) 2022-08-08T08:34:36.033+0200 [TRACE] vertex "var.compartment_tags": visit complete 2022-08-08T08:34:36.033+0200 [TRACE] vertex "var.first_level_compartment": starting visit (*terraform.NodeRootVariable) 2022-08-08T08:34:36.033+0200 [TRACE] vertex "var.first_level_compartment": visit complete 2022-08-08T08:34:36.033+0200 [TRACE] vertex "var.tenancy_ocid": starting visit (*terraform.NodeRootVariable) 2022-08-08T08:34:36.033+0200 [TRACE] vertex "var.tenancy_ocid": visit complete 2022-08-08T08:34:36.033+0200 [TRACE] vertex "var.compartment_parent_id": starting visit (*terraform.NodeRootVariable) 2022-08-08T08:34:36.033+0200 [TRACE] vertex "var.compartment_parent_id": visit complete 2022-08-08T08:34:36.033+0200 [TRACE] vertex "provider[\"registry.terraform.io/oracle/oci\"]": starting visit (*terraform.NodeApplyableProvider) 2022-08-08T08:34:36.033+0200 [DEBUG] created provider logger: level=trace 2022-08-08T08:34:36.034+0200 [INFO] provider: configuring client automatic mTLS 2022-08-08T08:34:36.045+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0 args=[.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0] 2022-08-08T08:34:36.061+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0 pid=14791 2022-08-08T08:34:36.062+0200 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0 2022-08-08T08:34:36.089+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: INFO 2022/08/08 08:34:36.089060 log.go:106: logger level set to: 3 2022-08-08T08:34:36.089+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: INFO 2022/08/08 08:34:36.089300 eventual_consistency.go:75: (pid=14791, gid=1) OCI_GO_SDK_EC_CONFIG: Unknown ec mode '', assuming 'inprocess' 2022-08-08T08:34:36.089+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: INFO 2022/08/08 08:34:36.089361 log.go:106: logger level set to: 3 2022-08-08T08:34:36.144+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: 2022/08/08 08:34:36 [INFO] terraform-provider-oci 4.87.0 2022-08-08T08:34:36.144+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: 2022/08/08 08:34:36 Executable runs in Terraform plugin mode by default. For additional usage options, please run with the '-help' flag. 2022-08-08T08:34:36.144+0200 [INFO] provider.terraform-provider-oci_v4.87.0: configuring server automatic mTLS: timestamp=2022-08-08T08:34:36.144+0200 2022-08-08T08:34:36.157+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: plugin address: address=/var/folders/_j/1f08n4495fjcyhddm0r408y00000gn/T/plugin3982026919 network=unix timestamp=2022-08-08T08:34:36.157+0200 2022-08-08T08:34:36.157+0200 [DEBUG] provider: using plugin: version=5 2022-08-08T08:34:36.174+0200 [TRACE] BuiltinEvalContext: Initialized "provider[\"registry.terraform.io/oracle/oci\"]" provider for provider["registry.terraform.io/oracle/oci"] 2022-08-08T08:34:36.174+0200 [TRACE] NodeApplyableProvider: validating configuration for provider["registry.terraform.io/oracle/oci"] 2022-08-08T08:34:36.174+0200 [TRACE] buildProviderConfig for provider["registry.terraform.io/oracle/oci"]: using explicit config only 2022-08-08T08:34:36.174+0200 [TRACE] vertex "provider[\"registry.terraform.io/oracle/oci\"]": visit complete 2022-08-08T08:34:36.174+0200 [TRACE] provider.stdio: waiting for stdio data 2022-08-08T08:34:36.174+0200 [TRACE] vertex "oci_identity_compartment.test_compartment": starting visit (*terraform.NodeValidatableResource) 2022-08-08T08:34:36.174+0200 [TRACE] GRPCProvider: ValidateResourceConfig 2022-08-08T08:34:36.174+0200 [TRACE] GRPCProvider: GetProviderSchema 2022-08-08T08:34:36.511+0200 [TRACE] vertex "oci_identity_compartment.test_compartment": visit complete 2022-08-08T08:34:36.511+0200 [TRACE] vertex "provider[\"registry.terraform.io/oracle/oci\"] (close)": starting visit (*terraform.graphNodeCloseProvider) 2022-08-08T08:34:36.511+0200 [TRACE] GRPCProvider: Close 2022-08-08T08:34:36.512+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" 2022-08-08T08:34:36.518+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0 pid=14791 2022-08-08T08:34:36.518+0200 [DEBUG] provider: plugin exited 2022-08-08T08:34:36.518+0200 [TRACE] vertex "provider[\"registry.terraform.io/oracle/oci\"] (close)": visit complete 2022-08-08T08:34:36.518+0200 [TRACE] vertex "root": starting visit (*terraform.nodeCloseModule) 2022-08-08T08:34:36.519+0200 [TRACE] vertex "root": visit complete 2022-08-08T08:34:36.519+0200 [INFO] backend/local: plan calling Plan 2022-08-08T08:34:36.519+0200 [DEBUG] Building and walking plan graph for NormalMode 2022-08-08T08:34:36.519+0200 [TRACE] refactoring.ApplyMoves: No 'moved' statements to consider in this configuration 2022-08-08T08:34:36.519+0200 [TRACE] Executing graph transform *terraform.ConfigTransformer 2022-08-08T08:34:36.519+0200 [TRACE] ConfigTransformer: Starting for path: 2022-08-08T08:34:36.519+0200 [TRACE] Completed graph transform *terraform.ConfigTransformer with new graph: oci_identity_compartment.test_compartment (expand) - *terraform.nodeExpandPlannableResource ------ 2022-08-08T08:34:36.519+0200 [TRACE] Executing graph transform *terraform.RootVariableTransformer 2022-08-08T08:34:36.519+0200 [TRACE] Completed graph transform *terraform.RootVariableTransformer with new graph: oci_identity_compartment.test_compartment (expand) - *terraform.nodeExpandPlannableResource var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.519+0200 [TRACE] Executing graph transform *terraform.ModuleVariableTransformer 2022-08-08T08:34:36.519+0200 [TRACE] Completed graph transform *terraform.ModuleVariableTransformer (no changes) 2022-08-08T08:34:36.519+0200 [TRACE] Executing graph transform *terraform.LocalTransformer 2022-08-08T08:34:36.519+0200 [TRACE] Completed graph transform *terraform.LocalTransformer (no changes) 2022-08-08T08:34:36.519+0200 [TRACE] Executing graph transform *terraform.OutputTransformer 2022-08-08T08:34:36.519+0200 [TRACE] Completed graph transform *terraform.OutputTransformer (no changes) 2022-08-08T08:34:36.519+0200 [TRACE] Executing graph transform *terraform.OrphanResourceInstanceTransformer 2022-08-08T08:34:36.519+0200 [TRACE] Completed graph transform *terraform.OrphanResourceInstanceTransformer (no changes) 2022-08-08T08:34:36.519+0200 [TRACE] Executing graph transform *terraform.StateTransformer 2022-08-08T08:34:36.519+0200 [TRACE] StateTransformer: creating nodes for deposed instance objects only 2022-08-08T08:34:36.519+0200 [TRACE] Completed graph transform *terraform.StateTransformer (no changes) 2022-08-08T08:34:36.519+0200 [TRACE] Executing graph transform *terraform.AttachStateTransformer 2022-08-08T08:34:36.519+0200 [TRACE] Completed graph transform *terraform.AttachStateTransformer (no changes) 2022-08-08T08:34:36.519+0200 [TRACE] Executing graph transform *terraform.OrphanOutputTransformer 2022-08-08T08:34:36.519+0200 [TRACE] Completed graph transform *terraform.OrphanOutputTransformer (no changes) 2022-08-08T08:34:36.519+0200 [TRACE] Executing graph transform *terraform.AttachResourceConfigTransformer 2022-08-08T08:34:36.519+0200 [TRACE] AttachResourceConfigTransformer: attaching to "oci_identity_compartment.test_compartment (expand)" (*terraform.nodeExpandPlannableResource) config from compartment.tf:1,1-55 2022-08-08T08:34:36.519+0200 [TRACE] AttachResourceConfigTransformer: attaching provider meta configs to oci_identity_compartment.test_compartment (expand) 2022-08-08T08:34:36.519+0200 [TRACE] Completed graph transform *terraform.AttachResourceConfigTransformer (no changes) 2022-08-08T08:34:36.519+0200 [TRACE] Executing graph transform *terraform.graphTransformerMulti 2022-08-08T08:34:36.519+0200 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderConfigTransformer 2022-08-08T08:34:36.519+0200 [TRACE] ProviderConfigTransformer: attaching to "provider[\"registry.terraform.io/oracle/oci\"]" provider configuration from providers.tf:12,1-15 2022-08-08T08:34:36.519+0200 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderConfigTransformer with new graph: oci_identity_compartment.test_compartment (expand) - *terraform.nodeExpandPlannableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.519+0200 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.MissingProviderTransformer 2022-08-08T08:34:36.519+0200 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.MissingProviderTransformer (no changes) 2022-08-08T08:34:36.519+0200 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderTransformer 2022-08-08T08:34:36.519+0200 [TRACE] ProviderTransformer: exact match for provider["registry.terraform.io/oracle/oci"] serving oci_identity_compartment.test_compartment (expand) 2022-08-08T08:34:36.519+0200 [DEBUG] ProviderTransformer: "oci_identity_compartment.test_compartment (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/oracle/oci"] 2022-08-08T08:34:36.519+0200 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderTransformer with new graph: oci_identity_compartment.test_compartment (expand) - *terraform.nodeExpandPlannableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.520+0200 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.PruneProviderTransformer 2022-08-08T08:34:36.520+0200 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.PruneProviderTransformer (no changes) 2022-08-08T08:34:36.520+0200 [TRACE] Completed graph transform *terraform.graphTransformerMulti with new graph: oci_identity_compartment.test_compartment (expand) - *terraform.nodeExpandPlannableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.520+0200 [TRACE] Executing graph transform *terraform.RemovedModuleTransformer 2022-08-08T08:34:36.520+0200 [TRACE] Completed graph transform *terraform.RemovedModuleTransformer (no changes) 2022-08-08T08:34:36.520+0200 [TRACE] Executing graph transform *terraform.AttachSchemaTransformer 2022-08-08T08:34:36.520+0200 [TRACE] AttachSchemaTransformer: attaching provider config schema to provider["registry.terraform.io/oracle/oci"] 2022-08-08T08:34:36.520+0200 [TRACE] AttachSchemaTransformer: attaching resource schema to oci_identity_compartment.test_compartment (expand) 2022-08-08T08:34:36.520+0200 [TRACE] Completed graph transform *terraform.AttachSchemaTransformer (no changes) 2022-08-08T08:34:36.520+0200 [TRACE] Executing graph transform *terraform.ModuleExpansionTransformer 2022-08-08T08:34:36.520+0200 [TRACE] Completed graph transform *terraform.ModuleExpansionTransformer (no changes) 2022-08-08T08:34:36.520+0200 [TRACE] Executing graph transform *terraform.ReferenceTransformer 2022-08-08T08:34:36.520+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/oracle/oci\"]" references: [] 2022-08-08T08:34:36.520+0200 [DEBUG] ReferenceTransformer: "oci_identity_compartment.test_compartment (expand)" references: [var.compartment_description var.first_level_compartment var.tenancy_ocid var.compartment_parent_id var.compartment_name var.compartment_tags var.compartment_tags] 2022-08-08T08:34:36.520+0200 [DEBUG] ReferenceTransformer: "var.first_level_compartment" references: [] 2022-08-08T08:34:36.520+0200 [DEBUG] ReferenceTransformer: "var.compartment_parent_id" references: [] 2022-08-08T08:34:36.520+0200 [DEBUG] ReferenceTransformer: "var.compartment_description" references: [] 2022-08-08T08:34:36.520+0200 [DEBUG] ReferenceTransformer: "var.compartment_name" references: [] 2022-08-08T08:34:36.520+0200 [DEBUG] ReferenceTransformer: "var.compartment_tags" references: [] 2022-08-08T08:34:36.520+0200 [DEBUG] ReferenceTransformer: "var.tenancy_ocid" references: [] 2022-08-08T08:34:36.520+0200 [TRACE] Completed graph transform *terraform.ReferenceTransformer with new graph: oci_identity_compartment.test_compartment (expand) - *terraform.nodeExpandPlannableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.520+0200 [TRACE] Executing graph transform *terraform.AttachDependenciesTransformer 2022-08-08T08:34:36.520+0200 [TRACE] AttachDependenciesTransformer: oci_identity_compartment.test_compartment depends on [] 2022-08-08T08:34:36.520+0200 [TRACE] Completed graph transform *terraform.AttachDependenciesTransformer (no changes) 2022-08-08T08:34:36.520+0200 [TRACE] Executing graph transform *terraform.attachDataResourceDependsOnTransformer 2022-08-08T08:34:36.520+0200 [TRACE] Completed graph transform *terraform.attachDataResourceDependsOnTransformer (no changes) 2022-08-08T08:34:36.520+0200 [TRACE] Executing graph transform *terraform.TargetsTransformer 2022-08-08T08:34:36.520+0200 [TRACE] Completed graph transform *terraform.TargetsTransformer (no changes) 2022-08-08T08:34:36.520+0200 [TRACE] Executing graph transform *terraform.ForcedCBDTransformer 2022-08-08T08:34:36.520+0200 [TRACE] ForcedCBDTransformer: "oci_identity_compartment.test_compartment (expand)" (*terraform.nodeExpandPlannableResource) has no CBD descendent, so skipping 2022-08-08T08:34:36.521+0200 [TRACE] Completed graph transform *terraform.ForcedCBDTransformer (no changes) 2022-08-08T08:34:36.521+0200 [TRACE] Executing graph transform *terraform.CloseProviderTransformer 2022-08-08T08:34:36.521+0200 [TRACE] Completed graph transform *terraform.CloseProviderTransformer with new graph: oci_identity_compartment.test_compartment (expand) - *terraform.nodeExpandPlannableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider provider["registry.terraform.io/oracle/oci"] (close) - *terraform.graphNodeCloseProvider oci_identity_compartment.test_compartment (expand) - *terraform.nodeExpandPlannableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.521+0200 [TRACE] Executing graph transform *terraform.CloseRootModuleTransformer 2022-08-08T08:34:36.521+0200 [TRACE] Completed graph transform *terraform.CloseRootModuleTransformer with new graph: oci_identity_compartment.test_compartment (expand) - *terraform.nodeExpandPlannableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider provider["registry.terraform.io/oracle/oci"] (close) - *terraform.graphNodeCloseProvider oci_identity_compartment.test_compartment (expand) - *terraform.nodeExpandPlannableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider root - *terraform.nodeCloseModule provider["registry.terraform.io/oracle/oci"] (close) - *terraform.graphNodeCloseProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.521+0200 [TRACE] Executing graph transform *terraform.TransitiveReductionTransformer 2022-08-08T08:34:36.521+0200 [TRACE] Completed graph transform *terraform.TransitiveReductionTransformer with new graph: oci_identity_compartment.test_compartment (expand) - *terraform.nodeExpandPlannableResource provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable provider["registry.terraform.io/oracle/oci"] - *terraform.NodeApplyableProvider provider["registry.terraform.io/oracle/oci"] (close) - *terraform.graphNodeCloseProvider oci_identity_compartment.test_compartment (expand) - *terraform.nodeExpandPlannableResource root - *terraform.nodeCloseModule provider["registry.terraform.io/oracle/oci"] (close) - *terraform.graphNodeCloseProvider var.compartment_description - *terraform.NodeRootVariable var.compartment_name - *terraform.NodeRootVariable var.compartment_parent_id - *terraform.NodeRootVariable var.compartment_tags - *terraform.NodeRootVariable var.first_level_compartment - *terraform.NodeRootVariable var.tenancy_ocid - *terraform.NodeRootVariable ------ 2022-08-08T08:34:36.521+0200 [DEBUG] Starting graph walk: walkPlan 2022-08-08T08:34:36.521+0200 [TRACE] vertex "var.compartment_name": starting visit (*terraform.NodeRootVariable) 2022-08-08T08:34:36.521+0200 [TRACE] vertex "var.compartment_name": visit complete 2022-08-08T08:34:36.522+0200 [TRACE] vertex "var.compartment_tags": starting visit (*terraform.NodeRootVariable) 2022-08-08T08:34:36.522+0200 [TRACE] vertex "var.compartment_tags": visit complete 2022-08-08T08:34:36.522+0200 [TRACE] vertex "var.first_level_compartment": starting visit (*terraform.NodeRootVariable) 2022-08-08T08:34:36.522+0200 [TRACE] vertex "var.first_level_compartment": visit complete 2022-08-08T08:34:36.522+0200 [TRACE] vertex "var.tenancy_ocid": starting visit (*terraform.NodeRootVariable) 2022-08-08T08:34:36.522+0200 [TRACE] vertex "var.tenancy_ocid": visit complete 2022-08-08T08:34:36.522+0200 [TRACE] vertex "provider[\"registry.terraform.io/oracle/oci\"]": starting visit (*terraform.NodeApplyableProvider) 2022-08-08T08:34:36.522+0200 [TRACE] vertex "var.compartment_parent_id": starting visit (*terraform.NodeRootVariable) 2022-08-08T08:34:36.522+0200 [TRACE] vertex "var.compartment_parent_id": visit complete 2022-08-08T08:34:36.522+0200 [TRACE] vertex "var.compartment_description": starting visit (*terraform.NodeRootVariable) 2022-08-08T08:34:36.522+0200 [TRACE] vertex "var.compartment_description": visit complete 2022-08-08T08:34:36.522+0200 [DEBUG] created provider logger: level=trace 2022-08-08T08:34:36.522+0200 [INFO] provider: configuring client automatic mTLS 2022-08-08T08:34:36.533+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0 args=[.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0] 2022-08-08T08:34:36.549+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0 pid=14792 2022-08-08T08:34:36.550+0200 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0 2022-08-08T08:34:36.577+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: INFO 2022/08/08 08:34:36.576800 log.go:106: logger level set to: 3 2022-08-08T08:34:36.577+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: INFO 2022/08/08 08:34:36.577008 eventual_consistency.go:75: (pid=14792, gid=1) OCI_GO_SDK_EC_CONFIG: Unknown ec mode '', assuming 'inprocess' 2022-08-08T08:34:36.577+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: INFO 2022/08/08 08:34:36.577037 log.go:106: logger level set to: 3 2022-08-08T08:34:36.626+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: 2022/08/08 08:34:36 [INFO] terraform-provider-oci 4.87.0 2022-08-08T08:34:36.626+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: 2022/08/08 08:34:36 Executable runs in Terraform plugin mode by default. For additional usage options, please run with the '-help' flag. 2022-08-08T08:34:36.627+0200 [INFO] provider.terraform-provider-oci_v4.87.0: configuring server automatic mTLS: timestamp=2022-08-08T08:34:36.627+0200 2022-08-08T08:34:36.640+0200 [DEBUG] provider: using plugin: version=5 2022-08-08T08:34:36.640+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: plugin address: address=/var/folders/_j/1f08n4495fjcyhddm0r408y00000gn/T/plugin111002772 network=unix timestamp=2022-08-08T08:34:36.640+0200 2022-08-08T08:34:36.656+0200 [TRACE] BuiltinEvalContext: Initialized "provider[\"registry.terraform.io/oracle/oci\"]" provider for provider["registry.terraform.io/oracle/oci"] 2022-08-08T08:34:36.656+0200 [TRACE] NodeApplyableProvider: configuring provider["registry.terraform.io/oracle/oci"] 2022-08-08T08:34:36.656+0200 [TRACE] buildProviderConfig for provider["registry.terraform.io/oracle/oci"]: using explicit config only 2022-08-08T08:34:36.656+0200 [TRACE] GRPCProvider: GetProviderSchema 2022-08-08T08:34:36.656+0200 [TRACE] provider.stdio: waiting for stdio data 2022-08-08T08:34:36.979+0200 [TRACE] GRPCProvider: ValidateProviderConfig 2022-08-08T08:34:37.185+0200 [WARN] ValidateProviderConfig from "provider[\"registry.terraform.io/oracle/oci\"]" changed the config value, but that value is unused 2022-08-08T08:34:37.185+0200 [TRACE] GRPCProvider: ConfigureProvider 2022-08-08T08:34:37.187+0200 [DEBUG] provider.terraform-provider-oci_v4.87.0: DEBUG 2022/08/08 08:34:37.187343 provider.go:310: Configuration provided by: {[Configuration provided by file: /Users/marco/.oci/config Configuration provided by file: /Users/marco/.oraclebmc/config Configuration provided by environment variables prefixed with: TF_VAR]} 2022-08-08T08:34:37.188+0200 [ERROR] vertex "provider[\"registry.terraform.io/oracle/oci\"]" error: can not create client, bad configuration: did not find a proper configuration for private key 2022-08-08T08:34:37.188+0200 [TRACE] vertex "provider[\"registry.terraform.io/oracle/oci\"]": visit complete, with errors 2022-08-08T08:34:37.188+0200 [TRACE] dag/walk: upstream of "oci_identity_compartment.test_compartment (expand)" errored, so skipping 2022-08-08T08:34:37.188+0200 [TRACE] dag/walk: upstream of "provider[\"registry.terraform.io/oracle/oci\"] (close)" errored, so skipping 2022-08-08T08:34:37.188+0200 [TRACE] dag/walk: upstream of "root" errored, so skipping 2022-08-08T08:34:37.188+0200 [INFO] backend/local: plan operation completed β•· β”‚ Error: can not create client, bad configuration: did not find a proper configuration for private key β”‚ β”‚ with provider["registry.terraform.io/oracle/oci"], β”‚ on providers.tf line 12, in provider "oci": β”‚ 12: provider "oci" { β”‚ β•΅ 2022-08-08T08:34:37.188+0200 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info 2022-08-08T08:34:37.188+0200 [TRACE] statemgr.Filesystem: unlocking terraform.tfstate using fcntl flock 2022-08-08T08:34:37.189+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" 2022-08-08T08:34:37.199+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/oracle/oci/4.87.0/darwin_amd64/terraform-provider-oci_v4.87.0 pid=14792 2022-08-08T08:34:37.199+0200 [DEBUG] provider: plugin exited ```

Steps to Reproduce

  1. oci setup bootstrap
  2. terraform init
  3. terraform plan -var "compartment_id=ocid1.tenancy.oc1..<REDACTED>"

Important Factoids

The issue goes away if you rewrite your RSA key to use PKCS#1:

❯ openssl rsa -in /Users/marco/.oci/sessions/DEFAULT/oci_api_key.pem -out /Users/marco/.oci/sessions/DEFAULT/oci_api_key.rsa.pem -des3

Using that key in the oci provider does the trick:

...
provider "oci" {
  private_key_password = "myencpass"
  private_key_path     = pathexpand("~/.oci/sessions/DEFAULT/oci_api_key.rsa.pem")
}
...

References

This is a continuation of #512 that was closed with the upstream SDK support to PKCS#8, but somehow the provider is still not accepting it.

ravinitp commented 2 years ago

The fingerprint should match the API signing key. https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#How3 describes how to generate the API signing keys in the PEM format, and thereafter get the corresponding fingerprint.

blacksd commented 2 years ago

The fingerprint should match the API signing key. https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#How3 describes how to generate the API signing keys in the PEM format, and thereafter get the corresponding fingerprint.

I'm not sure about the point of your comment: the fingerprint does still match the key, I'm just changing its format - the key itself is the same. As a confirmation, I can just change the key path in the ~/.oci/config file to the PKCS#1 format and nothing else, and oci commands will still work + also the provider.

To the core matter - are you saying that the oci setup bootstrap generates an incompatible private key format (PKCS#8) by design? Forcing the user to create the key manually (when the oci client is supposed to ease the process) is unnecessary friction. Updating the provider to support both is the best way to provide a seamless experience.

ravinitp commented 2 years ago

Hi @blacksd , Can you please pass private key path into provider block . provider "oci" { private_key_path = "key_file=/Users/marco/.oci/sessions/DEFAULT/oci_api_key.pem", pass_phrase = "<your_pass>" } And let us know If issue still persist .

blacksd commented 2 years ago

@ravinitp I changed my provider config with:

provider "oci" {
  private_key_path     = "key_file=/Users/marco/.oci/sessions/DEFAULT/oci_api_key.pem"
  private_key_password = "myencpass"
}

but it's still failing with

β•·
β”‚ Error: can not create client, bad configuration: did not find a proper configuration for private key
β”‚ 
β”‚   with provider["registry.terraform.io/oracle/oci"],
β”‚   on providers.tf line 11, in provider "oci":
β”‚   11: provider "oci" {
β”‚ 
β•΅
kgrvamsi commented 2 years ago

+1

The issue is still there and the only way currently to make it running is by using "private_key" with the key value as string to it and run the terraform commands

winiz commented 1 year ago

I also encountered the same problem, this fix worked

+1

The issue is still there and the only way currently to make it running is by using "private_key" with the key value as string to it and run the terraform commands

blacksd commented 1 year ago

@ravinitp by the feedback here and in #512 it's pretty clear that there's something wrong with the provider. Are you going to schedule a fix for that? It's been broken for months, and this is not trivial - it's directly impacting users from day 1, a terrible user experience.

howsTricks commented 1 year ago

Echoing this, I've been using Terraform for many years and this provider authentication makes it unusable. I've spent countless hours trying to get this to run in terraform cloud with no success.

This seems to be related to https://github.com/oracle/terraform-provider-oci/issues/1584

ravinitp commented 1 year ago

Thank you for reporting the issue. We observed the affected resources are not provided in the description or it's incorrect. We request you to add it in issue description as mentioned in below format. Example: affected_resources = oci_core_instance , oci_core_instances

If it's not related to any particular resource then mention affected resource as terraform. Example: affected_resources = terraform

As this works through automation, request you to follow exact syntax.

zeusbaba commented 1 year ago

we faced similar issue, and we resolved it by regenerating keys with -aes256 --traditional 4096 type.
see snippet on how to generate those keys for use in OCI

mkdir -p ~/.oci  
openssl genrsa -out ~/.oci/oci_api_key.pem -aes256 --traditional 4096
chmod go-rwx ~/.oci/oci_api_key.pem
openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem
blacksd commented 1 year ago

@ravinitp I added the missing description. Can you please fix the labels? This is not answered. Thank you!

ncrystyan commented 5 months ago

+1 encountered same issue today. I have MacOS with Openssl 3.2.0 and spent few hours to discover this issue. Is not documented anywhere but here. OCI documentation https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#two is not mentioning anything about PKCS#1 mandatory key and by default Openssl 3.x.x will create PKCS#8. key see https://www.openssl.org/docs/man3.0/man7/migration_guide.html

It would be nice for customers not to have to troubleshoot this and just fix the compatibility issue.