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

use new includeVariableValues query param response #344

Merged

Conversation

samir-gandhi
Copy link
Contributor

@samir-gandhi samir-gandhi commented Aug 14, 2024

Changes

resource/davinci_variable: Migrated to plugin framework.
BREAKING CHANGE - resource/davinci_flow: Some variable configuration fields have been removed from the davinci_flow resource. Variable description, max, min, value and mutable fields can no longer be managed in the flow export. Use davinci_variable to manage these configuration items instead.
BUG FIX - resource/davinci_flow: Fix "Provider produced inconsistent result after apply" error when updating variables in a flow.
BUG FIX - resource/davinci_flow: Fix inability to let flows themselves manage variable values during flow execution (allow option to not manage variable values in Terraform state).
BUG FIX - resource/davinci_flow: Fix erroneous deletion of a company / flow instance variable if a flow contains reference to it within it's export.
ENHANCEMENT - resource/davinci_flow: Change flow/variable logic to support the ability to export flows without variable values, but still allow management of variables values if necessary.
ENHANCEMENT - resource/davinci_variable: Change flow/variable logic to support the ability to export flows without variable values, but still allow management of variables values if necessary.
ENHANCEMENT - resource/davinci_variable: Add support for secret company variables.

Testing Shell Command

TF_ACC=1 go test -v -timeout 1200s -run ^TestAccResourceFlow_ github.com/pingidentity/terraform-provider-davinci/internal/service/davinci && \
TF_ACC=1 go test -v -timeout 1200s -run ^TestAccResourceVariable_ github.com/pingidentity/terraform-provider-davinci/internal/service/davinci

Testing Results

Expand Results
=== RUN   TestAccResourceFlow_RemovalDrift
=== PAUSE TestAccResourceFlow_RemovalDrift
=== RUN   TestAccResourceFlow_Basic_Clean
=== PAUSE TestAccResourceFlow_Basic_Clean
=== RUN   TestAccResourceFlow_Basic_WithBootstrap
=== PAUSE TestAccResourceFlow_Basic_WithBootstrap
=== RUN   TestAccResourceFlow_ConnectionSubflowLinks_WithMappingIDs_Clean
=== PAUSE TestAccResourceFlow_ConnectionSubflowLinks_WithMappingIDs_Clean
=== RUN   TestAccResourceFlow_ConnectionSubflowLinks_WithMappingIDs_WithBootstrap
=== PAUSE TestAccResourceFlow_ConnectionSubflowLinks_WithMappingIDs_WithBootstrap
=== RUN   TestAccResourceFlow_ConnectionSubflowLinks_WithoutMappingIDs_Clean
=== PAUSE TestAccResourceFlow_ConnectionSubflowLinks_WithoutMappingIDs_Clean
=== RUN   TestAccResourceFlow_ConnectionSubflowLinks_WithoutMappingIDs_WithBootstrap
=== PAUSE TestAccResourceFlow_ConnectionSubflowLinks_WithoutMappingIDs_WithBootstrap
=== RUN   TestAccResourceFlow_ComputeDifferences_ModifySettings
=== PAUSE TestAccResourceFlow_ComputeDifferences_ModifySettings
=== RUN   TestAccResourceFlow_ComputeDifferences_CompanyId
=== PAUSE TestAccResourceFlow_ComputeDifferences_CompanyId
=== RUN   TestAccResourceFlow_ComputeDifferences_Version
=== PAUSE TestAccResourceFlow_ComputeDifferences_Version
=== RUN   TestAccResourceFlow_ComputeDifferences_Description
=== PAUSE TestAccResourceFlow_ComputeDifferences_Description
=== RUN   TestAccResourceFlow_ComputeDifferences_AdditionalProperties
=== PAUSE TestAccResourceFlow_ComputeDifferences_AdditionalProperties
=== RUN   TestAccResourceFlow_ComputeDifferences_NewNode
=== PAUSE TestAccResourceFlow_ComputeDifferences_NewNode
=== RUN   TestAccResourceFlow_UnknownFlowString
=== PAUSE TestAccResourceFlow_UnknownFlowString
=== RUN   TestAccResourceFlow_BrokenFlow
=== PAUSE TestAccResourceFlow_BrokenFlow
=== RUN   TestAccResourceFlow_Variables_Clean
=== PAUSE TestAccResourceFlow_Variables_Clean
=== RUN   TestAccResourceFlow_Variables_WithBootstrap
=== PAUSE TestAccResourceFlow_Variables_WithBootstrap
=== RUN   TestAccResourceFlow_Variables_Overridden_Clean
=== PAUSE TestAccResourceFlow_Variables_Overridden_Clean
=== RUN   TestAccResourceFlow_Variables_Overridden_WithBootstrap
=== PAUSE TestAccResourceFlow_Variables_Overridden_WithBootstrap
=== RUN   TestAccResourceFlow_BadParameters
=== PAUSE TestAccResourceFlow_BadParameters
=== CONT  TestAccResourceFlow_RemovalDrift
=== CONT  TestAccResourceFlow_ComputeDifferences_Description
=== CONT  TestAccResourceFlow_ConnectionSubflowLinks_WithoutMappingIDs_Clean
=== CONT  TestAccResourceFlow_ConnectionSubflowLinks_WithMappingIDs_Clean
=== CONT  TestAccResourceFlow_ComputeDifferences_CompanyId
=== CONT  TestAccResourceFlow_ComputeDifferences_ModifySettings
=== CONT  TestAccResourceFlow_Variables_Overridden_Clean
=== CONT  TestAccResourceFlow_UnknownFlowString
=== CONT  TestAccResourceFlow_Basic_WithBootstrap
=== CONT  TestAccResourceFlow_Variables_Overridden_WithBootstrap
=== CONT  TestAccResourceFlow_BadParameters
=== CONT  TestAccResourceFlow_ComputeDifferences_Version
=== CONT  TestAccResourceFlow_Variables_Clean
=== CONT  TestAccResourceFlow_ConnectionSubflowLinks_WithoutMappingIDs_WithBootstrap
=== CONT  TestAccResourceFlow_Basic_Clean
=== NAME  TestAccResourceFlow_Variables_Overridden_WithBootstrap
    resource_flow_test.go:1208: Skipping test with bootstrap config: https://github.com/pingidentity/terraform-provider-davinci/issues/266
=== CONT  TestAccResourceFlow_ComputeDifferences_NewNode
=== NAME  TestAccResourceFlow_Basic_WithBootstrap
    resource_flow_test.go:178: Skipping test with bootstrap config: https://github.com/pingidentity/terraform-provider-davinci/issues/266
--- SKIP: TestAccResourceFlow_Variables_Overridden_WithBootstrap (0.03s)
--- SKIP: TestAccResourceFlow_Basic_WithBootstrap (0.01s)
=== CONT  TestAccResourceFlow_ComputeDifferences_AdditionalProperties
=== CONT  TestAccResourceFlow_Variables_WithBootstrap
    resource_flow_test.go:1001: Skipping test with bootstrap config: https://github.com/pingidentity/terraform-provider-davinci/issues/266
--- SKIP: TestAccResourceFlow_Variables_WithBootstrap (0.02s)
=== CONT  TestAccResourceFlow_BrokenFlow
--- PASS: TestAccResourceFlow_BrokenFlow (133.05s)
=== CONT  TestAccResourceFlow_ConnectionSubflowLinks_WithMappingIDs_WithBootstrap
    resource_flow_test.go:323: Skipping test with bootstrap config: https://github.com/pingidentity/terraform-provider-davinci/issues/266
--- SKIP: TestAccResourceFlow_ConnectionSubflowLinks_WithMappingIDs_WithBootstrap (0.01s)
--- PASS: TestAccResourceFlow_UnknownFlowString (274.23s)
=== NAME  TestAccResourceFlow_RemovalDrift
    resource_flow_test.go:39: Skipping step 3/4 due to SkipFunc
    resource_flow_test.go:39: Skipping step 4/4 due to SkipFunc
--- PASS: TestAccResourceFlow_RemovalDrift (287.06s)
=== NAME  TestAccResourceFlow_Variables_Clean
    resource_flow_test.go:995: Skipping step 2/4 due to SkipFunc
=== NAME  TestAccResourceFlow_Variables_Overridden_Clean
    resource_flow_test.go:1202: Skipping step 2/4 due to SkipFunc
--- PASS: TestAccResourceFlow_BadParameters (307.16s)
--- PASS: TestAccResourceFlow_ComputeDifferences_Version (323.24s)
--- PASS: TestAccResourceFlow_ComputeDifferences_AdditionalProperties (325.26s)
--- PASS: TestAccResourceFlow_ComputeDifferences_CompanyId (334.15s)
--- PASS: TestAccResourceFlow_ComputeDifferences_Description (334.48s)
--- PASS: TestAccResourceFlow_ComputeDifferences_ModifySettings (334.88s)
--- PASS: TestAccResourceFlow_ComputeDifferences_NewNode (337.03s)
--- PASS: TestAccResourceFlow_Variables_Clean (417.32s)
--- PASS: TestAccResourceFlow_Variables_Overridden_Clean (479.27s)
--- PASS: TestAccResourceFlow_ConnectionSubflowLinks_WithMappingIDs_Clean (605.10s)
--- PASS: TestAccResourceFlow_ConnectionSubflowLinks_WithoutMappingIDs_Clean (608.78s)
--- PASS: TestAccResourceFlow_Basic_Clean (627.41s)
--- PASS: TestAccResourceFlow_ConnectionSubflowLinks_WithoutMappingIDs_WithBootstrap (984.15s)
PASS
ok      github.com/pingidentity/terraform-provider-davinci/internal/service/davinci     985.388s
=== RUN   TestAccResourceVariable_RemovalDrift
=== PAUSE TestAccResourceVariable_RemovalDrift
=== RUN   TestAccResourceVariable_Full_CompanyContext_Clean
=== PAUSE TestAccResourceVariable_Full_CompanyContext_Clean
=== RUN   TestAccResourceVariable_Full_CompanyContext_WithBootstrap
=== PAUSE TestAccResourceVariable_Full_CompanyContext_WithBootstrap
=== RUN   TestAccResourceVariable_Full_FlowInstanceContext_Clean
=== PAUSE TestAccResourceVariable_Full_FlowInstanceContext_Clean
=== RUN   TestAccResourceVariable_Full_FlowInstanceContext_WithBootstrap
=== PAUSE TestAccResourceVariable_Full_FlowInstanceContext_WithBootstrap
=== RUN   TestAccResourceVariable_Full_UserContext_Clean
=== PAUSE TestAccResourceVariable_Full_UserContext_Clean
=== RUN   TestAccResourceVariable_Full_UserContext_WithBootstrap
=== PAUSE TestAccResourceVariable_Full_UserContext_WithBootstrap
=== RUN   TestAccResourceVariable_ChangeDataType
=== PAUSE TestAccResourceVariable_ChangeDataType
=== RUN   TestAccResourceVariable_Values_CompanyContext
=== PAUSE TestAccResourceVariable_Values_CompanyContext
=== RUN   TestAccResourceVariable_Values_FlowInstanceContext
=== PAUSE TestAccResourceVariable_Values_FlowInstanceContext
=== RUN   TestAccResourceVariable_Values_FlowContext
=== PAUSE TestAccResourceVariable_Values_FlowContext
=== RUN   TestAccResourceVariable_BadParameters
=== PAUSE TestAccResourceVariable_BadParameters
=== CONT  TestAccResourceVariable_RemovalDrift
=== CONT  TestAccResourceVariable_Values_FlowContext
=== CONT  TestAccResourceVariable_Full_UserContext_Clean
=== CONT  TestAccResourceVariable_Full_FlowInstanceContext_Clean
=== CONT  TestAccResourceVariable_Full_CompanyContext_Clean
=== CONT  TestAccResourceVariable_Full_UserContext_WithBootstrap
=== CONT  TestAccResourceVariable_Full_FlowInstanceContext_WithBootstrap
=== CONT  TestAccResourceVariable_Values_FlowInstanceContext
=== CONT  TestAccResourceVariable_Values_CompanyContext
=== CONT  TestAccResourceVariable_ChangeDataType
=== CONT  TestAccResourceVariable_Full_CompanyContext_WithBootstrap
=== CONT  TestAccResourceVariable_BadParameters
=== NAME  TestAccResourceVariable_RemovalDrift
    resource_variable_test.go:33: Skipping step 3/4 due to SkipFunc
    resource_variable_test.go:33: Skipping step 4/4 due to SkipFunc
--- PASS: TestAccResourceVariable_RemovalDrift (132.54s)
--- PASS: TestAccResourceVariable_BadParameters (195.85s)
--- PASS: TestAccResourceVariable_ChangeDataType (218.72s)
=== NAME  TestAccResourceVariable_Full_CompanyContext_Clean
    resource_variable_test.go:123: Skipping step 6/8 due to SkipFunc
=== NAME  TestAccResourceVariable_Full_FlowInstanceContext_Clean
    resource_variable_test.go:227: Skipping step 6/8 due to SkipFunc
=== NAME  TestAccResourceVariable_Full_FlowInstanceContext_WithBootstrap
    resource_variable_test.go:227: Skipping step 6/8 due to SkipFunc
=== NAME  TestAccResourceVariable_Full_UserContext_WithBootstrap
    resource_variable_test.go:331: Skipping step 6/8 due to SkipFunc
=== NAME  TestAccResourceVariable_Full_UserContext_Clean
    resource_variable_test.go:331: Skipping step 6/8 due to SkipFunc
--- PASS: TestAccResourceVariable_Full_FlowInstanceContext_Clean (414.71s)
=== NAME  TestAccResourceVariable_Full_CompanyContext_WithBootstrap
    resource_variable_test.go:123: Skipping step 6/8 due to SkipFunc
--- PASS: TestAccResourceVariable_Full_CompanyContext_Clean (443.14s)
--- PASS: TestAccResourceVariable_Full_FlowInstanceContext_WithBootstrap (446.79s)
--- PASS: TestAccResourceVariable_Full_UserContext_Clean (447.08s)
--- PASS: TestAccResourceVariable_Full_UserContext_WithBootstrap (448.51s)
--- PASS: TestAccResourceVariable_Full_CompanyContext_WithBootstrap (451.21s)
--- PASS: TestAccResourceVariable_Values_CompanyContext (577.11s)
--- PASS: TestAccResourceVariable_Values_FlowContext (587.10s)
--- PASS: TestAccResourceVariable_Values_FlowInstanceContext (588.71s)
PASS
ok      github.com/pingidentity/terraform-provider-davinci/internal/service/davinci     589.575s

@samir-gandhi samir-gandhi linked an issue Aug 14, 2024 that may be closed by this pull request
@patrickcping patrickcping added this to the v0.3.4 milestone Aug 14, 2024
@patrickcping patrickcping added type/bug Something isn't working type/enhancement New feature or request breaking change A PR or issue identified as needing a breaking change status/blocked/upstream-sdk The issue/PR is blocked by an upstream SDK labels Aug 16, 2024
@patrickcping patrickcping removed the status/blocked/upstream-sdk The issue/PR is blocked by an upstream SDK label Aug 16, 2024
@patrickcping patrickcping marked this pull request as ready for review August 16, 2024 18:54
@patrickcping patrickcping requested a review from a team as a code owner August 16, 2024 18:54
@patrickcping patrickcping merged commit 0df3d72 into main Aug 16, 2024
13 checks passed
@patrickcping patrickcping deleted the 343-support-davinci-flow-include-variable-values-false branch August 16, 2024 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A PR or issue identified as needing a breaking change type/bug Something isn't working type/enhancement New feature or request
Projects
None yet
2 participants