Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to properly register tags in chef cookbook for gcloud instance? #85

Open
alobkov opened this issue Jul 2, 2020 · 0 comments
Open

Comments

@alobkov
Copy link

alobkov commented Jul 2, 2020

The recipe:

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'
        }
      ]
    }
  ]
  tags { 
    items
         [  
          'instance-test'
         ]
  }
  zone 'us-central1-a'
  project ENV['GCP_PROJECT']
  credential 'mycred'
end

An error:

[2020-07-01T19:26:56+03:00] FATAL: RuntimeError: Property `tags` of `gcompute_instance[instance-test]` was incorrectly passed a block. Possible property-resource collision. To call a resource named `tags` either rename the property or else use `declare_resource(:tags, ...)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant