You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
terraform plan # this should be empty, but it isn't
terraform apply # this shows that there is no change
Additional Context
The oci_route_table (https://github.com/terraform-providers/terraform-provider-oci/blob/master/oci/core_route_table_resource.go#L33) has an attribute for route_rules which is a TypeSet and it seems to the underlying reason for the problem.
The custom hash function that we define is getting the non-interpolated string in these cases (like ${lookup(data.oci_core_private_ips.test_private_ips.private_ips[0], "id")} rather than the actual value from the state). With such a literal string, it seems impossible for the provider code to correctly discern the correct hash value to be used. In general, passing a non-interpolated value to the hashing function (or any other provider overridden code) should be avoided by terraform, right?
References
There was a similar bug that was logged earlier - #2879 - which was mitigated by creating a new resource for the nested entry - which may not make sense in every scenario.
The text was updated successfully, but these errors were encountered:
It looks like you've found issue #18600 here. If you remove depends_on from the data "oci_core_private_ips" "test_private_ips" block the problem should go away. That depends_on argument is redundant anyway, since there's already a reference to oci_core_instance.test_instance in the ip_address argument.
Since this is the same as #18600, I'm going to close it out. Thanks for reporting this!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Mar 30, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
Terraform Configuration Files
Debug Output
https://gist.github.com/kilokahn/ece94de49fdd37f749cbc00d434bef72
Crash Output
N/A
Expected Behavior
There should have been no change in the plan
Actual Behavior
TF plan shows a spurious diff. When apply is run, it shows that no changes are actually applied.
tf plan
tf apply
Steps to Reproduce
terraform init
terraform plan
terraform apply
terraform plan
# this should be empty, but it isn'tterraform apply
# this shows that there is no changeAdditional Context
The
oci_route_table
(https://github.com/terraform-providers/terraform-provider-oci/blob/master/oci/core_route_table_resource.go#L33) has an attribute forroute_rules
which is aTypeSet
and it seems to the underlying reason for the problem.The custom hash function that we define is getting the non-interpolated string in these cases (like
${lookup(data.oci_core_private_ips.test_private_ips.private_ips[0], "id")}
rather than the actual value from the state). With such a literal string, it seems impossible for the provider code to correctly discern the correct hash value to be used. In general, passing a non-interpolated value to the hashing function (or any other provider overridden code) should be avoided by terraform, right?References
There was a similar bug that was logged earlier - #2879 - which was mitigated by creating a new resource for the nested entry - which may not make sense in every scenario.
The text was updated successfully, but these errors were encountered: