本页还没有译文
本页 8 段还没译成Español,下面显示的是英文原文。Terraform
还没翻译译自英文(developers.cloudflare.com)本页 8 段都还没译
You must generate an Access Key before getting started. All examples will utilize access_key_id and access_key_secret variables which represent the Access Key ID and Secret Access Key values you generated.
This example shows how to configure R2 with Terraform using the Cloudflare provider.
Note for using AWS provider
When using the Cloudflare Terraform provider, you can only manage buckets. To configure items such as CORS and object lifecycles, you will need to use the AWS Provider.
With terraform installed, create main.tf and copy the content below replacing with your API Token.
terraform {
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 4"
}
}
}
provider "cloudflare" {
api_token = "<YOUR_API_TOKEN>"
}
resource "cloudflare_r2_bucket" "cloudflare-bucket" {
account_id = "<YOUR_ACCOUNT_ID>"
name = "my-tf-test-bucket"
location = "WEUR"
}You can then use terraform plan to view the changes and terraform apply to apply changes.
AI 翻译查看英文原文