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

Flow variables are not updated when changed in the flow import JSON #324

Closed patrickcping closed 5 months ago

patrickcping commented 5 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.3.2

Terraform Version

v1.8.4

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_connection" "my_awesome_flow_connector" {
  environment_id = var.environment_id

  name         = "Flow"
  connector_id = "flowConnector"
}

resource "davinci_flow" "my_awesome_subflow" {
  environment_id = var.environment_id

  name      = "My Awesome Subflow"
  flow_json = file("./path/to/example-subflow.json")

  connection_link {
    id                           = davinci_connection.my_awesome_flow_connector.id
    name                         = davinci_connection.my_awesome_flow_connector.name
    replace_import_connection_id = "3332************************1ea3"
  }
}

Debug Output

β”‚ Error: Provider produced inconsistent result after apply
β”‚ 
β”‚ When applying changes to davinci_flow.nnzitpwmsp, provider "provider[\"registry.terraform.io/pingidentity/davinci\"]" produced an unexpected new value: .flow_variables: planned set element cty.ObjectVal(map[string]cty.Value{"context":cty.StringVal("flow"),
β”‚ "description":cty.NullVal(cty.String), "flow_id":cty.StringVal("bd10***********************cf36"), "id":cty.StringVal("fdgdfgfdg##SK##flow##SK##bd10***********************cf36"), "max":cty.NumberIntVal(2000), "min":cty.NumberIntVal(0), "mutable":cty.True,
β”‚ "name":cty.StringVal("fdgdfgfdg"), "type":cty.StringVal("property")}) does not correlate with any element in actual.
β”‚ 
β”‚ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Panic Output

N/a

Expected Behavior

Variables should be updated in DaVinci

Actual Behavior

Variables are not updated in DaVinci, leading to broken flow

Steps to Reproduce

  1. terraform apply
  2. Add a new variable / delete a variable / modify a variable in the flow export JSON example-subflow.json
  3. terraform apply

Important Factoids

References

None