Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The default for image_family seems to be outdated #101

Closed
chanux opened this issue Feb 3, 2022 · 2 comments · Fixed by #102
Closed

The default for image_family seems to be outdated #101

chanux opened this issue Feb 3, 2022 · 2 comments · Fixed by #102
Labels
bug Something isn't working P1 highest priority issues triaged Scoped and ready for work

Comments

@chanux
Copy link

chanux commented Feb 3, 2022

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:[email protected]",
  ]
}


### 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

@chanux chanux added the bug Something isn't working label Feb 3, 2022
@catherinetcai
Copy link
Contributor

catherinetcai commented Mar 9, 2022

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
Copy link

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"
  ...

@morgante morgante added P1 highest priority issues triaged Scoped and ready for work labels Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 highest priority issues triaged Scoped and ready for work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants