-
Notifications
You must be signed in to change notification settings - Fork 710
Description
Not sure if this is an API bug or a bug in the provider code. Here is the summary though:
When creating a new tenancy, the below resource fails to create. We see the list namespaces API Audit log 200 but then terraform receives a generic 404 response for the create bucket API POST. You can try 100 times with the same result. However, if you manually create and delete a bucket in the same compartment and region, your next attempt to build a bucket via terraform will succeed. It is like there is some initialization process that occurs when you create the very first bucket in that region/tenancy, then any subsequent attempts via the provider will work just fine.
I'm 100% sure it is not a race condition or eventual consistency issue. It appears there is some sort of initialization that occurs when a first bucket is created, and this provider does not account for that.
resource "oci_objectstorage_bucket" "some_bucket" {
compartment_id = local.tenancy_ocid
name = "bucket_name"
namespace = "namespacestring"
access_type = "NoPublicAccess"
versioning = "Enabled"
defined_tags = local.defined_tags
}