google-cloud-bigtable - 使用部署管理器部署 Google Cloud Bigtable
问题描述
我正在尝试使用以下 YAML 配置文件部署 Bigtable 实例:
resources:
- name: foo-bigtable-instance
type: bigtableadmin.v2.instance
properties:
name: foo
displayName: Foo Bigtable Instance
type: Development
当我调用gcloud deployment-manager deployments create时,出现以下错误...
ERROR: (gcloud.deployment-manager.deployments.create) Error in Operation [operation-1545154324304-57d4f469f9081-51e37137-270e5638]: errors:
- code: MISSING_REQUIRED_FIELD
location: /deployments/sam-poc-deployment/resources/foo-bigtable-instance->$.properties->$.parent
message: |-
Missing required field 'parent' with schema:
{
"type" : "string"
}
什么是必需的“父”属性?该错误表明它是一个具有名为“type”的单个字段的对象。
但是“父母”代表什么?“类型”的允许值是多少?文档中未提及“父”属性。
解决方案
您的yaml 文件中有一些错误。我相信这种修改可以解决您的问题:
resources:
- type: bigtableadmin.v2.instance
name: foo-bigtable-instance
properties:
instanceId: [AN_INSTANCE_ID]
parent: projects/[YOUR_PROJECT]
instance:
displayName: Foo Bigtable Instance
type: DEVELOPMENT
clusters:
initial:
defaultStorageType: HDD
location: projects/[YOUR_PROJECT]/locations/[PREFERRED_LOCATION ]
另外,我注意到您使用的是文档,projects.instances
但在这种情况下,最好使用projects.instances.create
. 它包含有关实例创建和所需字段的更多信息。您也可以参考GCP 提供的关于此类操作的各种示例。
推荐阅读
- sql-server - MSSQL 用户定义数据类型创建时间
- c++ - 从文本文件中检索字符串并使用 substr() 产生 \xxx 字符串值
- visual-studio - 共享点中 global.asax 中的 Application_BeginRequest 事件
- android - 安卓小部件。强制停止后如何恢复进程?
- java - Spring Batch 3.0:StepExecutionListener 用于分区 Step 并将执行上下文值级联到分区作业
- swift - 实现泛型协议方法,但对整个类使用泛型
- c - 在“bind -x”bash 回调中更改了 TTY 键码
- apache-kafka - 卡夫卡连接错误:java.util.concurrent.ExecutionException:org.apache.kafka.connect.runtime.rest.errors.BadRequestException
- react-native - 简单的 React Native Button 不运行函数 onPress
- reactjs - 赛普拉斯错误“自动化客户端已断开连接。无法继续运行测试。” 在 Docker 中运行时