Skip to content

feat: adds region settings used to configure the instance template #131

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

Merged
merged 4 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ If the user does not share the same domain as the org the bastion is in, you wil
| preemptible | Allow the instance to be preempted | `bool` | `false` | no |
| project | The project ID to deploy to | `string` | n/a | yes |
| random\_role\_id | Enables role random id generation. | `bool` | `true` | no |
| region | The region where the bastion instance template will live | `string` | `null` | no |
| scopes | List of scopes to attach to the bastion host | `list(string)` | <pre>[<br> "cloud-platform"<br>]</pre> | no |
| service\_account\_email | If set, the service account and its permissions will not be created. The service account being passed in should have at least the roles listed in the `service_account_roles` variable so that logging and OS Login work as expected. | `string` | `""` | no |
| service\_account\_name | Account ID for the service account | `string` | `"bastion"` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module "instance_template" {
subnetwork = var.subnet
subnetwork_project = var.host_project
additional_networks = var.additional_networks
region = var.region

service_account = {
email = local.service_account_email
Expand Down
7 changes: 7 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ variable "zone" {
default = "us-central1-a"
}

variable "region" {
type = string

description = "The region where the bastion instance template will live"
default = null
}

variable "random_role_id" {
type = bool

Expand Down