You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Terraform创建Catchpoint SSL测试时遇400 Bad Request错误求助

排查Terraform创建Catchpoint SSL测试时的400 Bad Request错误

你的Terraform配置

resource "ssl_test" "chopper"{
  test_name     = "test"
  provider      = catchpoint
  division_id   = 100
  product_id    = 200
  folder_id     = 300
  monitor       = "ssl"
  test_location = "www.google.com"
  end_time      = "2024-10-30T04:59:00Z"
}

报错信息

ssl_test.chopper: Creating...
│ 
**Error: 400 bad request**
│ 
│   with ssl_test.chopper,
│   on main.tf line 14, in resource "ssl_test" "chopper":
│   14: resource "ssl_test" "chopper"{

可能的原因及解决办法

  • 资源ID无效或无权限
    division_id、product_id、folder_id需确保是当前Catchpoint账号可访问的有效ID,且账号拥有创建SSL测试的权限。登录Catchpoint控制台核对这三个ID的正确性,同时确认账号权限范围。

  • test_location格式不规范
    Catchpoint API可能要求目标地址携带完整协议(如https://www.google.com),而非仅域名。尝试添加HTTPS协议后重新执行terraform apply。

  • end_time设置异常
    若end_time早于当前时间,API会直接返回400错误。检查该时间是否为未来有效时间,同时确认ISO 8601格式无误(当前格式合规,但需保证时间逻辑合理)。

  • 必填参数缺失
    查阅Catchpoint Terraform Provider文档,确认ssl_test资源是否有未配置的必填参数(如测试频率、通知规则等)。缺失必填项会导致API请求不完整,触发400错误。

  • Provider版本兼容性问题
    旧版本的Catchpoint Provider可能存在API兼容bug,尝试升级到最新版本:在versions.tf中指定最新Provider版本,执行terraform init -upgrade后重新运行terraform apply。

内容的提问来源于stack exchange,提问作者Lata

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.22 03:35:00