Apache License 2.0

项目介绍

cloudflare/terraform-provider-cloudflare 是一个托管在 GitHub 上的开源项目,主要使用 Go 编写,采用 Apache License 2.0 许可证,目前获得 1.4k 个 Star、900 次 Fork。

仓库全名
cloudflare/terraform-provider-cloudflare
开源许可证
Apache License 2.0
Star 数
1.4k
Fork 数
900
未关闭 Issue
186

README 摘要

Cloudflare Terraform Provider The Cloudflare Terraform provider provides convenient access to the Cloudflare REST API from Terraform. Requirements This provider requires Terraform CLI 1.0 or later. You can install it for your system on Hashicorp's website. Usage Add the following to your main.tf file: Initialize your project by running terraform init in the directory. Additional examples can be found in the…

完整内容见 GitHub 原始 README 或本页 。

常见问题

terraform-provider-cloudflare 用什么语言开发?

主要使用 Go 编写,采用 Apache License 2.0 许可证,目前有 1.4k 个 Star。

terraform-provider-cloudflare 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 terraform-provider-cloudflare 的源码?

可以直接克隆仓库:git clone https://github.com/cloudflare/terraform-provider-cloudflare.git,默认分支为 main;安装与运行步骤见仓库 README。

terraform-provider-cloudflare 最近还在维护吗?

仓库最近一次更新为 2 周前,当前有 186 个未关闭 Issue;Star 数为 1.4k,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Cloudflare Terraform Provider

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
3204
价值分
1077
活跃状态
活跃

语言占比

Go
Go Template
Python
Ruby
Shell

Release

README

Cloudflare Terraform Provider

The Cloudflare Terraform provider provides convenient access to the Cloudflare REST API from Terraform.

Requirements

This provider requires Terraform CLI 1.0 or later. You can install it for your system on Hashicorp’s website.

Usage

Add the following to your main.tf file:

# Declare the provider and version
terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "~> 5.28.0"
    }
  }
}

# Initialize the provider
provider "cloudflare" {
  # The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).
  api_token = "Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY" # or set CLOUDFLARE_API_TOKEN env variable
  # The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
  api_key = "144c9defac04969c7bfad8efaa8ea194" # or set CLOUDFLARE_API_KEY env variable
  # The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
  api_email = "[email protected]" # or set CLOUDFLARE_EMAIL env variable
  # Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys).
  user_service_key = "v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719" # or set CLOUDFLARE_API_USER_SERVICE_KEY env variable
  # Sets an account ID to be used with all account-scoped requests.
  account_id = "f037e56e89293a057740de681ac9accp" # or set CLOUDFLARE_ACCOUNT_ID env variable
  # Sets a zone ID to be used with all zone-scoped requests.
  zone_id = "f037e56e89293a057740de681ac9accp" # or set CLOUDFLARE_ZONE_ID env variable
}

# Configure a resource
resource "cloudflare_zone" "example_zone" {
  account = {
    id = "023e105f4ecef8ad9ca31a8372d0c353"
  }
  name = "example.com"
  type = "full"
}

Initialize your project by running terraform init in the directory.

Additional examples can be found in the ./examples folder within this repository, and you can refer to the full documentation on the Terraform Registry.

Provider Options

When you initialize the provider, the following options are supported. It is recommended to use environment variables for sensitive values like access tokens. If an environment variable is provided, then the option does not need to be set in the terraform source.

Property Environment variable Required Default value
zone_id CLOUDFLARE_ZONE_ID false —
user_service_key CLOUDFLARE_API_USER_SERVICE_KEY false —
api_token CLOUDFLARE_API_TOKEN false —
api_key CLOUDFLARE_API_KEY false —
api_email CLOUDFLARE_EMAIL false —
account_id CLOUDFLARE_ACCOUNT_ID false —

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Maintenance

This SDK is actively maintained, however, it is auto-generated and maintained internally at Cloudflare, so we are no longer accepting pull requests from the community. Many issues are tracked outside of GitHub on internal Cloudflare systems. Please open an issue rather than a pull request. For urgent issues, please contact Cloudflare support.

Contributing

This repository is auto-generated, and we are no longer accepting pull requests. If you have a bug or feature request, please open an issue.

That said, if you have a fix that is known to work, a pull request can still be helpful as a reference implementation for the team, even though it will not be merged directly. Please open an issue alongside it so we can track the change.

See the contributing documentation for more details.

评论

暂无评论