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

Standard persistent disk instead of an SSD #42

@pegasd

Description

@pegasd

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


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions