Open dch opened 7 months ago
Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.
To work around this bug we used the ignore_changes
lifecycle attribute to instruct terraform to ignore changes to bucket_listing_action
. Once added, terraform no longer attempts to recreate the oci_objectstorage_preauthrequest
resource.
@jacobcsmith interesting. can you give a more complete example of this please? thanks!
Using your example it would be like this
resource "oci_objectstorage_preauthrequest" "pkg" {
access_type = "AnyObjectRead"
bucket_listing_action = "ListObjects"
bucket = "pkg"
name = "pkg_repo_readonly"
namespace = var.tenancy_namespace
time_expires = "2038-01-01T12:00:00Z"
lifecycle {
ignore_changes = [bucket_listing_action]
}
}
Community Note
Terraform Version and Provider Version
Affected Resource(s)
oci_objectstorage_preauthrequest
Terraform Configuration Files
Debug Output
Expected Behavior
a previously created PAR should not be deleted.
Actual Behavior
The PARs are deleted, and we need to re-distribute these on every single terraform run.
Steps to Reproduce
terraform apply
and watch it replace every single timeReferences
This has been the case for a couple of years at least: https://github.com/oracle/terraform-provider-oci/issues/1570