Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Unable to create a Disk on GCP using Puppet #8

Open
krishnabasavaraj opened this issue Mar 8, 2018 · 0 comments
Open

Unable to create a Disk on GCP using Puppet #8

krishnabasavaraj opened this issue Mar 8, 2018 · 0 comments
Assignees

Comments

@krishnabasavaraj
Copy link

Following is the code, when i run it it throws the following error.

Puppet Version: 3.8.5
Puppet GCP Puppet Modules version:

google-cloud (v0.2.2)
├── google-gauth (v0.2.0)
├── google-gcompute (v0.2.1)
├── google-gcontainer (v0.2.0)
├── google-gdns (v0.1.1)
├── google-glogging (v0.1.1)
├── google-gpubsub (v0.1.0)
├── google-gspanner (v0.1.0)
├── google-gsql (v0.2.0)
├── google-gstorage (v0.2.0)
├── puppetlabs-apt (v4.5.1)
└── puppetlabs-stdlib (v4.24.0)

Error: Could not prefetch gcompute_disk provider 'google': undefined method []' for nil:NilClass Error: Could not set 'present' on ensure: undefined method []' for nil:NilClass at 19:/etc/puppet/manifests/disk.pp
Error: Could not set 'present' on ensure: undefined method []' for nil:NilClass at 19:/etc/puppet/manifests/disk.pp Wrapped exception: undefined method []' for nil:NilClass
Error: /Stage[main]/Main/Gcompute_disk[data-disk-1]/ensure: change from absent to present failed: Could not set 'present' on ensure: undefined method `[]' for nil:NilClass at 19:/etc/puppet/manifests/disk.pp
Code:

gauth_credential { 'mycred':
path => '/home/dscadmin/gcpkey.json',
provider => serviceaccount,
scopes => ['https://www.googleapis.com/auth/compute'],
}

gcompute_zone { 'us-central1-a':
project => 'google.com:striped-inquiry-194312',
credential => 'mycred',
}

gcompute_disk { 'data-disk-1':
ensure => present,
size_gb => 50,
zone => 'us-central1-a',
project => 'google.com:striped-inquiry-194312',
credential => 'mycred',
}

@nelsonjr nelsonjr self-assigned this Mar 19, 2018
@erjohnso erjohnso assigned erjohnso and unassigned nelsonjr Jun 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants