Open dhoogfr opened 1 year ago
Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.
After checking the message better, I noticed that it are not the defined tags that are forcing the replacement, but the change in compartment.
It turned out that the log group and the log itself had different compartment attributes and when provisioning the log, Oracle creates it under the compartment of the log group instead of the compartment specified with the log.
When I try to create a log via the console, with a different compartment than the loggroup, the console will present a screen to create a new loggroup. So it's seems correct that the log and logroup should always be placed in the same compartment. But it's confusing with Terraform as it silently changes the compartment and then wants to recreate the log during each following apply.
Community Note
Terraform Version and Provider Version
Affected Resource(s)
oci_logging_log oci_load_balancer_load_balancer
Terraform Configuration Files
As per issue #1283 , I included the ignore_defined_tags to the provider. And although this worked for other resources, Terraform still wants to remove the tags after the initial creation.
Debug Output
The following debug output was from Terraform version Terraform v1.4.6 with oci plugin version v4.119.0, but the issue remains the same with the latest versions.
https://gist.github.com/dhoogfr/ceaa2fc7088f02c4306a9fcf469f9cf8
Panic Output
Expected Behavior
Terraform should ignore the Oracle maintained defined tags
Actual Behavior
Terraform wants to drop and recreate the load balancer logs. (not only remove the tags). Because of the replacement, the issue keeps popping up with each deployment.
Steps to Reproduce
Important Factoids
References
1283