feat: add support for regional instance templates (#3224)
This commit is contained in:
@@ -991,7 +991,7 @@ module "sole-tenancy" {
|
|||||||
| [service_account_email](outputs.tf#L73) | Service account email. | |
|
| [service_account_email](outputs.tf#L73) | Service account email. | |
|
||||||
| [service_account_iam_email](outputs.tf#L78) | Service account email. | |
|
| [service_account_iam_email](outputs.tf#L78) | Service account email. | |
|
||||||
| [template](outputs.tf#L87) | Template resource. | |
|
| [template](outputs.tf#L87) | Template resource. | |
|
||||||
| [template_name](outputs.tf#L92) | Template name. | |
|
| [template_name](outputs.tf#L96) | Template name. | |
|
||||||
|
|
||||||
## Fixtures
|
## Fixtures
|
||||||
|
|
||||||
|
|||||||
@@ -86,10 +86,18 @@ output "service_account_iam_email" {
|
|||||||
|
|
||||||
output "template" {
|
output "template" {
|
||||||
description = "Template resource."
|
description = "Template resource."
|
||||||
value = try(google_compute_instance_template.default[0], null)
|
value = (
|
||||||
|
local.template_regional
|
||||||
|
? try(google_compute_region_instance_template.default[0], null)
|
||||||
|
: try(google_compute_instance_template.default[0], null)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
output "template_name" {
|
output "template_name" {
|
||||||
description = "Template name."
|
description = "Template name."
|
||||||
value = try(google_compute_instance_template.default[0].name, null)
|
value = (
|
||||||
|
local.template_regional
|
||||||
|
? try(google_compute_region_instance_template.default[0].name, null)
|
||||||
|
: try(google_compute_instance_template.default[0].name, null)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -332,13 +332,6 @@ resource "google_compute_region_instance_template" "default" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dynamic "network_interface" {
|
|
||||||
for_each = var.network_attached_interfaces
|
|
||||||
content {
|
|
||||||
network_attachment = network_interface.value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scheduling {
|
scheduling {
|
||||||
automatic_restart = !var.options.spot
|
automatic_restart = !var.options.spot
|
||||||
instance_termination_action = local.termination_action
|
instance_termination_action = local.termination_action
|
||||||
|
|||||||
Reference in New Issue
Block a user