Source image is getting centos/ appended to the beginning of source_image if using the source_image variable
snahim-g opened this issue · 1 comments
TL;DR
If I put "windows-cloud/windows-2019" for my source image, it is changed to "centos-cloud/windows-cloud/windows-2019" in the disk configuration
Expected behavior
source_image would be the same value that I used and not modified.
Observed behavior
+ disk {
.....
+ source_image = "centos-cloud/windows-cloud/windows-2019"
.......
}
centos-cloud is being appended to the front of my string.
Terraform Configuration
"instance-template" {
source = "terraform-google-modules/vm/google//modules/instance_template"
# version = "~> 7.7.0"
project_id = module.host-project.project_id
name_prefix = "net-c"
tags = var.tags
#labels = var.lables
machine_type = var.machine_type
region = var.primary_region
source_image = var.source_image
disk_size_gb = var.disk_size_gb
disk_type = var.disk_type
network = module.vpc.network_self_link
subnetwork = var.subnet_name
network_ip = var.network_ip
subnetwork_project = module.host-project.project_id
service_account = {
email = null
scopes = []
}
}
Terraform Version
Terraform v1.0.9
on linux_amd64
+ provider registry.terraform.io/hashicorp/google v3.90.1
+ provider registry.terraform.io/hashicorp/google-beta v3.90.1
+ provider registry.terraform.io/hashicorp/null v2.1.2
+ provider registry.terraform.io/hashicorp/random v2.3.1
Additional information
I understand that the terraform registry for the resource allows a list of different formats for source_image, but it uses source image if neither source_image_family or source_image_project are used. If I'm using source_image in this module, would the source_image_project still have to be used? If it's left null, then it defaults to centos-cloud. The registry examples use "source_image = "debian-cloud/debian-9"
, so that format wouldn't be consistent for this variable
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days