Initial commit: Terraform configurations for multiple cloud providers
This commit is contained in:
48
datadog/README.md
Normal file
48
datadog/README.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# Datadog Terraform Integration
|
||||
|
||||
## 配置说明
|
||||
|
||||
此目录包含用于与 Datadog 服务集成的 Terraform 配置。
|
||||
|
||||
## 必需的凭证
|
||||
|
||||
要使用此配置,您需要在 `terraform.tfvars` 文件中提供以下信息:
|
||||
|
||||
- `datadog_api_key`: Datadog API 密钥(以 "3c7d" 结尾:6f3900667c1b401225a8360382c33c7d)
|
||||
- `datadog_app_key`: Datadog APP 密钥(以 "ee9a" 结尾:8ad8eed0af8b041adc43653c176e06f34508ee9a)
|
||||
- `datadog_site`: Datadog 站点 URL(已提供:https://us5.datadoghq.com/)
|
||||
|
||||
## 如何获取凭证
|
||||
|
||||
1. 您的 Datadog 凭证已经完整:
|
||||
- **API Key**: `6f3900667c1b401225a8360382c33c7d`(以 "3c7d" 结尾)
|
||||
- **Application Key**: `8ad8eed0af8b041adc43653c176e06f34508ee9a`(以 "ee9a" 结尾,存储在 .env 文件第一行)
|
||||
- **站点 URL**: `https://us5.datadoghq.com/`(存储在 .env 文件第二行)
|
||||
2. 这些值已经正确配置在 `terraform.tfvars` 文件中
|
||||
3. 连接已验证成功
|
||||
|
||||
## 验证连接
|
||||
|
||||
运行以下命令来验证连接:
|
||||
|
||||
```bash
|
||||
cd datadog
|
||||
terraform init
|
||||
terraform plan
|
||||
```
|
||||
|
||||
## 支持的资源
|
||||
|
||||
此配置演示了如何创建 Datadog Monitor,但 Datadog Terraform provider 支持广泛的资源类型,包括:
|
||||
- Monitors(监控器)
|
||||
- Dashboards(仪表板)
|
||||
- Metrics(指标)
|
||||
- Logs(日志)
|
||||
- APM 配置
|
||||
- Security 规则等
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 请确保您的 API 和 APP 密钥具有适当的权限来创建和管理所需的资源
|
||||
- 密钥应该安全存储,不要提交到版本控制系统
|
||||
- 403 错误表示认证失败,请检查您的密钥是否正确且未过期
|
||||
Reference in New Issue
Block a user