Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

google-gresourcemanager (1) Versions 0.1.1

A Chef cookbook to manage Google Cloud ResourceManager resources

Policyfile
Berkshelf
Knife
cookbook 'google-gresourcemanager', '~> 0.1.1', :supermarket
cookbook 'google-gresourcemanager', '~> 0.1.1'
knife supermarket install google-gresourcemanager
knife supermarket download google-gresourcemanager
README
Dependencies
Changelog
Quality 33%

Google Cloud Resource Manager Chef Cookbook

This cookbook provides the built-in types and services for Chef to manage
Google Cloud Resource Manager resources, as native Chef types.

Requirements

Platforms

Supported Operating Systems

This cookbook was tested on the following operating systems:

  • RedHat 6, 7
  • CentOS 6, 7
  • Debian 7, 8
  • Ubuntu 12.04, 14.04, 16.04, 16.10
  • SLES 11-sp4, 12-sp2
  • openSUSE 13
  • Windows Server 2008 R2, 2012 R2, 2012 R2 Core, 2016 R2, 2016 R2 Core

Example

gauth_credential 'mycred' do
  action :serviceaccount
  path ENV['CRED_PATH'] # e.g. '/path/to/my_account.json'
  scopes [
    'https://www.googleapis.com/auth/cloud-platform'
  ]
end

gcompute_zone 'us-west1-a' do
  action :create
  project ENV['PROJECT'] # ex: 'my-test-project'
  credential 'mycred'
end

gcompute_disk 'instance-test-os-1' do
  action :create
  source_image 'projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts'
  zone 'us-west1-a'
  project ENV['PROJECT'] # ex: 'my-test-project'
  credential 'mycred'
end

gcompute_network 'mynetwork-test' do
  action :create
  project ENV['PROJECT'] # ex: 'my-test-project'
  credential 'mycred'
end

gcompute_region 'us-west1' do
  action :create
  project ENV['PROJECT'] # ex: 'my-test-project'
  credential 'mycred'
end

gcompute_address 'instance-test-ip' do
  action :create
  region 'us-west1'
  project ENV['PROJECT'] # ex: 'my-test-project'
  credential 'mycred'
end

gcompute_machine_type 'n1-standard-1' do
  action :create
  zone 'us-west1-a'
  project ENV['PROJECT'] # ex: 'my-test-project'
  credential 'mycred'
end

gcompute_instance 'instance-test' do
  action :create
  machine_type 'n1-standard-1'
  disks [
    {
      boot: true,
      auto_delete: true,
      source: 'instance-test-os-1'
    }
  ]
  network_interfaces [
    {
      network: 'mynetwork-test',
      access_configs: [
        {
          name: 'External NAT',
          nat_ip: 'instance-test-ip',
          type: 'ONE_TO_ONE_NAT'
        }
      ]
    }
  ]
  zone 'us-west1-a'
  project ENV['PROJECT'] # ex: 'my-test-project'
  credential 'mycred'
end

Credentials

All Google Cloud Platform cookbooks use an unified authentication mechanism,
provided by the google-gauth cookbook. Don't worry, it is automatically
installed when you install this module.

Example

gauth_credential 'mycred' do
  action :serviceaccount
  path ENV['CRED_PATH'] # e.g. '/path/to/my_account.json'
  scopes [
    'https://www.googleapis.com/auth/cloud-platform'
  ]
end

For complete details of the authentication cookbook, visit the
google-gauth cookbook documentation.

Resources

  • gresourcemanager_project - Represents a GCP Project. A project is a container for ACLs, APIs, App Engine Apps, VMs, and other Google Cloud Platform resources.

gresourcemanager_project

Represents a GCP Project. A project is a container for ACLs, APIs, App
Engine Apps, VMs, and other Google Cloud Platform resources.

Example

gauth_credential 'mycred' do
  action :defaultuseraccount
  scopes [
    'https://www.googleapis.com/auth/cloud-platform'
  ]
end

gresourcemanager_project 'sample-testproj' do
  action :create
  project_id ENV['project_id']
  project_name 'My Sample Project'
  credential 'mycred'
end

Reference

gresourcemanager_project 'id-for-resource' do
  create_time     time
  id              string
  labels          namevalues
  lifecycle_state 'LIFECYCLE_STATE_UNSPECIFIED', 'ACTIVE', 'DELETE_REQUESTED' or 'DELETE_IN_PROGRESS'
  name            string
  number          integer
  parent          {
    id   string,
    type string,
  }
  project         string
  credential      reference to gauth_credential
end

Actions

  • create - Converges the gresourcemanager_project resource into the final state described within the block. If the resource does not exist, Chef will attempt to create it.
  • delete - Ensures the gresourcemanager_project resource is not present. If the resource already exists Chef will attempt to delete it.

Properties

  • number -
    Output only. Number uniquely identifying the project.

  • lifecycle_state -
    Output only. The Project lifecycle state.

  • name -
    The user-assigned display name of the Project. It must be 4 to 30
    characters. Allowed characters are: lowercase and uppercase letters,
    numbers, hyphen, single-quote, double-quote, space, and exclamation
    point.

  • create_time -
    Output only. Time of creation

  • labels -
    The labels associated with this Project.
    Label keys must be between 1 and 63 characters long and must conform
    to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])?.
    Label values must be between 0 and 63 characters long and must
    conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)?.
    No more than 256 labels can be associated with a given resource.
    Clients should store labels in a representation such as JSON that
    does not depend on specific characters being disallowed

  • parent -
    A parent organization

  • parent/type
    Must be organization.

  • parent/id
    Id of the organization

  • id -
    Required. The unique, user-assigned ID of the Project. It must be 6 to 30
    lowercase letters, digits, or hyphens. It must start with a letter.
    Trailing hyphens are prohibited.

Label

Set the p_label property when attempting to set primary key
of this object. The primary key will always be referred to by the initials of
the resource followed by "_label"

Dependent cookbooks

google-gauth < 0.3.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Changelog

0.1.0 (2017-10-17)

Initial release

Collaborator Number Metric
            

0.1.1 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.1.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.1.1 passed this metric

No Binaries Metric
            

0.1.1 passed this metric

Testing File Metric
            

0.1.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.1.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number