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

无法创建Google Deployment Manager运行时配置变量的原因排查

Troubleshooting "BAD_REQUEST" Error for RuntimeConfig Variable in Google Deployment Manager

Problem Statement

I'm attempting to create a Runtime Config variable via Google Deployment Manager using this YAML configuration:

resources:
- name: star-config
  type: runtimeconfig.v1beta1.config
  properties:
    name: star-config
- name: igurl_variable
  type: runtimeconfig.v1beta1.variable
  properties:
    name: igurl_variable
    value: 'trek'
    parent: $(ref.star-config.name)

When I run the deployment, the logs show a bad_request status, and audit logs return { message: "BAD_REQUEST" }. What’s causing this?


Root Causes & Fixes

Let's break down the most likely issues and how to fix them:

  • Incorrect field used for the variable's relative name
    This is the primary culprit. When you specify a parent (your star-config resource) for the variable, you shouldn't use the name field in the variable's properties. The name field expects a full, absolute resource path (like projects/your-project-id/configs/star-config/variables/igurl_variable), while parent tells the API to use a relative path. To define the variable's short name alongside parent, you need to use relativeName instead.

    Here's the corrected variable block:

    - name: igurl_variable
      type: runtimeconfig.v1beta1.variable
      properties:
        relativeName: igurl_variable
        value: 'trek'
        parent: $(ref.star-config.name)
    
  • Redundant name property in the Config resource
    While this isn't causing the BAD_REQUEST, the name field inside your star-config properties is unnecessary. Deployment Manager automatically uses the top-level name (under resources) to generate the Config resource's identifier. You can safely remove that line to clean up your config:

    - name: star-config
      type: runtimeconfig.v1beta1.config
      # Removed redundant properties.name entry
    
  • Runtime Config API not enabled
    If you haven't enabled the Runtime Config API for your Google Cloud project, Deployment Manager can't create these resources, which will trigger a BAD_REQUEST error. Head to your Cloud Console's API Library to verify the API is enabled.


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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.22 08:10:38