Skip to content

Explicitly define labels at google_compute_instance_from_template#4055

Merged
mr0re1 merged 1 commit into
GoogleCloudPlatform:developfrom
mr0re1:blue_label
May 5, 2025
Merged

Explicitly define labels at google_compute_instance_from_template#4055
mr0re1 merged 1 commit into
GoogleCloudPlatform:developfrom
mr0re1:blue_label

Conversation

@mr0re1

@mr0re1 mr0re1 commented May 2, 2025

Copy link
Copy Markdown
Collaborator

Explicitly define labels at google_compute_instance_from_template
to workaround hashicorp/terraform-provider-google#21693

Effect: Restores labels (both customer defined and gcluster ones) on login and controller VM instances.

NON-BREAKING change:

$ g co blue_label
Switched to branch 'blue_label'
$ make && ./ghpc deploy qq.yaml --force
...
Terraform will perform the following actions:

  # module.slurm_controller.google_compute_instance_from_template.controller will be updated in-place
  ~ resource "google_compute_instance_from_template" "controller" {
      ~ effective_labels           = {
          + "ghpc_blueprint"             = "qq"
          ...
          + "slurm_instance_role"        = "controller"
            # (1 unchanged element hidden)
        }
        id                         = "projects/X/zones/us-central1-a/instances/qq-controller"
      ~ labels                     = {
          + "ghpc_blueprint"      = "qq"
          ...
          + "slurm_instance_role" = "controller"
        }
        ...
      ~ terraform_labels           = {
          + "ghpc_blueprint"             = "qq"
          ...
          + "slurm_instance_role"        = "controller"
            # (1 unchanged element hidden)
        }
        # (22 unchanged attributes hidden)

        # (9 unchanged blocks hidden)
    }

# module.slurm_controller.module.login["slurm-login"].module.instance.google_compute_instance_from_template.slurm_instance[0] will be updated in-place
  ~ resource "google_compute_instance_from_template" "slurm_instance" {
      ~ effective_labels           = {
          + "ghpc_blueprint"             = "qq"
          ...
          + "slurm_instance_role"        = "login"
            # (1 unchanged element hidden)
        }
        id                         = "projects/X/zones/us-central1-a/instances/qq-slurm-login-001"
      ~ labels                     = {
          + "ghpc_blueprint"             = "qq"
         ...
          + "slurm_instance_role"        = "login"
        }
        ...
      ~ terraform_labels           = {
          + "ghpc_blueprint"             = "qq"
          ...
          + "slurm_instance_role"        = "login"
            # (1 unchanged element hidden)
        }
        # (22 unchanged attributes hidden)

        # (7 unchanged blocks hidden)
    }

Plan: 0 to add, 2 to change, 0 to destroy.

@mr0re1 mr0re1 added the release-bugfix Added to release notes under the "Bug fixes" heading. label May 2, 2025
@mr0re1 mr0re1 requested review from a team and samskillman as code owners May 2, 2025 23:13
Comment thread community/modules/internal/slurm-gcp/instance/main.tf
@mr0re1 mr0re1 merged commit d35dfca into GoogleCloudPlatform:develop May 5, 2025
13 of 66 checks passed
@mr0re1 mr0re1 deleted the blue_label branch May 5, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-bugfix Added to release notes under the "Bug fixes" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants