Skip to main content

google_spanner_instance resource


A google_spanner_instance is used to test a Google Instance resource


describe google_spanner_instance(project: 'chef-gcp-inspec', name: 'spinstance', config: 'regional-us-east1') do
  it { should exist }
  its('config') { should match 'regional-us-east1' }
  its('name') { should match 'spinstance' }
  its('display_name') { should eq 'inspectest' }
  its('node_count') { should eq '1' }
  its('labels') { should include('env' => 'test') }


Properties that can be accessed from the google_spanner_instance resource:

A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length.
The name of the instance’s configuration (similar but not quite the same as a region) which defines defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form regional-europe-west1 , us-central etc. In order to obtain a valid list please consult the Configuration section of the docs.
The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
The number of nodes allocated to this instance.
An object containing a list of "key": "value" pairs. Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.

GCP Permissions

Ensure the Cloud Spanner API is enabled for the current project.

Edit this page on GitHub

Thank you for your feedback!


Search Results