terraform import fusionauth_user does not include user.data
Aaron-Ritter opened this issue · 1 comments
Aaron-Ritter commented
Hi,
I tried to import existing user information with TF_LOG=trace terraform import fusionauth_user.aaron_fusionauth_sonderformat_llc df098e2d-b6bb-4714-8c12-2c28ebe227e3
but it looks like its not taking in user.data despite when I curl manually I see the user.data.
- To retrieve user data you have to explicitly extracting it https://fusionauth.io/docs/v1/tech/apis/users#retrieve-a-user
Running in trace it mentions the following warning, and as well mentions that - .data: was null, but now cty.StringVal("")
despite I'm certain its filled:
2023-06-15T12:59:48.945-0500 [TRACE] provider.terraform-provider-fusionauth_v0.1.90: Served request: tf_rpc=ReadResource @caller=github.com/hashicorp/terraform-plugin-go@v0.9.0/tfprotov5/tf5server/server.go:758 tf_proto_version=5.2 tf_provider_addr=provider tf_req_id=7a822910-399a-ef23-cf79-e9d0acfa64ef tf_resource_type=fusionauth_user @module=sdk.proto timestamp=2023-06-15T12:59:48.945-0500
2023-06-15T12:59:48.946-0500 [WARN] Provider "registry.terraform.io/gpsinsight/fusionauth" produced an unexpected new value for fusionauth_user.aaron_sonderformat during refresh.
- .full_name: was null, but now cty.StringVal("")
- .user_id: was null, but now cty.StringVal("df098e2d-b6bb-4714-8c12-2c28ebe227e3")
- .birth_date: was null, but now cty.StringVal("")
- .data: was null, but now cty.StringVal("")
- .first_name: was null, but now cty.StringVal("Aaron")
- .username: was null, but now cty.StringVal("")
- .username_status: was null, but now cty.StringVal("ACTIVE")
- .timezone: was null, but now cty.StringVal("")
- .image_url: was null, but now cty.StringVal("")
- .middle_name: was null, but now cty.StringVal("")
- .mobile_phone: was null, but now cty.StringVal("")
- .preferred_languages: was null, but now cty.SetValEmpty(cty.String)
- .tenant_id: was null, but now cty.StringVal("230794c3-cc6e-f6cf-3d23-5d16ef467bcc")
- .email: was null, but now cty.StringVal("aaron@xxxx.xxxx")
- .parent_email: was null, but now cty.StringVal("")
- .password_change_required: was null, but now cty.False
- .expiry: was null, but now cty.NumberIntVal(0)
- .last_name: was null, but now cty.StringVal("Ritter")
- .two_factor_recovery_codes: inconsistent values for sensitive attribute
Aaron-Ritter commented
actually, what I wanted to import is not user data but registration application data. so i have to use fusionauth_registration instead.
https://fusionauth.io/docs/v1/tech/apis/registrations#update-a-user-registration