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

feat: create service account as part of instance template module #475

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

q2w
Copy link
Collaborator

@q2w q2w commented Jan 23, 2025

No description provided.

@q2w q2w changed the title Main feat: create service account as part of instance template module Jan 23, 2025
Copy link
Member

@bharathkkb bharathkkb left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @q2w

description = "Create a new service account to attach to the instance. This is alternate to providing the service_account input variable."
default = {
enabled = true
scopes = ["cloud-platform"]
Copy link
Member

Choose a reason for hiding this comment

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

It's generally not needed to use scope. For this functiality I would recommend changing logic to just use cloud-platform internally if create is true.

default = null
}

variable "create_new_service_account" {
Copy link
Member

Choose a reason for hiding this comment

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

nit: lets name as create_service_account

Comment on lines +24 to +55
variable "region" {
description = "The GCP region to create and test resources in"
type = string
default = "us-central1"
}

variable "subnetwork" {
description = "The name of the subnetwork create this instance in."
default = ""
}

variable "tags" {
type = list(string)
description = "Network tags, provided as a list"
}

variable "labels" {
type = map(string)
description = "Labels, provided as a map"
}

variable "enable_nested_virtualization" {
type = bool
description = "Defines whether the instance should have nested virtualization enabled."
default = false
}

variable "threads_per_core" {
type = string
description = "The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1."
default = null
}
Copy link
Member

Choose a reason for hiding this comment

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

Lets hard code all of these in the example

@@ -0,0 +1,47 @@
/**
* Copyright 2019 Google LLC
Copy link
Member

Choose a reason for hiding this comment

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

nit: update

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