diff --git a/examples/mig/full/variables.tf b/examples/mig/full/variables.tf index 1f366711..e89f681c 100644 --- a/examples/mig/full/variables.tf +++ b/examples/mig/full/variables.tf @@ -75,17 +75,17 @@ variable "labels" { /* disk */ variable "source_image" { - description = "Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image." + description = "Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image." default = "" } variable "source_image_family" { - description = "Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image." + description = "Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image." default = "" } variable "source_image_project" { - description = "Project where the source image comes from" + description = "Project where the source image comes from. The default project contains Rocky Linux images." default = "" } @@ -123,7 +123,6 @@ variable "additional_disks" { default = [] } - /* metadata */ variable "startup_script" { description = "User startup script to run when instances spin up" diff --git a/examples/umig/full/main.tf b/examples/umig/full/main.tf index f11ca184..9a8dc61e 100644 --- a/examples/umig/full/main.tf +++ b/examples/umig/full/main.tf @@ -15,7 +15,6 @@ */ provider "google" { - project = var.project_id region = var.region } diff --git a/examples/umig/full/variables.tf b/examples/umig/full/variables.tf index 92b7a402..38338385 100644 --- a/examples/umig/full/variables.tf +++ b/examples/umig/full/variables.tf @@ -23,8 +23,6 @@ variable "project_id" { type = string } - - variable "hostname" { description = "Hostname prefix for instances." default = "default" @@ -77,17 +75,17 @@ variable "labels" { /* disk */ variable "source_image" { - description = "Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image." + description = "Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image." default = "" } variable "source_image_family" { - description = "Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image." + description = "Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image." default = "" } variable "source_image_project" { - description = "Project where the source image comes from" + description = "Project where the source image comes from. The default project contains Rocky Linux images." default = "" } diff --git a/modules/instance_template/README.md b/modules/instance_template/README.md index e881f74e..85ed1066 100644 --- a/modules/instance_template/README.md +++ b/modules/instance_template/README.md @@ -44,9 +44,9 @@ See the [simple](../../examples/instance_template/simple) for a usage example. | resource\_policies | A list of self\_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported. | `list(string)` | `[]` | no | | service\_account | Service account to attach to the instance. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#service_account. |
object({
email = string
scopes = set(string)
})
| n/a | yes | | shielded\_instance\_config | Not used unless enable\_shielded\_vm is true. Shielded VM configuration for the instance. |
object({
enable_secure_boot = bool
enable_vtpm = bool
enable_integrity_monitoring = bool
})
|
{
"enable_integrity_monitoring": true,
"enable_secure_boot": true,
"enable_vtpm": true
}
| no | -| source\_image | Source disk image. If neither source\_image nor source\_image\_family is specified, defaults to the latest public CentOS image. | `string` | `""` | no | -| source\_image\_family | Source image family. If neither source\_image nor source\_image\_family is specified, defaults to the latest public CentOS image. | `string` | `"centos-7"` | no | -| source\_image\_project | Project where the source image comes from. The default project contains CentOS images. | `string` | `"centos-cloud"` | no | +| source\_image | Source disk image. If neither source\_image nor source\_image\_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image. | `string` | `""` | no | +| source\_image\_family | Source image family. If neither source\_image nor source\_image\_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image. | `string` | `"rocky-linux-9-optimized-gcp"` | no | +| source\_image\_project | Project where the source image comes from. The default project contains Rocky Linux images. | `string` | `"rocky-linux-cloud"` | no | | spot | Provision a SPOT instance | `bool` | `false` | no | | spot\_instance\_termination\_action | Action to take when Compute Engine preempts a Spot VM. | `string` | `"STOP"` | no | | stack\_type | The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are `IPV4_IPV6` or `IPV4_ONLY`. Default behavior is equivalent to IPV4\_ONLY. | `string` | `null` | no | diff --git a/modules/instance_template/main.tf b/modules/instance_template/main.tf index af4d0d95..c2483352 100644 --- a/modules/instance_template/main.tf +++ b/modules/instance_template/main.tf @@ -19,9 +19,9 @@ ######### locals { - source_image = var.source_image != "" ? var.source_image : "centos-7-v20201112" - source_image_family = var.source_image_family != "" ? var.source_image_family : "centos-7" - source_image_project = var.source_image_project != "" ? var.source_image_project : "centos-cloud" + source_image = var.source_image != "" ? var.source_image : "rocky-linux-9-optimized-gcp-v20240111" + source_image_family = var.source_image_family != "" ? var.source_image_family : "rocky-linux-9-optimized-gcp" + source_image_project = var.source_image_project != "" ? var.source_image_project : "rocky-linux-cloud" boot_disk = [ { diff --git a/modules/instance_template/metadata.yaml b/modules/instance_template/metadata.yaml index 23cece85..b90fcce5 100644 --- a/modules/instance_template/metadata.yaml +++ b/modules/instance_template/metadata.yaml @@ -260,17 +260,17 @@ spec: enable_secure_boot: true enable_vtpm: true - name: source_image - description: Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image. + description: Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image. varType: string defaultValue: "" - name: source_image_family - description: Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image. + description: Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image. varType: string - defaultValue: centos-7 + defaultValue: rocky-linux-9-optimized-gcp - name: source_image_project - description: Project where the source image comes from. The default project contains CentOS images. + description: Project where the source image comes from. The default project contains Rocky Linux images. varType: string - defaultValue: centos-cloud + defaultValue: rocky-linux-cloud - name: spot description: Provision a SPOT instance varType: bool diff --git a/modules/instance_template/variables.tf b/modules/instance_template/variables.tf index 1807d0cd..862bee68 100644 --- a/modules/instance_template/variables.tf +++ b/modules/instance_template/variables.tf @@ -119,21 +119,21 @@ variable "resource_policies" { # disk ####### variable "source_image" { - description = "Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image." + description = "Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image." type = string default = "" } variable "source_image_family" { - description = "Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image." + description = "Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image." type = string - default = "centos-7" + default = "rocky-linux-9-optimized-gcp" } variable "source_image_project" { - description = "Project where the source image comes from. The default project contains CentOS images." + description = "Project where the source image comes from. The default project contains Rocky Linux images." type = string - default = "centos-cloud" + default = "rocky-linux-cloud" } variable "disk_size_gb" { diff --git a/modules/preemptible_and_regular_instance_templates/README.md b/modules/preemptible_and_regular_instance_templates/README.md index e6d6d96b..fce29084 100644 --- a/modules/preemptible_and_regular_instance_templates/README.md +++ b/modules/preemptible_and_regular_instance_templates/README.md @@ -26,9 +26,9 @@ See the [simple](../../examples/preemptible_and_regular_instance_templates/simpl | network | The name or self\_link of the network to attach this interface to. Use network attribute for Legacy or Auto subnetted networks and subnetwork for custom subnetted networks. | `string` | `""` | no | | project\_id | The GCP project ID | `string` | `null` | no | | service\_account | Service account to attach to the instance. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#service_account. |
object({
email = string
scopes = set(string)
})
| n/a | yes | -| source\_image | Source disk image. If neither source\_image nor source\_image\_family is specified, defaults to the latest public CentOS image. | `string` | `""` | no | -| source\_image\_family | Source image family. If neither source\_image nor source\_image\_family is specified, defaults to the latest public CentOS image. | `string` | `""` | no | -| source\_image\_project | Project where the source image comes from | `string` | `""` | no | +| source\_image | Source disk image. If neither source\_image nor source\_image\_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image. | `string` | `""` | no | +| source\_image\_family | Source image family. If neither source\_image nor source\_image\_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image. | `string` | `""` | no | +| source\_image\_project | Project where the source image comes from. The default project contains Rocky Linux images. | `string` | `""` | no | | startup\_script | User startup script to run when instances spin up | `string` | `""` | no | | subnetwork | The name of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. Either network or subnetwork must be provided. | `string` | `""` | no | | subnetwork\_project | The ID of the project in which the subnetwork belongs. If it is not provided, the provider project is used. | `string` | `""` | no | diff --git a/modules/preemptible_and_regular_instance_templates/metadata.yaml b/modules/preemptible_and_regular_instance_templates/metadata.yaml index b4af0f45..a05f0a44 100644 --- a/modules/preemptible_and_regular_instance_templates/metadata.yaml +++ b/modules/preemptible_and_regular_instance_templates/metadata.yaml @@ -152,15 +152,15 @@ spec: defaultValue: null required: true - name: source_image - description: Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image. + description: Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image. varType: string defaultValue: "" - name: source_image_family - description: Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image. + description: Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image. varType: string defaultValue: "" - name: source_image_project - description: Project where the source image comes from + description: Project where the source image comes from. The default project contains Rocky Linux images. varType: string defaultValue: "" - name: startup_script diff --git a/modules/preemptible_and_regular_instance_templates/variables.tf b/modules/preemptible_and_regular_instance_templates/variables.tf index 6939f8ef..a6973954 100644 --- a/modules/preemptible_and_regular_instance_templates/variables.tf +++ b/modules/preemptible_and_regular_instance_templates/variables.tf @@ -54,19 +54,19 @@ variable "labels" { # disk ####### variable "source_image" { - description = "Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image." + description = "Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image." type = string default = "" } variable "source_image_family" { - description = "Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image." + description = "Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public Rocky Linux 9 optimized for GCP image." type = string default = "" } variable "source_image_project" { - description = "Project where the source image comes from" + description = "Project where the source image comes from. The default project contains Rocky Linux images." type = string default = "" }