3
votes

I am trying to deploy a Bigtable instance with the following YAML config file:

resources:
- name: foo-bigtable-instance
  type: bigtableadmin.v2.instance
  properties:
     name: foo
     displayName: Foo Bigtable Instance
     type: Development

When I invoke gcloud deployment-manager deployments create I get the following error...

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"
    }

What is the required 'parent' property? The error suggests it is an object with a single field named "type".

But what does the 'parent' represent? And what are the allowed values for the 'type'? The 'parent' property is not mentioned in the Documentation.

2

2 Answers

3
votes

There are some errors in your yaml file. I believe that this modifications can solve your issue:

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 ]

Also, I noticed that you are using the documentation of projects.instances but, in this case, is better to use the one for projects.instances.create. It has more information about the instance creation and the needed fields. You can also refer to the various examples provided by GCP about this kind of operations.

2
votes

It's somewhat confusing as the parent is actually defined in the path of the create operation for that resource. It represents the project owning the Bigtable instance. See the Bigtable snippet for a better idea of usage.