-
Notifications
You must be signed in to change notification settings - Fork 368
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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"] |
There was a problem hiding this comment.
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" { |
There was a problem hiding this comment.
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
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 | ||
} |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: update
No description provided.