Skip to content

Flow node connections cannot be re-mapped to admin defined connections when an environment contains a bootstrapped equivalent #266

@patrickcping

Description

@patrickcping

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

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.2.1

Terraform Version

v1.6.6

Affected Resource(s)

  • davinci_flow

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" "test-http" {
  environment_id = pingone_environment.my_environment.id
  connector_id   = "httpConnector"
  name           = "abcd123-http"
}

resource "davinci_flow" "test-subflow-1" {
  environment_id = pingone_environment.my_environment.id

  flow_json = file("./flows/full-basic-subflow-1.json")

  // Http connector
  connection_link {
    id                           = davinci_connection.test-http.id
    name                         = davinci_connection.test-http.name
  }
}

Debug Output

N/a

Panic Output

None

Expected Behavior

davinci_flow.test-subflow-1, when imported, should compare the name provided in connection_link.name with the name in the flow, and overwrite the connection ID with the new connection specified in HCL

Actual Behavior

The flow instead was imported and the HTTP connection used a bootstrapped default, which ignored the configured mapping.

Steps to Reproduce

  1. Create a new PingOne environment through the console or via API, ensuring bootstrapped configuration is present
  2. In the DaVinci console, rename the Http connection to Http1
  3. In the flow JSON, ensure that a httpConnector node is present, and set the name to abcd123-http (matching davinci_connection.test-http.name in the HCL)
  4. terraform apply
  5. The provider should re-map the flow such that the connectionId in the JSON becomes davinci_connection.test-http.id
  6. In the DaVinci console, observe the node's connection ID and compare with the newly created davinci_connection.test-http.id attribute

Workaround

Remove bootstrapped DaVinci configuration from the environment prior to import

Important Factoids

References

Metadata

Metadata

Assignees

Labels

status/blocked/upstream-apiThe issue/PR is blocked by an upstream APIstatus/triagedThe issue/PR has completed initial triage and needs assignmenttype/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions