Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyb3r-jak3/terraform-cloudflare-r2-api-token
Terraform module to create a Cloudflare API token that have bucket scope tokens.
https://github.com/cyb3r-jak3/terraform-cloudflare-r2-api-token
cloudflare-r2-api cloudflare-terraform terraform terraform-cloudflare terraform-module
Last synced: about 5 hours ago
JSON representation
Terraform module to create a Cloudflare API token that have bucket scope tokens.
- Host: GitHub
- URL: https://github.com/cyb3r-jak3/terraform-cloudflare-r2-api-token
- Owner: Cyb3r-Jak3
- License: mit
- Created: 2023-08-15T00:16:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-28T21:35:38.000Z (4 months ago)
- Last Synced: 2024-07-28T22:53:22.158Z (4 months ago)
- Topics: cloudflare-r2-api, cloudflare-terraform, terraform, terraform-cloudflare, terraform-module
- Language: HCL
- Homepage: https://registry.terraform.io/modules/Cyb3r-Jak3/r2-api-token/cloudflare/latest
- Size: 38.1 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terraform Cloudflare R2 API Token
Terraform module to create a Cloudflare API token that have bucket scope permissions.
Example:
```hcl
module "r2-api-token" {
source = "Cyb3r-Jak3/r2-api-token/cloudflare"
version = ""
account_id = ""
buckets = ["bucket-1", "bucket-2"]
write = false
}
```## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.2.0 |
| [cloudflare](#requirement\_cloudflare) | >= 4.13.0 |## Providers
| Name | Version |
|------|---------|
| [cloudflare](#provider\_cloudflare) | >= 4.13.0 |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [cloudflare_api_token.token](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/api_token) | resource |
| [cloudflare_api_token_permission_groups.this](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/data-sources/api_token_permission_groups) | data source |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [account\_id](#input\_account\_id) | Cloudflare Account ID | `string` | n/a | yes |
| [bucket\_read](#input\_bucket\_read) | If true, grant read access to the bucket(s) | `bool` | `true` | no |
| [bucket\_write](#input\_bucket\_write) | If true, grant write access to the bucket(s) | `bool` | `true` | no |
| [buckets](#input\_buckets) | List of R2 buckets to grant access to. If empty, all buckets will be granted access. | `list(string)` | `[]` | no |
| [condition\_ip\_in](#input\_condition\_ip\_in) | List of IP addresses or CIDR notation where the token may be used from. If not specified, the token will be valid for all IP addresses. | `list(string)` | `[]` | no |
| [condition\_ip\_not\_in](#input\_condition\_ip\_not\_in) | List of IP addresses or CIDR notation where the token should not be used from. | `list(string)` | `[]` | no |
| [expires\_on](#input\_expires\_on) | The expiration time on or after which the token MUST NOT be accepted for processing. If not specified, the token will not expire. | `string` | `""` | no |
| [jurisdiction](#input\_jurisdiction) | Jurisdiction of R2 buckets | `string` | `"default"` | no |
| [not\_before](#input\_not\_before) | The time before which the token MUST NOT be accepted for processing. If not specified, the token will be valid immediately. | `string` | `""` | no |
| [token\_name](#input\_token\_name) | Name of the API token.
If none given then the fomart is: `R2---` | `string` | `""` | no |## Outputs
| Name | Description |
|------|-------------|
| [id](#output\_id) | API Token ID.
Used as the Access Key ID |
| [name](#output\_name) | Name of the API Token |
| [secret](#output\_secret) | Secret Access Key |
| [value](#output\_value) | API Token Value |