|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "objsto_bucket_cors_configuration Resource - objsto" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + A bucket CORS configuration resource. Note that there can only be one CORS configuration per bucket. |
| 7 | +--- |
| 8 | + |
| 9 | +# objsto_bucket_cors_configuration (Resource) |
| 10 | + |
| 11 | +A bucket CORS configuration resource. Note that there can only be one CORS configuration per bucket. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +resource "objsto_bucket" "example" { |
| 17 | + bucket = "example" |
| 18 | +} |
| 19 | +
|
| 20 | +resource "objsto_bucket_cors_configuration" "this" { |
| 21 | + bucket = objsto_bucket.example.bucket |
| 22 | +
|
| 23 | + cors_rule { |
| 24 | + allowed_headers = ["*"] |
| 25 | + allowed_methods = ["GET", "HEAD", "DELETE", "PUT", "POST"] |
| 26 | + allowed_origins = ["*"] |
| 27 | + expose_headers = ["x-amz-server-side-encryption"] |
| 28 | + max_age_seconds = 3000 |
| 29 | + } |
| 30 | +} |
| 31 | +``` |
| 32 | + |
| 33 | +<!-- schema generated by tfplugindocs --> |
| 34 | +## Schema |
| 35 | + |
| 36 | +### Required Attributes |
| 37 | + |
| 38 | +- `bucket` (String) The name of the bucket for which to configure the CORS. |
| 39 | + |
| 40 | +### Blocks |
| 41 | + |
| 42 | +- `cors_rule` (Block List) A CORS rule to apply to the bucket. (see [below for nested schema](#nestedblock--cors_rule)) |
| 43 | + |
| 44 | +<a id="nestedblock--cors_rule"></a> |
| 45 | +### Nested Schema for `cors_rule` |
| 46 | + |
| 47 | +Required Attributes: |
| 48 | + |
| 49 | +- `allowed_methods` (Set of String) The allowed HTTP methods for this rule. |
| 50 | +- `allowed_origins` (Set of String) The allowed origins for this rule. |
| 51 | + |
| 52 | +Optional Attributes: |
| 53 | + |
| 54 | +- `allowed_headers` (Set of String) The headers to include in `Access-Control-Request-Headers` header. |
| 55 | +- `expose_headers` (Set of String) The headers to include in the `Access-Control-Expose-Headers` header. |
| 56 | +- `id` (String) The identifier of the rule. |
| 57 | +- `max_age_seconds` (Number) The cache time in seconds. |
0 commit comments