Skip to content

Object Storage Bucket Fails in new tenancy until a bucket has been first manually created in console #2401

@dabmajor

Description

@dabmajor

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-affected-resourcesPlease Provide the affected resource name in description. ex. Affected resource - oci_core_instancebug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions