Summary
When creating (or updating) a custom profile resource (ibm_scc_profile.scc_profile_instance), even though the profile_version value is set, it is not taken in consideration.
Detailed description
The profile is created (or updated), but its profile_version remains 0.0.0.
scc-provider % terraform apply -auto-approve
2024-05-30T10:55:44.530+0200 [INFO] Terraform version: 1.3.7
2024-05-30T10:55:44.530+0200 [DEBUG] using github.com/hashicorp/go-tfe v1.9.0
2024-05-30T10:55:44.530+0200 [DEBUG] using github.com/hashicorp/hcl/v2 v2.15.0
2024-05-30T10:55:44.530+0200 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2024-05-30T10:55:44.530+0200 [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
2024-05-30T10:55:44.530+0200 [DEBUG] using github.com/zclconf/go-cty v1.12.1
2024-05-30T10:55:44.530+0200 [INFO] Go runtime version: go1.19.4
2024-05-30T10:55:44.530+0200 [INFO] CLI args: []string{"terraform", "apply", "-auto-approve"}
2024-05-30T10:55:44.530+0200 [DEBUG] Attempting to open CLI config file: /Users/comete/.terraformrc
2024-05-30T10:55:44.530+0200 [INFO] Loading CLI configuration from /Users/comete/.terraformrc
2024-05-30T10:55:44.531+0200 [DEBUG] checking for credentials in "/Users/comete/.terraform.d/plugins"
2024-05-30T10:55:44.531+0200 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2024-05-30T10:55:44.531+0200 [DEBUG] will search for provider plugins in /Users/comete/.terraform.d/plugins
2024-05-30T10:55:44.531+0200 [WARN] local provider path "/Users/comete/.terraform.d/plugins/cxl/tf-test-provider/.DS_Store" contains invalid type ".DS_Store"; ignoring
2024-05-30T10:55:44.531+0200 [WARN] local provider path "/Users/comete/.terraform.d/plugins/cxl/tf-test-provider/0.0.1" contains invalid type "0.0.1"; ignoring
2024-05-30T10:55:44.531+0200 [WARN] local provider path "/Users/comete/.terraform.d/plugins/cxl/tf-test-provider/0.0.1/.DS_Store" contains invalid type "0.0.1"; ignoring
2024-05-30T10:55:44.531+0200 [WARN] local provider path "/Users/comete/.terraform.d/plugins/cxl/tf-test-provider/0.0.1/darwin_arm64" contains invalid type "0.0.1"; ignoring
2024-05-30T10:55:44.531+0200 [WARN] local provider path "/Users/comete/.terraform.d/plugins/cxl/tf-test-provider/0.0.1/darwin_arm64/tf-test-provider" contains invalid type "0.0.1"; ignoring
2024-05-30T10:55:44.531+0200 [DEBUG] ignoring non-existing provider search directory /Users/comete/Library/Application Support/io.terraform/plugins
2024-05-30T10:55:44.531+0200 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2024-05-30T10:55:44.531+0200 [INFO] CLI command args: []string{"apply", "-auto-approve"}
2024-05-30T10:55:44.532+0200 [DEBUG] New state was assigned lineage "5618f173-557c-f7d4-03a4-42ebfdd20bc5"
2024-05-30T10:55:44.604+0200 [DEBUG] checking for provisioner in "."
2024-05-30T10:55:44.605+0200 [DEBUG] checking for provisioner in "/opt/homebrew/bin"
2024-05-30T10:55:44.605+0200 [DEBUG] checking for provisioner in "/Users/comete/.terraform.d/plugins"
2024-05-30T10:55:44.606+0200 [INFO] backend/local: starting Apply operation
2024-05-30T10:55:44.606+0200 [DEBUG] created provider logger: level=debug
2024-05-30T10:55:44.606+0200 [INFO] provider: configuring client automatic mTLS
2024-05-30T10:55:44.615+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1 args=[.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1]
2024-05-30T10:55:44.620+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1 pid=16889
2024-05-30T10:55:44.620+0200 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1
2024-05-30T10:55:44.652+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: 2024-05-30 10:55:44.652192 I | IBM Cloud Provider version 1.65.1
2024-05-30T10:55:44.652+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: configuring server automatic mTLS: timestamp=2024-05-30T10:55:44.652+0200
2024-05-30T10:55:44.668+0200 [DEBUG] provider: using plugin: version=5
2024-05-30T10:55:44.668+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: plugin address: address=/var/folders/yt/_rtssplx6bx0h9d5ww8j_jvh0000gn/T/plugin2480984865 network=unix timestamp=2024-05-30T10:55:44.668+0200
2024-05-30T10:55:44.754+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-05-30T10:55:44.755+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1 pid=16889
2024-05-30T10:55:44.755+0200 [DEBUG] provider: plugin exited
2024-05-30T10:55:44.755+0200 [DEBUG] Building and walking validate graph
2024-05-30T10:55:44.755+0200 [DEBUG] ProviderTransformer: "ibm_scc_profile.scc_profile_instance" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/ibm-cloud/ibm"]
2024-05-30T10:55:44.755+0200 [DEBUG] ReferenceTransformer: "ibm_scc_profile.scc_profile_instance" references: []
2024-05-30T10:55:44.755+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/ibm-cloud/ibm\"]" references: []
2024-05-30T10:55:44.755+0200 [DEBUG] Starting graph walk: walkValidate
2024-05-30T10:55:44.756+0200 [DEBUG] created provider logger: level=debug
2024-05-30T10:55:44.756+0200 [INFO] provider: configuring client automatic mTLS
2024-05-30T10:55:44.759+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1 args=[.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1]
2024-05-30T10:55:44.763+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1 pid=16890
2024-05-30T10:55:44.763+0200 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1
2024-05-30T10:55:44.794+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: 2024-05-30 10:55:44.794434 I | IBM Cloud Provider version 1.65.1
2024-05-30T10:55:44.795+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: configuring server automatic mTLS: timestamp=2024-05-30T10:55:44.794+0200
2024-05-30T10:55:44.809+0200 [DEBUG] provider: using plugin: version=5
2024-05-30T10:55:44.809+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: plugin address: address=/var/folders/yt/_rtssplx6bx0h9d5ww8j_jvh0000gn/T/plugin837560420 network=unix timestamp=2024-05-30T10:55:44.809+0200
2024-05-30T10:55:44.905+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-05-30T10:55:44.906+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1 pid=16890
2024-05-30T10:55:44.906+0200 [DEBUG] provider: plugin exited
2024-05-30T10:55:44.906+0200 [INFO] backend/local: apply calling Plan
2024-05-30T10:55:44.906+0200 [DEBUG] Building and walking plan graph for NormalMode
2024-05-30T10:55:44.906+0200 [DEBUG] ProviderTransformer: "ibm_scc_profile.scc_profile_instance (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/ibm-cloud/ibm"]
2024-05-30T10:55:44.906+0200 [DEBUG] ReferenceTransformer: "ibm_scc_profile.scc_profile_instance (expand)" references: []
2024-05-30T10:55:44.906+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/ibm-cloud/ibm\"]" references: []
2024-05-30T10:55:44.906+0200 [DEBUG] Starting graph walk: walkPlan
2024-05-30T10:55:44.906+0200 [DEBUG] created provider logger: level=debug
2024-05-30T10:55:44.907+0200 [INFO] provider: configuring client automatic mTLS
2024-05-30T10:55:44.910+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1 args=[.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1]
2024-05-30T10:55:44.914+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1 pid=16891
2024-05-30T10:55:44.914+0200 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1
2024-05-30T10:55:44.947+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: 2024-05-30 10:55:44.947071 I | IBM Cloud Provider version 1.65.1
2024-05-30T10:55:44.947+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: configuring server automatic mTLS: timestamp=2024-05-30T10:55:44.947+0200
2024-05-30T10:55:44.962+0200 [DEBUG] provider: using plugin: version=5
2024-05-30T10:55:44.962+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: plugin address: address=/var/folders/yt/_rtssplx6bx0h9d5ww8j_jvh0000gn/T/plugin4257016830 network=unix timestamp=2024-05-30T10:55:44.962+0200
2024-05-30T10:55:45.056+0200 [WARN] ValidateProviderConfig from "provider[\"registry.terraform.io/ibm-cloud/ibm\"]" changed the config value, but that value is unused
2024-05-30T10:55:45.057+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: Configuring IBM Cloud Session with API key: timestamp=2024-05-30T10:55:45.057+0200
2024-05-30T10:55:45.057+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: Configured Region: ca-tor: timestamp=2024-05-30T10:55:45.057+0200
2024-05-30T10:55:45.432+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: Configuring SoftLayer Session with token from IBM Cloud Session: timestamp=2024-05-30T10:55:45.432+0200
2024-05-30T10:55:45.436+0200 [DEBUG] Resource instance state not found for node "ibm_scc_profile.scc_profile_instance", instance ibm_scc_profile.scc_profile_instance
2024-05-30T10:55:45.436+0200 [DEBUG] ReferenceTransformer: "ibm_scc_profile.scc_profile_instance" references: []
2024-05-30T10:55:45.437+0200 [DEBUG] refresh: ibm_scc_profile.scc_profile_instance: no state, so not refreshing
2024-05-30T10:55:45.447+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-05-30T10:55:45.451+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1 pid=16891
2024-05-30T10:55:45.451+0200 [DEBUG] provider: plugin exited
2024-05-30T10:55:45.451+0200 [DEBUG] building apply graph to check for errors
2024-05-30T10:55:45.452+0200 [DEBUG] Resource state not found for node "ibm_scc_profile.scc_profile_instance", instance ibm_scc_profile.scc_profile_instance
2024-05-30T10:55:45.452+0200 [DEBUG] ProviderTransformer: "ibm_scc_profile.scc_profile_instance (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/ibm-cloud/ibm"]
2024-05-30T10:55:45.452+0200 [DEBUG] ProviderTransformer: "ibm_scc_profile.scc_profile_instance" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/ibm-cloud/ibm"]
2024-05-30T10:55:45.452+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/ibm-cloud/ibm\"]" references: []
2024-05-30T10:55:45.452+0200 [DEBUG] ReferenceTransformer: "ibm_scc_profile.scc_profile_instance (expand)" references: []
2024-05-30T10:55:45.452+0200 [DEBUG] ReferenceTransformer: "ibm_scc_profile.scc_profile_instance" references: []
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:
# ibm_scc_profile.scc_profile_instance will be created
+ resource "ibm_scc_profile" "scc_profile_instance" {
+ attachments_count = (known after apply)
+ control_parents_count = (known after apply)
+ controls_count = (known after apply)
+ created_by = (known after apply)
+ created_on = (known after apply)
+ hierarchy_enabled = (known after apply)
+ id = (known after apply)
+ instance_id = "..."
+ latest = (known after apply)
+ profile_description = "Test TF"
+ profile_id = (known after apply)
+ profile_name = "test_tf"
+ profile_type = "custom"
+ profile_version = "1.2.3"
+ updated_by = (known after apply)
+ updated_on = (known after apply)
+ version_group_label = (known after apply)
+ controls {
+ control_category = (known after apply)
+ control_description = (known after apply)
+ control_docs = (known after apply)
+ control_id = "69d09c01-c14d-4bbb-821e-52fed6cd4bf0"
+ control_library_id = "4b70781c-c9eb-42fb-a78e-920d4ae48305"
+ control_library_version = (known after apply)
+ control_name = (known after apply)
+ control_parent = (known after apply)
+ control_requirement = (known after apply)
+ control_specifications = (known after apply)
+ control_specifications_count = (known after apply)
}
+ controls {
+ control_category = (known after apply)
+ control_description = (known after apply)
+ control_docs = (known after apply)
+ control_id = "671718f9-16ca-49ff-84d0-0de9a09d46fc"
+ control_library_id = "4b70781c-c9eb-42fb-a78e-920d4ae48305"
+ control_library_version = (known after apply)
+ control_name = (known after apply)
+ control_parent = (known after apply)
+ control_requirement = (known after apply)
+ control_specifications = (known after apply)
+ control_specifications_count = (known after apply)
}
+ controls {
+ control_category = (known after apply)
+ control_description = (known after apply)
+ control_docs = (known after apply)
+ control_id = "5d004f98-2a4d-4899-a895-016c617eb08c"
+ control_library_id = "4b70781c-c9eb-42fb-a78e-920d4ae48305"
+ control_library_version = (known after apply)
+ control_name = (known after apply)
+ control_parent = (known after apply)
+ control_requirement = (known after apply)
+ control_specifications = (known after apply)
+ control_specifications_count = (known after apply)
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
2024-05-30T10:55:45.454+0200 [INFO] backend/local: apply calling Apply
2024-05-30T10:55:45.454+0200 [DEBUG] Building and walking apply graph for NormalMode plan
2024-05-30T10:55:45.454+0200 [DEBUG] Resource state not found for node "ibm_scc_profile.scc_profile_instance", instance ibm_scc_profile.scc_profile_instance
2024-05-30T10:55:45.455+0200 [DEBUG] ProviderTransformer: "ibm_scc_profile.scc_profile_instance (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/ibm-cloud/ibm"]
2024-05-30T10:55:45.455+0200 [DEBUG] ProviderTransformer: "ibm_scc_profile.scc_profile_instance" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/ibm-cloud/ibm"]
2024-05-30T10:55:45.455+0200 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/ibm-cloud/ibm\"]" references: []
2024-05-30T10:55:45.455+0200 [DEBUG] ReferenceTransformer: "ibm_scc_profile.scc_profile_instance (expand)" references: []
2024-05-30T10:55:45.455+0200 [DEBUG] ReferenceTransformer: "ibm_scc_profile.scc_profile_instance" references: []
2024-05-30T10:55:45.455+0200 [DEBUG] Starting graph walk: walkApply
2024-05-30T10:55:45.455+0200 [DEBUG] created provider logger: level=debug
2024-05-30T10:55:45.456+0200 [INFO] provider: configuring client automatic mTLS
2024-05-30T10:55:45.462+0200 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1 args=[.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1]
2024-05-30T10:55:45.467+0200 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1 pid=16892
2024-05-30T10:55:45.467+0200 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1
2024-05-30T10:55:45.505+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: 2024-05-30 10:55:45.505745 I | IBM Cloud Provider version 1.65.1
2024-05-30T10:55:45.506+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: configuring server automatic mTLS: timestamp=2024-05-30T10:55:45.506+0200
2024-05-30T10:55:45.523+0200 [DEBUG] provider: using plugin: version=5
2024-05-30T10:55:45.523+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: plugin address: address=/var/folders/yt/_rtssplx6bx0h9d5ww8j_jvh0000gn/T/plugin4118554943 network=unix timestamp=2024-05-30T10:55:45.523+0200
2024-05-30T10:55:45.616+0200 [WARN] ValidateProviderConfig from "provider[\"registry.terraform.io/ibm-cloud/ibm\"]" changed the config value, but that value is unused
2024-05-30T10:55:45.617+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: Configuring IBM Cloud Session with API key: timestamp=2024-05-30T10:55:45.617+0200
2024-05-30T10:55:45.617+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: Configured Region: ca-tor: timestamp=2024-05-30T10:55:45.617+0200
2024-05-30T10:55:46.079+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: Configuring SoftLayer Session with token from IBM Cloud Session: timestamp=2024-05-30T10:55:46.078+0200
ibm_scc_profile.scc_profile_instance: Creating...
2024-05-30T10:55:46.084+0200 [INFO] Starting apply for ibm_scc_profile.scc_profile_instance
2024-05-30T10:55:46.084+0200 [DEBUG] ibm_scc_profile.scc_profile_instance: applying the planned Create change
2024-05-30T10:55:46.085+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: setting computed for "controls.0.control_docs" from ComputedKeys: timestamp=2024-05-30T10:55:46.085+0200
2024-05-30T10:55:46.085+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: setting computed for "controls.0.control_specifications" from ComputedKeys: timestamp=2024-05-30T10:55:46.085+0200
2024-05-30T10:55:46.085+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: setting computed for "controls.1.control_docs" from ComputedKeys: timestamp=2024-05-30T10:55:46.085+0200
2024-05-30T10:55:46.085+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: setting computed for "controls.1.control_specifications" from ComputedKeys: timestamp=2024-05-30T10:55:46.085+0200
2024-05-30T10:55:46.085+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: setting computed for "controls.2.control_docs" from ComputedKeys: timestamp=2024-05-30T10:55:46.085+0200
2024-05-30T10:55:46.085+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: setting computed for "controls.2.control_specifications" from ComputedKeys: timestamp=2024-05-30T10:55:46.085+0200
2024-05-30T10:55:46.085+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: setting computed for "controls.0.control_docs" from ComputedKeys: timestamp=2024-05-30T10:55:46.085+0200
2024-05-30T10:55:46.085+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: setting computed for "controls.0.control_specifications" from ComputedKeys: timestamp=2024-05-30T10:55:46.085+0200
2024-05-30T10:55:46.085+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: setting computed for "controls.1.control_docs" from ComputedKeys: timestamp=2024-05-30T10:55:46.085+0200
2024-05-30T10:55:46.085+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: setting computed for "controls.1.control_specifications" from ComputedKeys: timestamp=2024-05-30T10:55:46.085+0200
2024-05-30T10:55:46.085+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: setting computed for "controls.2.control_docs" from ComputedKeys: timestamp=2024-05-30T10:55:46.085+0200
2024-05-30T10:55:46.085+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: setting computed for "controls.2.control_specifications" from ComputedKeys: timestamp=2024-05-30T10:55:46.085+0200
2024-05-30T10:55:46.085+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: Starting resourceIbmSccProfileCreate: timestamp=2024-05-30T10:55:46.085+0200
2024-05-30T10:55:46.086+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: 2024/05/30 10:55:46 [Debug] Request:
POST /identity/token HTTP/1.1
Host: iam.cloud.ibm.com
User-Agent: ibm-go-sdk-core/iam-authenticator-5.17.0 (arch=arm64; os=darwin; go.version=go1.19.13)
Content-Length: 135
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip
apikey=[redacted]&grant_type=urn%3Aibm%3Aparams%3Aoauth%3Agrant-type%3Aapikey&response_type=cloud_iam: timestamp=2024-05-30T10:55:46.086+0200
2024-05-30T10:55:46.086+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: 2024/05/30 10:55:46 [Debug] Invoking IAM 'get token' operation: https://iam.cloud.ibm.com/identity/token: timestamp=2024-05-30T10:55:46.086+0200
2024-05-30T10:55:46.542+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: 2024/05/30 10:55:46 [Debug] Returned from IAM 'get token' operation, received status code 200: timestamp=2024-05-30T10:55:46.542+0200
2024-05-30T10:55:46.545+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: 2024/05/30 10:55:46 [Debug] Response:
HTTP/1.1 200 OK
Akamai-Grn: 0.c7e24817.1717059346.1dc20a84
Cache-Control: no-cache, no-store, must-revalidate
Connection: keep-alive
Content-Language: en-US
Content-Type: application/json
Date: Thu, 30 May 2024 08:55:46 GMT
Expires: 0
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; includeSubDomains
Transaction-Id: NWRodjk-bc7c3ed3f0c740bfab4b58c91a24efc2
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Correlation-Id: NWRodjk-bc7c3ed3f0c740bfab4b58c91a24efc2
X-Proxy-Upstream-Service-Time: 178
X-Request-Id: ed3d0a21-d267-4331-8bc3-650cd4fdb783
{"access_token":"[redacted]","refresh_token":"[redacted]","ims_user_id":10037094,"token_type":"Bearer","expires_in":3600,"expiration":1717062943,"scope":"ibm openid"}: timestamp=2024-05-30T10:55:46.545+0200
2024-05-30T10:55:46.546+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: 2024/05/30 10:55:46 [Debug] Request:
POST /instances/.../v3/profiles HTTP/1.1
Host: ca-tor.compliance.cloud.ibm.com
User-Agent: scc-go-sdk/5.1.5 (lang=go; arch=arm64; os=darwin; go.version=go1.19.13)
Content-Length: 462
Accept: application/json
Authorization: [redacted]
Content-Type: application/json
X-Original-User-Agent: terraform-provider-ibm/1.65.1
Accept-Encoding: gzip
{"controls":[{"control_library_id":"4b70781c-c9eb-42fb-a78e-920d4ae48305","control_id":"69d09c01-c14d-4bbb-821e-52fed6cd4bf0"},{"control_library_id":"4b70781c-c9eb-42fb-a78e-920d4ae48305","control_id":"671718f9-16ca-49ff-84d0-0de9a09d46fc"},{"control_library_id":"4b70781c-c9eb-42fb-a78e-920d4ae48305","control_id":"5d004f98-2a4d-4899-a895-016c617eb08c"}],"default_parameters":[],"profile_description":"Test TF","profile_name":"test_tf","profile_type":"custom"}: timestamp=2024-05-30T10:55:46.546+0200
2024-05-30T10:55:46.546+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: 2024/05/30 10:55:46 [DEBUG] POST https://ca-tor.compliance.cloud.ibm.com/instances/.../v3/profiles: timestamp=2024-05-30T10:55:46.546+0200
2024-05-30T10:55:47.828+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: 2024/05/30 10:55:47 [Debug] Response:
HTTP/2.0 201 Created
Connection: close
Cache-Control: no-store
Cf-Cache-Status: DYNAMIC
Cf-Ray: 88bd81d5784a9ba4-FRA
Content-Type: application/json
Date: Thu, 30 May 2024 08:55:47 GMT
Server: cloudflare
Strict-Transport-Security: max-age=31536000; includeSubDomains
Transaction-Id: c4b9016a-710f-40a0-b421-ec4d3a1d22af
X-Content-Type-Options: nosniff
X-Correlation-Id: 42be178b-306c-4fdb-a9dd-3d0881c11163
X-Envoy-Upstream-Service-Time: 951
X-Request-Id: 314261d6-5984-4975-8dcc-5041b810b4be
{"id":"375c3c63-15f0-4ef1-a786-2fc8fd8bc0ba","profile_name":"test_tf","profile_description":"Test TF","profile_type":"custom","profile_version":"0.0.0","version_group_label":"a95de360-6f8c-445a-a401-797e86d01ae0","instance_id":"...","latest":true,"hierarchy_enabled":true,"created_by":"IBMid-0600029752","created_on":"2024-05-30T08:55:47Z","updated_by":"IBMid-0600029752","updated_on":"2024-05-30T08:55:47Z","controls_count":1,"control_parents_count":2,"attachments_count":0,"controls":[{"control_library_id":"4b70781c-c9eb-42fb-a78e-920d4ae48305","control_id":"69d09c01-c14d-4bbb-821e-52fed6cd4bf0","control_library_version":"1.6.0","control_name":"AC-1(a)","control_description":"The organization: Develops, documents, and disseminates to [organization-defined personnel or roles]: (1) An access control policy that addresses purpose, scope, roles, responsibilities, management commitment, coordination among organizational entities, and compliance; and (2) Procedures to facilitate the implementation of the access control policy and associated access controls; and","control_category":"Access Control","control_parent":"AC-1","control_path":"AC/AC-1/AC-1(a)","control_requirement":true,"control_docs":{"control_docs_id":"ac-1","control_docs_type":"ibm-cloud"},"control_specifications_count":0,"control_specifications":[]},{"control_library_id":"4b70781c-c9eb-42fb-a78e-920d4ae48305","control_id":"671718f9-16ca-49ff-84d0-0de9a09d46fc","control_library_version":"1.6.0","control_name":"AC-1","control_description":"Access Control Policy and Procedures","control_category":"Access Control","control_parent":"AC","control_path":"AC/AC-1","control_requirement":false,"control_docs":{"control_docs_id":"ac-1","control_docs_type":"ibm-cloud"},"control_specifications_count":0,"control_specifications":[]},{"control_library_id":"4b70781c-c9eb-42fb-a78e-920d4ae48305","control_id":"5d004f98-2a4d-4899-a895-016c617eb08c","control_library_version":"1.6.0","control_name":"AC","control_description":"Access Control","control_category":"Access Control","control_parent":"","control_path":"AC","control_requirement":false,"control_docs":{"control_docs_id":"ac-1","control_docs_type":"ibm-cloud"},"control_specifications_count":0,"control_specifications":[]}],"default_parameters":[]}: timestamp=2024-05-30T10:55:47.828+0200
2024-05-30T10:55:47.828+0200 [DEBUG] provider.terraform-provider-ibm_v1.65.1: Starting resourceIbmSccProfileRead: timestamp=2024-05-30T10:55:47.828+0200
2024-05-30T10:55:47.833+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: 2024/05/30 10:55:47 [Debug] Request:
GET /instances/.../v3/profiles/375c3c63-15f0-4ef1-a786-2fc8fd8bc0ba HTTP/1.1
Host: ca-tor.compliance.cloud.ibm.com
User-Agent: scc-go-sdk/5.1.5 (lang=go; arch=arm64; os=darwin; go.version=go1.19.13)
Accept: application/json
Authorization: [redacted]
X-Original-User-Agent: terraform-provider-ibm/1.65.1
Accept-Encoding: gzip
: timestamp=2024-05-30T10:55:47.830+0200
2024-05-30T10:55:47.833+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: 2024/05/30 10:55:47 [DEBUG] GET https://ca-tor.compliance.cloud.ibm.com/instances/.../v3/profiles/375c3c63-15f0-4ef1-a786-2fc8fd8bc0ba: timestamp=2024-05-30T10:55:47.833+0200
2024-05-30T10:55:48.480+0200 [INFO] provider.terraform-provider-ibm_v1.65.1: 2024/05/30 10:55:48 [Debug] Response:
HTTP/2.0 200 OK
Cache-Control: no-store
Cf-Cache-Status: DYNAMIC
Cf-Ray: 88bd81dc6a1d9ba4-FRA
Content-Type: application/json; charset=utf-8
Date: Thu, 30 May 2024 08:55:48 GMT
Server: cloudflare
Strict-Transport-Security: max-age=31536000; includeSubDomains
Transaction-Id: 7945f921-838b-4e99-bb73-5e0767f4796b
X-Content-Type-Options: nosniff
X-Correlation-Id: 4ef0c719-e5e9-4089-a3c9-58f34c441345
X-Envoy-Upstream-Service-Time: 491
X-Request-Id: 8b5db27f-5a75-4058-a888-7e33aa3b6e07
{"id":"375c3c63-15f0-4ef1-a786-2fc8fd8bc0ba","profile_name":"test_tf","profile_description":"Test TF","profile_type":"custom","profile_version":"0.0.0","version_group_label":"a95de360-6f8c-445a-a401-797e86d01ae0","instance_id":"...","latest":true,"hierarchy_enabled":true,"created_by":"IBMid-0600029752","created_on":"2024-05-30T08:55:47Z","updated_by":"IBMid-0600029752","updated_on":"2024-05-30T08:55:47Z","controls_count":1,"control_parents_count":2,"attachments_count":0,"controls":[{"control_library_id":"4b70781c-c9eb-42fb-a78e-920d4ae48305","control_id":"69d09c01-c14d-4bbb-821e-52fed6cd4bf0","control_library_version":"1.6.0","control_name":"AC-1(a)","control_description":"The organization: Develops, documents, and disseminates to [organization-defined personnel or roles]: (1) An access control policy that addresses purpose, scope, roles, responsibilities, management commitment, coordination among organizational entities, and compliance; and (2) Procedures to facilitate the implementation of the access control policy and associated access controls; and","control_category":"Access Control","control_parent":"AC-1","control_path":"AC/AC-1/AC-1(a)","control_requirement":true,"control_docs":{"control_docs_id":"ac-1","control_docs_type":"ibm-cloud"},"control_specifications_count":0,"control_specifications":[]},{"control_library_id":"4b70781c-c9eb-42fb-a78e-920d4ae48305","control_id":"671718f9-16ca-49ff-84d0-0de9a09d46fc","control_library_version":"1.6.0","control_name":"AC-1","control_description":"Access Control Policy and Procedures","control_category":"Access Control","control_parent":"AC","control_path":"AC/AC-1","control_requirement":false,"control_docs":{"control_docs_id":"ac-1","control_docs_type":"ibm-cloud"},"control_specifications_count":0,"control_specifications":[]},{"control_library_id":"4b70781c-c9eb-42fb-a78e-920d4ae48305","control_id":"5d004f98-2a4d-4899-a895-016c617eb08c","control_library_version":"1.6.0","control_name":"AC","control_description":"Access Control","control_category":"Access Control","control_parent":"","control_path":"AC","control_requirement":false,"control_docs":{"control_docs_id":"ac-1","control_docs_type":"ibm-cloud"},"control_specifications_count":0,"control_specifications":[]}],"default_parameters":[]}: timestamp=2024-05-30T10:55:48.478+0200
2024-05-30T10:55:48.484+0200 [WARN] Provider "provider[\"registry.terraform.io/ibm-cloud/ibm\"]" produced an unexpected new value for ibm_scc_profile.scc_profile_instance, but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .profile_version: was cty.StringVal("1.2.3"), but now cty.StringVal("0.0.0")
ibm_scc_profile.scc_profile_instance: Creation complete after 2s [id=.../375c3c63-15f0-4ef1-a786-2fc8fd8bc0ba]
2024-05-30T10:55:48.513+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-05-30T10:55:48.519+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.65.1/darwin_arm64/terraform-provider-ibm_v1.65.1 pid=16892
2024-05-30T10:55:48.519+0200 [DEBUG] provider: plugin exited
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Now if I attempt to plan:
scc-provider % terraform plan
ibm_scc_profile.scc_profile_instance: Refreshing state... [id=c665ce56-5732-4a37-883b-98e2f51fef80/375c3c63-15f0-4ef1-a786-2fc8fd8bc0ba]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
~ update in-place
Terraform will perform the following actions:
# ibm_scc_profile.scc_profile_instance will be updated in-place
~ resource "ibm_scc_profile" "scc_profile_instance" {
id = "c665ce56-5732-4a37-883b-98e2f51fef80/375c3c63-15f0-4ef1-a786-2fc8fd8bc0ba"
~ profile_version = "0.0.0" -> "1.2.3"
# (15 unchanged attributes hidden)
# (3 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
Note: when checking on IBM Cloud console, the profile_version of the created profile is 0.0.0.
Summary When creating (or updating) a custom profile resource (
ibm_scc_profile.scc_profile_instance
), even though theprofile_version
value is set, it is not taken in consideration.Detailed description The profile is created (or updated), but its
profile_version
remains0.0.0
.Terraform provider version used v1.65.1
Examples of failing template
Leads to:
Now if I attempt to plan:
Note: when checking on IBM Cloud console, the
profile_version
of the created profile is0.0.0
.