Fixes related to boot_disk in compute-vm module

This commit is contained in:
Miren Esnaola 2023-03-16 14:30:05 +01:00
parent 79a6e9b191
commit 21fa6d1f13
19 changed files with 89 additions and 52 deletions

View File

@ -310,9 +310,11 @@ module "simple-vm-example" {
zone = "europe-west1-b"
name = "test"
boot_disk = {
image = "projects/debian-cloud/global/images/family/cos-97-lts"
type = "pd-balanced"
size = 10
initialize_params = {
image = "projects/debian-cloud/global/images/family/cos-97-lts"
type = "pd-balanced"
size = 10
}
}
}
```

View File

@ -30,9 +30,11 @@ module "mgmt_server" {
}]
service_account_create = true
boot_disk = {
image = var.mgmt_server_config.image
type = var.mgmt_server_config.disk_type
size = var.mgmt_server_config.disk_size
initialize_params = {
image = var.mgmt_server_config.image
type = var.mgmt_server_config.disk_type
size = var.mgmt_server_config.disk_size
}
}
metadata = {
startup-script = <<EOT

View File

@ -81,9 +81,11 @@ module "server" {
}
service_account_create = true
boot_disk = {
image = var.image
type = var.disk_type
size = var.disk_size
initialize_params = {
image = var.image
type = var.disk_type
size = var.disk_size
}
}
group = {
named_ports = {

View File

@ -234,9 +234,11 @@ module "test-vm" {
zone = "${var.region}-b"
name = "nginx-test"
boot_disk = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
initialize_params = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
}
}
metadata = {
user-data = module.cos-nginx.cloud_config

View File

@ -46,9 +46,11 @@ module "test-vm" {
service_account = module.service-account-sql.email
service_account_scopes = ["https://www.googleapis.com/auth/cloud-platform"]
boot_disk = {
image = "projects/debian-cloud/global/images/family/debian-10"
type = "pd-ssd"
size = 10
initialize_params = {
image = "projects/debian-cloud/global/images/family/debian-10"
type = "pd-ssd"
size = 10
}
}
encryption = var.service_encryption_keys != null ? {
encrypt_boot = true

View File

@ -134,10 +134,11 @@ module "vm_example" {
}
]
boot_disk = {
image = "projects/debian-cloud/global/images/family/debian-10"
type = "pd-ssd"
size = 10
encrypt_disk = true
initialize_params = {
image = "projects/debian-cloud/global/images/family/debian-10"
type = "pd-ssd"
size = 10
}
}
tags = ["ssh"]
encryption = {

View File

@ -73,9 +73,11 @@ module "nodes" {
}]
boot_disk = {
image = var.node_image
type = "pd-ssd"
size = var.boot_disk_size
initialize_params = {
image = var.node_image
type = "pd-ssd"
size = var.boot_disk_size
}
}
attached_disks = [{

View File

@ -32,9 +32,11 @@ module "mgmt_server" {
}]
service_account_create = true
boot_disk = {
image = var.mgmt_server_config.image
type = var.mgmt_server_config.disk_type
size = var.mgmt_server_config.disk_size
initialize_params = {
image = var.mgmt_server_config.image
type = var.mgmt_server_config.disk_type
size = var.mgmt_server_config.disk_size
}
}
tags = ["ssh"]
}

View File

@ -30,9 +30,11 @@ module "mgmt_server" {
}]
service_account_create = true
boot_disk = {
image = var.mgmt_server_config.image
type = var.mgmt_server_config.disk_type
size = var.mgmt_server_config.disk_size
initialize_params = {
image = var.mgmt_server_config.image
type = var.mgmt_server_config.disk_type
size = var.mgmt_server_config.disk_size
}
}
}

View File

@ -289,7 +289,9 @@ module "proxy-vm" {
subnetwork = module.vpc.subnet_self_links[format("%s/%s", var.region, var.subnetwork)]
}]
boot_disk = {
image = "projects/cos-cloud/global/images/family/cos-stable"
initialize_params = {
image = "projects/cos-cloud/global/images/family/cos-stable"
}
}
create_template = true
metadata = {

View File

@ -302,7 +302,9 @@ module "vm-onprem" {
instance_type = "f1-micro"
name = "onprem"
boot_disk = {
image = "ubuntu-os-cloud/ubuntu-1804-lts"
initialize_params = {
image = "ubuntu-os-cloud/ubuntu-1804-lts"
}
}
metadata = {
user-data = module.config-onprem.cloud_config

View File

@ -23,9 +23,11 @@ module "gw" {
instance_type = "f1-micro"
boot_disk = {
image = "projects/ubuntu-os-cloud/global/images/family/ubuntu-2004-lts",
type = "pd-ssd",
size = 10
initialize_params = {
image = "projects/ubuntu-os-cloud/global/images/family/ubuntu-2004-lts",
type = "pd-ssd",
size = 10
}
}
network_interfaces = [

View File

@ -161,7 +161,9 @@ module "test-vm" {
name = "${var.name}-test"
instance_type = "e2-micro"
boot_disk = {
image = "projects/ubuntu-os-cloud/global/images/family/ubuntu-2104"
initialize_params = {
image = "projects/ubuntu-os-cloud/global/images/family/ubuntu-2104"
}
}
network_interfaces = [{
network = module.vpc-onprem.self_link

View File

@ -58,9 +58,11 @@ module "vm" {
google-logging-enabled = true
}
boot_disk = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
initialize_params = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
}
}
tags = ["ssh"]
}

View File

@ -41,9 +41,11 @@ module "vm" {
google-logging-enabled = true
}
boot_disk = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
initialize_params = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
}
}
tags = ["dns", "ssh"]
}

View File

@ -25,9 +25,11 @@ module "vm-nginx-tls" {
google-logging-enabled = true
}
boot_disk = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
initialize_params = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
}
}
tags = ["http-server", "https-server", "ssh"]
}

View File

@ -41,9 +41,11 @@ module "vm-nginx-tls" {
google-logging-enabled = true
}
boot_disk = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
initialize_params = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
}
}
tags = ["http-server", "ssh"]
}

View File

@ -54,9 +54,11 @@ module "vm" {
google-logging-enabled = true
}
boot_disk = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
initialize_params = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
}
}
tags = ["nva", "ssh"]
}

View File

@ -132,9 +132,11 @@ module "instance-group" {
addresses = null
}]
boot_disk = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
initialize_params = {
image = "projects/cos-cloud/global/images/family/cos-stable"
type = "pd-ssd"
size = 10
}
}
tags = ["http-server", "ssh"]
metadata = {