Add Shielded VM config option to compute-vm (#111)
* Add shielded config option to compute-vm * Update CHANGELOG
This commit is contained in:
parent
4beedc5ba8
commit
569e52e12a
|
@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
- add support for Shielded VM to `compute-vm`
|
||||
|
||||
## [2.4.1] - 2020-07-06
|
||||
|
||||
- better fix external IP assignment in `compute-vm`
|
||||
|
|
|
@ -167,6 +167,7 @@ module "instance-group" {
|
|||
| *service_account* | Service account email. Unused if service account is auto-created. | <code title="">string</code> | | <code title="">null</code> |
|
||||
| *service_account_create* | Auto-create service account. | <code title="">bool</code> | | <code title="">false</code> |
|
||||
| *service_account_scopes* | Scopes applied to service account. | <code title="list(string)">list(string)</code> | | <code title="">[]</code> |
|
||||
| *shielded_config* | Shielded VM configuration of the instances. | <code title="object({ enable_secure_boot = bool enable_vtpm = bool enable_integrity_monitoring = bool })">object({...})</code> | | <code title="">null</code> |
|
||||
| *tags* | Instance tags. | <code title="list(string)">list(string)</code> | | <code title="">[]</code> |
|
||||
| *use_instance_template* | Create instance template instead of instances. | <code title="">bool</code> | | <code title="">false</code> |
|
||||
|
||||
|
|
|
@ -163,9 +163,17 @@ resource "google_compute_instance" "default" {
|
|||
scopes = local.service_account_scopes
|
||||
}
|
||||
|
||||
# guest_accelerator
|
||||
# shielded_instance_config
|
||||
dynamic shielded_instance_config {
|
||||
for_each = var.shielded_config != null ? [var.shielded_config] : []
|
||||
iterator = config
|
||||
content {
|
||||
enable_secure_boot = config.value.enable_secure_boot
|
||||
enable_vtpm = config.value.enable_vtpm
|
||||
enable_integrity_monitoring = config.value.enable_integrity_monitoring
|
||||
}
|
||||
}
|
||||
|
||||
# guest_accelerator
|
||||
}
|
||||
|
||||
resource "google_compute_instance_iam_binding" "default" {
|
||||
|
|
|
@ -218,3 +218,13 @@ variable "zone" {
|
|||
description = "Compute zone."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "shielded_config" {
|
||||
description = "Shielded VM configuration of the instances."
|
||||
type = object({
|
||||
enable_secure_boot = bool
|
||||
enable_vtpm = bool
|
||||
enable_integrity_monitoring = bool
|
||||
})
|
||||
default = null
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue