Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pingone_environment creates demo resources #631

Open
LubosMagda opened this issue Nov 4, 2023 · 1 comment
Open

pingone_environment creates demo resources #631

LubosMagda opened this issue Nov 4, 2023 · 1 comment
Assignees
Labels
status/blocked/upstream-api The issue/PR is blocked by an upstream API status/triaged The issue/PR has completed initial triage and needs assignment type/bug Something isn't working

Comments

@LubosMagda
Copy link

LubosMagda commented Nov 4, 2023

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

PingOne Terraform provider Version

0.22.0

Terraform Version

1.6.3

Affected Resource(s)

  • pingone_environment

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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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

  • does not have any user attributes enabled
  • does not have any authentication policies configured
  • does not have any MFA policies configured
  • does not have any FIDO2 policies configured
  • does not have any Notification policies configured

Actual Behavior

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

  • has the user attributes locale, name, nickname, preferredLanguage, timezone enabled
  • has a Multi_Factor Authentication policy configured
  • has a Default MFA Policy MFA policy configured
  • has a Passkeys and Security Keys FIDO2 policy configured
  • has a Default Notification Policy Notification policy configured

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)
@LubosMagda LubosMagda added status/needs-triage The issue/PR needs initial triage type/bug Something isn't working labels Nov 4, 2023
@patrickcping patrickcping added status/blocked/upstream-api The issue/PR is blocked by an upstream API status/triaged The issue/PR has completed initial triage and needs assignment and removed status/needs-triage The issue/PR needs initial triage labels Nov 6, 2023
@patrickcping
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/blocked/upstream-api The issue/PR is blocked by an upstream API status/triaged The issue/PR has completed initial triage and needs assignment type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants