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

Standard persistent disk instead of an SSD #42

Open
pegasd opened this issue Jun 10, 2018 · 1 comment
Open

Standard persistent disk instead of an SSD #42

pegasd opened this issue Jun 10, 2018 · 1 comment

Comments

@pegasd
Copy link

pegasd commented Jun 10, 2018

The following code generates a Standard persistent disk, while I'm expecting to get an SSD:

gauth_credential { 'mycred':
  path     => $credential_path,
  provider => serviceaccount,
  scopes   => [
    'https://www.googleapis.com/auth/compute',
  ],
}

gcompute_zone { $zone:
  project    => $gcp_project,
  credential => 'mycred',
}

gcompute_disk_type { 'pd-ssd':
  default_disk_size_gb => 100,
  project              => $gcp_project,
  zone                 => $zone,
  credential           => 'mycred',
}

gcompute_disk { 'mydisk':
  ensure       => present,
  size_gb      => 100,
  zone         => $zone,
  project      => $gcp_project,
  credential   => 'mycred',
  source_image => gcompute_image_family('ubuntu-1804-lts', 'ubuntu-os-cloud'),
  type         => 'pd-ssd',
}

The code gets applied, seemingly, without errors:

Notice: Compiled catalog for localhost in environment production in 0.41 seconds
Notice: /Stage[main]/Main/Gcompute_disk[mydisk]/ensure: created
Notice: Applied catalog in 4.82 seconds

On subsequent runs the following error occurs:

Notice: Compiled catalog for localhost in environment production in 0.42 seconds
Error: /Stage[main]/Main/Gcompute_disk[mydisk]: Could not evaluate: Disk cannot be edited
Notice: /Stage[main]/Main/Gcompute_disk[mydisk]/type: type changed 'https://www.googleapis.com/compute/v1/projects/[ ... snip ... ]/zones/[ ... snip ... ]/diskTypes/pd-standard' to 'pd-ssd'
Notice: Applied catalog in 1.46 seconds

@nat-henderson
Copy link
Contributor

This is fixed in #67.

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

2 participants