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

Add labels to resources/modules where missing #83

Merged
merged 2 commits into from
Jan 26, 2022

Conversation

heyealex
Copy link
Contributor

Added labels to:

  • project factory
  • boot disk for simple-instance
  • GCS bucket for startup-scripts

Terraform state bucket can't be added as we don't create a bucket, but rather use a pre-defined one.

Submission Checklist:

  • Have you installed and run this change against pre-commit? pre-commit install
  • Are all tests passing? make tests
  • If applicable, have you written additional unit tests to cover this
    change?
  • Is unit test coverage still above 80%?
  • Have you updated any application documentation such as READMEs and user
    guides?
  • Have you followed the guidelines in our Contributing document?

Add Labels to components of resources that were previously missing them:
* Boot disk for simple-instance
* Project Factory
* Startup script GCS bucket
@heyealex heyealex requested a review from cboneti January 25, 2022 20:55
Copy link
Member

@cboneti cboneti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor comments

resources/compute/simple-instance/main.tf Show resolved Hide resolved
@@ -24,4 +24,6 @@ module "project_factory" {
org_id = var.org_id
billing_account = var.billing_account
default_service_account = var.default_service_account
labels = var.labels
bucket_labels = var.labels
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you are not creating a bucket, please do not set this.
If you do set this, then expose a variable called bucket_labels with a default null. And then assign this line to local.bucket_labels.
In the locals block:
bucket_labels = var.bucket_labels == null ? var.labels : var.bucket_labels

@heyealex heyealex merged commit 9d56fe5 into GoogleCloudPlatform:develop Jan 26, 2022
@heyealex heyealex deleted the add-labels branch January 26, 2022 00:13
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

Successfully merging this pull request may close these issues.

2 participants