pingidentity / terraform-provider-pingone

Terraform PingOne provider
https://registry.terraform.io/providers/pingidentity/pingone/
Mozilla Public License 2.0
13 stars 5 forks source link

`pingone_environment` creates demo resources #631

Open LubosMagda opened 10 months ago

LubosMagda commented 10 months ago

Community Note

PingOne Terraform provider Version

0.22.0

Terraform Version

1.6.3

Affected Resource(s)

Affects multiple resources.

Terraform Configuration Files

terraform {
  required_providers {
    pingone = {
      source  = "pingidentity/pingone"
      version = ">= 0.22"
    }
  }
}

resource "pingone_environment" "pingone_mfa_environment" {
  name        = "Test Env"
  region      = "AsiaPacific"
  license_id  = "***"

  service {
    type = "MFA"
  }
}

Debug Output

> TF_LOG=DEBUG terraform apply
2023-11-04T20:23:12.957+1100 [INFO]  Terraform version: 1.6.3
2023-11-04T20:23:12.957+1100 [DEBUG] using github.com/hashicorp/go-tfe v1.36.0
2023-11-04T20:23:12.957+1100 [DEBUG] using github.com/hashicorp/hcl/v2 v2.19.1
2023-11-04T20:23:12.957+1100 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2023-11-04T20:23:12.957+1100 [DEBUG] using github.com/zclconf/go-cty v1.14.1
2023-11-04T20:23:12.957+1100 [INFO]  Go runtime version: go1.21.3
2023-11-04T20:23:12.957+1100 [INFO]  CLI args: []string{"terraform", "apply", "poc.plan"}
2023-11-04T20:23:12.957+1100 [DEBUG] Attempting to open CLI config file: /Users/lubos.magda/.terraformrc
2023-11-04T20:23:12.957+1100 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2023-11-04T20:23:12.958+1100 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2023-11-04T20:23:12.958+1100 [DEBUG] ignoring non-existing provider search directory /Users/lubos.magda/.terraform.d/plugins
2023-11-04T20:23:12.958+1100 [DEBUG] ignoring non-existing provider search directory /Users/lubos.magda/Library/Application Support/io.terraform/plugins
2023-11-04T20:23:12.958+1100 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2023-11-04T20:23:12.958+1100 [INFO]  CLI command args: []string{"apply", "poc.plan"}
2023-11-04T20:23:12.990+1100 [DEBUG] checking for provisioner in "."
2023-11-04T20:23:12.991+1100 [DEBUG] checking for provisioner in "/opt/homebrew/bin"
2023-11-04T20:23:12.992+1100 [INFO]  backend/local: starting Apply operation
2023-11-04T20:23:12.995+1100 [DEBUG] created provider logger: level=debug
2023-11-04T20:23:12.995+1100 [INFO]  provider: configuring client automatic mTLS
2023-11-04T20:23:13.002+1100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/pingidentity/pingone/0.22.0/darwin_arm64/terraform-provider-pingone_v0.22.0 args=[".terraform/providers/registry.terraform.io/pingidentity/pingone/0.22.0/darwin_arm64/terraform-provider-pingone_v0.22.0"]
2023-11-04T20:23:13.004+1100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/pingidentity/pingone/0.22.0/darwin_arm64/terraform-provider-pingone_v0.22.0 pid=53439
2023-11-04T20:23:13.004+1100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/pingidentity/pingone/0.22.0/darwin_arm64/terraform-provider-pingone_v0.22.0
2023-11-04T20:23:13.013+1100 [INFO]  provider.terraform-provider-pingone_v0.22.0: configuring server automatic mTLS: timestamp="2023-11-04T20:23:13.013+1100"
2023-11-04T20:23:13.018+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: plugin address: network=unix address=/var/folders/x_/7cqqtwy93hg0c365_kdrgykw0000gq/T/plugin2038166969 timestamp="2023-11-04T20:23:13.018+1100"
2023-11-04T20:23:13.018+1100 [DEBUG] provider: using plugin: version=6
2023-11-04T20:23:13.042+1100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-11-04T20:23:13.044+1100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/pingidentity/pingone/0.22.0/darwin_arm64/terraform-provider-pingone_v0.22.0 pid=53439
2023-11-04T20:23:13.045+1100 [DEBUG] provider: plugin exited
2023-11-04T20:23:13.045+1100 [INFO]  backend/local: apply calling Apply
2023-11-04T20:23:13.045+1100 [DEBUG] Building and walking apply graph for NormalMode plan
2023-11-04T20:23:13.045+1100 [DEBUG] Resource state not found for node "module.pingone_environment.pingone_environment.pingone_mfa_environment", instance module.pingone_environment.pingone_environment.pingone_mfa_environment
2023-11-04T20:23:13.045+1100 [DEBUG] ProviderTransformer: "module.pingone_environment.pingone_environment.pingone_mfa_environment (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/pingidentity/pingone"]
2023-11-04T20:23:13.045+1100 [DEBUG] ProviderTransformer: "module.pingone_environment.pingone_environment.pingone_mfa_environment" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/pingidentity/pingone"]
2023-11-04T20:23:13.045+1100 [DEBUG] ReferenceTransformer: "var.env" references: []
2023-11-04T20:23:13.045+1100 [DEBUG] ReferenceTransformer: "local.vars (expand)" references: [var.env]
2023-11-04T20:23:13.045+1100 [DEBUG] ReferenceTransformer: "module.pingone_environment (expand)" references: []
2023-11-04T20:23:13.045+1100 [DEBUG] ReferenceTransformer: "module.pingone_environment.pingone_environment.pingone_mfa_environment (expand)" references: []
2023-11-04T20:23:13.045+1100 [DEBUG] ReferenceTransformer: "local.config (expand)" references: [local.vars (expand)]
2023-11-04T20:23:13.045+1100 [DEBUG] ReferenceTransformer: "module.pingone_environment.pingone_environment.pingone_mfa_environment" references: []
2023-11-04T20:23:13.045+1100 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/pingidentity/pingone\"]" references: [local.config (expand) local.config (expand)]
2023-11-04T20:23:13.045+1100 [DEBUG] ReferenceTransformer: "module.pingone_environment (close)" references: []
2023-11-04T20:23:13.045+1100 [DEBUG] ReferenceTransformer: "var.local" references: []
2023-11-04T20:23:13.046+1100 [DEBUG] Starting graph walk: walkApply
2023-11-04T20:23:13.046+1100 [DEBUG] created provider logger: level=debug
2023-11-04T20:23:13.046+1100 [INFO]  provider: configuring client automatic mTLS
2023-11-04T20:23:13.049+1100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/pingidentity/pingone/0.22.0/darwin_arm64/terraform-provider-pingone_v0.22.0 args=[".terraform/providers/registry.terraform.io/pingidentity/pingone/0.22.0/darwin_arm64/terraform-provider-pingone_v0.22.0"]
2023-11-04T20:23:13.052+1100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/pingidentity/pingone/0.22.0/darwin_arm64/terraform-provider-pingone_v0.22.0 pid=53440
2023-11-04T20:23:13.052+1100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/pingidentity/pingone/0.22.0/darwin_arm64/terraform-provider-pingone_v0.22.0
2023-11-04T20:23:13.060+1100 [INFO]  provider.terraform-provider-pingone_v0.22.0: configuring server automatic mTLS: timestamp="2023-11-04T20:23:13.059+1100"
2023-11-04T20:23:13.065+1100 [DEBUG] provider: using plugin: version=6
2023-11-04T20:23:13.065+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: plugin address: address=/var/folders/x_/7cqqtwy93hg0c365_kdrgykw0000gq/T/plugin2699696306 network=unix timestamp="2023-11-04T20:23:13.065+1100"
2023-11-04T20:23:13.191+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: [v6] Provider configure start: tf_provider_addr=registry.terraform.io/pingidentity/pingone @caller=github.com/pingidentity/terraform-provider-pingone/internal/provider/framework/provider.go:182 @module=pingone tf_mux_provider="*proto6server.Server" tf_req_id=e0ea777f-a52c-4c82-f049-5109e3bc656a tf_rpc=ConfigureProvider timestamp="2023-11-04T20:23:13.191+1100"
2023-11-04T20:23:13.191+1100 [INFO]  provider.terraform-provider-pingone_v0.22.0: [v6] Provider setting defaults..: @caller=github.com/pingidentity/terraform-provider-pingone/internal/provider/framework/provider.go:191 tf_mux_provider="*proto6server.Server" @module=pingone tf_provider_addr=registry.terraform.io/pingidentity/pingone tf_req_id=e0ea777f-a52c-4c82-f049-5109e3bc656a tf_rpc=ConfigureProvider timestamp="2023-11-04T20:23:13.191+1100"
2023-11-04T20:23:13.246+1100 [INFO]  provider.terraform-provider-pingone_v0.22.0: [v6] Provider initialized client: @module=pingone tf_provider_addr=registry.terraform.io/pingidentity/pingone tf_req_id=e0ea777f-a52c-4c82-f049-5109e3bc656a @caller=github.com/pingidentity/terraform-provider-pingone/internal/provider/framework/provider.go:253 tf_mux_provider="*proto6server.Server" tf_rpc=ConfigureProvider timestamp="2023-11-04T20:23:13.245+1100"
2023-11-04T20:23:13.251+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: Marking Computed attributes with null configuration values as unknown (known after apply) in the plan to prevent potential Terraform errors: @module=sdk.framework tf_provider_addr=registry.terraform.io/pingidentity/pingone tf_req_id=fb2a607e-fb8f-a976-2e7b-656ad414f1cf @caller=github.com/hashicorp/terraform-plugin-framework@v1.4.1/internal/fwserver/server_planresourcechange.go:195 tf_mux_provider="*proto6server.Server" tf_resource_type=pingone_environment tf_rpc=PlanResourceChange timestamp="2023-11-04T20:23:13.251+1100"
2023-11-04T20:23:13.251+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: marking computed attribute that is null in the config as unknown: @caller=github.com/hashicorp/terraform-plugin-framework@v1.4.1/internal/fwserver/server_planresourcechange.go:399 tf_mux_provider="*proto6server.Server" tf_provider_addr=registry.terraform.io/pingidentity/pingone tf_req_id=fb2a607e-fb8f-a976-2e7b-656ad414f1cf tf_rpc=PlanResourceChange @module=sdk.framework tf_attribute_path="AttributeName(\"id\")" tf_resource_type=pingone_environment timestamp="2023-11-04T20:23:13.251+1100"
2023-11-04T20:23:13.251+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: marking computed attribute that is null in the config as unknown: tf_attribute_path="AttributeName(\"organization_id\")" tf_resource_type=pingone_environment tf_rpc=PlanResourceChange @caller=github.com/hashicorp/terraform-plugin-framework@v1.4.1/internal/fwserver/server_planresourcechange.go:399 tf_mux_provider="*proto6server.Server" tf_provider_addr=registry.terraform.io/pingidentity/pingone tf_req_id=fb2a607e-fb8f-a976-2e7b-656ad414f1cf @module=sdk.framework timestamp="2023-11-04T20:23:13.251+1100"
2023-11-04T20:23:13.252+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: marking computed attribute that is null in the config as unknown: tf_resource_type=pingone_environment tf_rpc=PlanResourceChange tf_mux_provider="*proto6server.Server" tf_provider_addr=registry.terraform.io/pingidentity/pingone @module=sdk.framework tf_attribute_path="AttributeName(\"default_population_id\")" tf_req_id=fb2a607e-fb8f-a976-2e7b-656ad414f1cf @caller=github.com/hashicorp/terraform-plugin-framework@v1.4.1/internal/fwserver/server_planresourcechange.go:399 timestamp="2023-11-04T20:23:13.251+1100"
module.pingone_environment.pingone_environment.pingone_mfa_environment: Creating...
2023-11-04T20:23:13.253+1100 [INFO]  Starting apply for module.pingone_environment.pingone_environment.pingone_mfa_environment
2023-11-04T20:23:13.253+1100 [DEBUG] module.pingone_environment.pingone_environment.pingone_mfa_environment: applying the planned Create change
2023-11-04T20:23:13.254+1100 [INFO]  provider.terraform-provider-pingone_v0.22.0: create timeout configuration not found, using provided default: @caller=github.com/hashicorp/terraform-plugin-framework-timeouts@v0.4.1/resource/timeouts/timeouts.go:139 @module=pingone tf_mux_provider="*proto6server.Server" tf_provider_addr=registry.terraform.io/pingidentity/pingone tf_resource_type=pingone_environment tf_req_id=221bd9ec-fecb-0491-cee5-1f0ac1751bef tf_rpc=ApplyResourceChange timestamp="2023-11-04T20:23:13.254+1100"
2023-11-04T20:23:13.254+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: 2023/11/04 20:23:13 [DEBUG] Waiting for state to become: [success]
2023-11-04T20:23:13.365+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: 2023/11/04 20:23:13 [DEBUG] Waiting for state to become: [success]
2023-11-04T20:23:13.445+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: Value switched to prior value due to semantic equality logic: tf_attribute_path=type tf_mux_provider="*proto6server.Server" tf_provider_addr=registry.terraform.io/pingidentity/pingone tf_req_id=221bd9ec-fecb-0491-cee5-1f0ac1751bef tf_resource_type=pingone_environment @caller=github.com/hashicorp/terraform-plugin-framework@v1.4.1/internal/fwschemadata/value_semantic_equality.go:85 @module=sdk.framework tf_rpc=ApplyResourceChange timestamp="2023-11-04T20:23:13.445+1100"
2023-11-04T20:23:13.445+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: Value switched to prior value due to semantic equality logic: tf_mux_provider="*proto6server.Server" tf_req_id=221bd9ec-fecb-0491-cee5-1f0ac1751bef tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/terraform-plugin-framework@v1.4.1/internal/fwschemadata/value_semantic_equality.go:85 @module=sdk.framework tf_attribute_path=name tf_provider_addr=registry.terraform.io/pingidentity/pingone tf_resource_type=pingone_environment timestamp="2023-11-04T20:23:13.445+1100"
2023-11-04T20:23:13.445+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: Value switched to prior value due to semantic equality logic: @caller=github.com/hashicorp/terraform-plugin-framework@v1.4.1/internal/fwschemadata/value_semantic_equality.go:85 tf_attribute_path=region tf_mux_provider="*proto6server.Server" tf_provider_addr=registry.terraform.io/pingidentity/pingone tf_req_id=221bd9ec-fecb-0491-cee5-1f0ac1751bef @module=sdk.framework tf_resource_type=pingone_environment tf_rpc=ApplyResourceChange timestamp="2023-11-04T20:23:13.445+1100"
2023-11-04T20:23:13.445+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: Value switched to prior value due to semantic equality logic: tf_provider_addr=registry.terraform.io/pingidentity/pingone tf_req_id=221bd9ec-fecb-0491-cee5-1f0ac1751bef tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/terraform-plugin-framework@v1.4.1/internal/fwschemadata/value_semantic_equality.go:85 @module=sdk.framework tf_attribute_path=license_id tf_mux_provider="*proto6server.Server" tf_resource_type=pingone_environment timestamp="2023-11-04T20:23:13.445+1100"
2023-11-04T20:23:13.446+1100 [DEBUG] provider.terraform-provider-pingone_v0.22.0: Value switched to prior value due to semantic equality logic: tf_provider_addr=registry.terraform.io/pingidentity/pingone tf_req_id=221bd9ec-fecb-0491-cee5-1f0ac1751bef tf_resource_type=pingone_environment tf_mux_provider="*proto6server.Server" @caller=github.com/hashicorp/terraform-plugin-framework@v1.4.1/internal/fwschemadata/value_semantic_equality.go:85 @module=sdk.framework tf_attribute_path="service[Value({\"bookmark\":[],\"console_url\":<null>,\"type\":\"MFA\"})].type" tf_rpc=ApplyResourceChange timestamp="2023-11-04T20:23:13.445+1100"
module.pingone_environment.pingone_environment.pingone_mfa_environment: Creation complete after 0s [id=3403a520-6a24-4ec1-a354-74f73f97831d]
2023-11-04T20:23:13.453+1100 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot
2023-11-04T20:23:13.454+1100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-11-04T20:23:13.455+1100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/pingidentity/pingone/0.22.0/darwin_arm64/terraform-provider-pingone_v0.22.0 pid=53440
2023-11-04T20:23:13.455+1100 [DEBUG] provider: plugin exited

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Expected Behavior

After executing the above tf config file I expect an environment that

Actual Behavior

After executing the above tf config file I get an environment that

It seems the provider triggers environment creation with a demo config. Instead, it should create a bare environment resource so it is possible to configure via tf with only the resources that are needed.

Steps to Reproduce

  1. terraform apply (use the tf config above)
patrickcping commented 10 months ago

Hi @LubosMagda thanks for raising! This is known about and we have a request open with the API team, currently unknown ETA.

If you need to raise it with your Ping account manager or with Ping support, the request ID to give is STAGING-21331

If I hear of progress in the meantime I will update here