Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a3d6b5 commit 1ab2450Copy full SHA for 1ab2450
provisioner/terraform/resources.go
@@ -694,5 +694,21 @@ func orderedRichParametersResources(tfResourcesRichParameters []*tfjson.StateRes
694
}
695
696
697
+
698
+ // There's an edge case possible for us to have a parameter name that isn't
699
+ // present in the state, since the ordered names come statically from
700
+ // parsing the Terraform file. We need to filter out the nil values if there
701
+ // are any present.
702
+ if len(tfResourcesRichParameters) != len(orderedNames) {
703
+ nonNil := make([]*tfjson.StateResource, 0, len(ordered))
704
+ for _, resource := range ordered {
705
+ if resource != nil {
706
+ nonNil = append(nonNil, resource)
707
+ }
708
709
710
+ ordered = nonNil
711
712
713
return ordered
714
0 commit comments