Skip to content

Commit

Permalink
feat: add preemptible option. (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
Djabx committed Apr 9, 2021
1 parent cdd37ff commit 7303a05
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ If the user does not share the same domain as the org the bastion is in, you wil
| name | Name of the Bastion instance | `string` | `"bastion-vm"` | no |
| name\_prefix | Name prefix for instance template | `string` | `"bastion-instance-template"` | no |
| network | Self link for the network on which the Bastion should live | `string` | n/a | yes |
| 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 |
| scopes | List of scopes to attach to the bastion host | `list(string)` | <pre>[<br> "cloud-platform"<br>]</pre> | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module "instance_template" {
source_image_family = var.image_family
source_image_project = var.image_project
startup_script = var.startup_script
preemptible = var.preemptible

tags = var.tags
labels = var.labels
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ variable "ephemeral_ip" {
default = false
}

variable "preemptible" {
type = bool
description = "Allow the instance to be preempted"
default = false
}

variable "access_config" {
description = "Access configs for network, nat_ip and DNS"
type = list(object({
Expand Down

0 comments on commit 7303a05

Please sign in to comment.