Skip to main content

google_compute_backend_bucket resource


A google_compute_backend_bucket is used to test a Google BackendBucket resource

Beta Resource

This resource has beta fields available. To retrieve these fields, include beta: true in the constructor for the resource


describe google_compute_backend_bucket(project: 'chef-gcp-inspec', name: 'inspec-gcp-backend-bucket') do
  it { should exist }
  its('description') { should eq 'Backend bucket example' }
  its('enable_cdn') { should be 'true' }
  its('bucket_name') { should eq 'gcp-inspec-storage-bucket' }

describe google_compute_backend_bucket(project: 'chef-gcp-inspec', name: 'nonexistent') do
  it { should_not exist }


Properties that can be accessed from the google_compute_backend_bucket resource:

Cloud Storage bucket name.
Cloud CDN configuration for this Backend Bucket.
Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a “Cache-Control: public, max-age=[TTL]” header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
Creation timestamp in RFC3339 text format.
An optional textual description of the resource; provided by the client when the resource is created.
If true, enable Cloud CDN for this BackendBucket.
Unique identifier for the resource.
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

GCP Permissions

Ensure the Compute Engine API is enabled for the current project.