Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy Google Cloud Bigtable with deployment manager

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.

like image 799
Greg McFall Avatar asked May 20 '26 07:05

Greg McFall


1 Answers

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.

like image 77
Nahuel Varela Avatar answered May 22 '26 00:05

Nahuel Varela



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!