pingidentity / terraform-provider-davinci

PingOne DaVinci Terraform Provider
https://registry.terraform.io/providers/pingidentity/davinci/latest
Mozilla Public License 2.0
4 stars 1 forks source link

"Value Conversion Error, Received unknown value, however the target type cannot handle unknown" error when using `davinci_variable` `value` field #364

Closed patrickcping closed 2 months ago

patrickcping commented 2 months ago

Community Note

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

DaVinci Terraform provider Version

v0.4.1

Terraform Version

Terraform v1.9.5
on darwin_amd64

Affected Resource(s)

Terraform Configuration Files

# Copy-paste your DaVinci related Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

# Remember to replace any account/customer sensitive information in the configuration before submitting the issue

# NOTE: PLEASE DO NOT share DaVinci JSON exports publicly without encrypting files first.  DaVinci JSON exports can contain environment/tenant specific information, and may also include secrets.
resource "davinci_variable" "1" {
  environment_id = pingone_environment.my_environment.id

  name        = "testVariable1"
  context     = "company"
  description = "testVariable1 description"
  type        = "string"
}

resource "davinci_variable" "2" {
  environment_id = pingone_environment.my_environment.id

  name        = "testVariable2"
  context     = "company"
  description = "testVariable2 description"
  type        = "string"
  value       = davinci_variable.1.id
}

Debug Output

Error: Value Conversion Error

with davinci_variable.2,
on davinci_variables.tf line 33, in resource "davinci_variable" "2":
33: value = davinci_variable.1.id

An unexpected error was encountered trying to build a value. This is always
an error in the provider. Please report the following to the provider
developer:

Received unknown value, however the target type cannot handle unknown
values. Use the corresponding `types` package type or a custom type that
handles unknown values.

Path: value
Target Type: *string
Suggested Type: basetypes.StringValue

Panic Output

N/a

Expected Behavior

Variable 2 should handle unknown values

Actual Behavior

Error as shown

Steps to Reproduce

  1. terraform plan (on initial create)

Important Factoids

References