The default for image_family seems to be outdated
chanux opened this issue · 2 comments
chanux commented
TL;DR
centos-8
the current default for image_family
seems to no longer exist. Centos 8 reached EOL at the end of 2021 apparently.
Expected behavior
Use the module without changing image_family
and everything goes well.
Observed behavior
Things fall apart with the following error:
│ Error: 1 error occurred:
│ * Could not find image or family centos-cloud/centos-8
Terraform Configuration
module "iap_bastion" {
source = "terraform-google-modules/bastion-host/google"
version = "~> 4.0"
name = "bastion1"
project = local.project_id
zone = "us-central1-c"
network = module.vpc.network_name
subnet = module.vpc.subnets_self_links[index(module.vpc.subnets_names, "snet1")]
#image_family = "centos-8"
members = [
"group:a@example.com",
]
}
### Terraform Version
```sh
Terraform v1.1.4
on darwin_amd64
+ provider registry.terraform.io/hashicorp/google v4.7.0
+ provider registry.terraform.io/hashicorp/google-beta v4.7.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
Additional information
No response
catherinetcai commented
This is what gcloud compute images list | grep centos
returns:
gcloud compute images list | grep centos
centos-7-v20220303 centos-cloud centos-7 READY
centos-stream-8-v20220303 centos-cloud centos-stream-8 READY
centos-stream-9-v20220308 centos-cloud centos-stream-9 READY
Looks like it can just default to centos-stream-8
or centos-stream-9
.
kevincantu commented
GCP's note on this deprecation:
https://cloud.google.com/compute/docs/eol/centos-eol-guidance
Debian seems to work, too!
module "iap_bastion" {
name = "bastion"
source = "terraform-google-modules/bastion-host/google"
version = "4.1.0"
// https://cloud.google.com/compute/docs/images/os-details#debian
image_project = "debian-cloud"
image_family = "debian-11"
...