The resources and data sources of the ews provider for Object Storage. Setting up the provider: Terraform & OpenTofu.
Resources
dcloud_bucketAn S3 bucket. Its id is its name. Deleting a bucket that still holds objects is refused.
dcloud_bucket_corsA bucket's CORS rules: which web pages may call the bucket from a browser (uploads with presigned URLs, fetch() from an app). Servers, the CLI and SDKs are not affected. Destroying it removes every rule.
dcloud_bucket_domainA custom domain of a bucket's website. Point it at cname_target with a CNAME (a Deutsche Cloud hosted zone of the domain gets the record automatically).
dcloud_bucket_encryptionWhich key encrypts a bucket's objects at rest: a KMS key of the organization (SSE-KMS). Every bucket is encrypted under the platform key without this resource; changing or destroying it re-wraps the bucket's data key, so every object follows at once. Disabling the KMS key makes the objects unreadable until it is enabled again.
dcloud_bucket_lifecycleA bucket's lifecycle rules: objects, old versions and unfinished uploads expire by age, applied by object storage once a day. Destroying it removes every rule.
dcloud_bucket_policyA bucket's resource policy, in AWS's grammar. A policy that makes the bucket public is refused while block_public_policy is on (see dcloud_bucket_public_access_block).
dcloud_bucket_public_access_blockBlock Public Access of a bucket. Every bucket starts with all four flags on; destroying this resource turns them all on again.
dcloud_bucket_replicationCross-zone replication of a bucket (S3 CRR): its objects are copied, by the platform, to other buckets of the organization. Both buckets need versioning enabled. Destroying it stops replication; replicas already made are kept.
dcloud_bucket_versioningVersioning of a bucket. Once enabled, versioning can only be suspended, never turned off (S3's rule): destroying this resource suspends it.
dcloud_bucket_websiteServes a bucket as a static website at website_url (an index document, or a redirect of every request). Objects still need a public-read policy to be served to anyone. Destroying it stops serving; custom domains (dcloud_bucket_domain) are kept.
dcloud_s3_access_keyAn S3 access key acting as the caller's IAM user (the one Terraform authenticates as). The secret is returned once, at create, and kept only in Terraform state (secret_access_key, sensitive): protect the state. It cannot be recovered after an import.