Skip to content

Commit e4958bb

Browse files
authored
update google terraform version, replace container registry by artifact registry (#2902)
2 parents 5ea1874 + 6247ef2 commit e4958bb

File tree

5 files changed

+23
-6
lines changed

5 files changed

+23
-6
lines changed

src/_nebari/stages/infrastructure/template/gcp/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ data "google_compute_zones" "gcpzones" {
55

66
module "registry-jupyterhub" {
77
source = "./modules/registry"
8+
9+
repository_id = "${var.name}-${var.environment}"
10+
location = var.region
811
}
912

1013

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
resource "google_container_registry" "registry" {
2-
location = var.location
1+
resource "google_artifact_registry_repository" "registry" {
2+
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/artifact_registry_repository#argument-reference
3+
repository_id = var.repository_id
4+
location = var.location
5+
format = var.format
36
}
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
variable "location" {
2-
# https://cloud.google.com/container-registry/docs/pushing-and-pulling#pushing_an_image_to_a_registry
2+
# https://cloud.google.com/artifact-registry/docs/docker/pushing-and-pulling
33
description = "Location of registry"
44
type = string
5-
default = "US"
5+
}
6+
7+
variable "format" {
8+
# https://cloud.google.com/artifact-registry/docs/reference/rest/v1/projects.locations.repositories#Format
9+
description = "The format of packages that are stored in the repository"
10+
type = string
11+
default = "DOCKER"
12+
}
13+
14+
variable "repository_id" {
15+
description = "Name of repository"
16+
type = string
617
}

src/_nebari/stages/infrastructure/template/gcp/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
google = {
44
source = "hashicorp/google"
5-
version = "4.8.0"
5+
version = "6.14.1"
66
}
77
}
88
required_version = ">= 1.0"

src/_nebari/stages/terraform_state/template/gcp/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ terraform {
2424
required_providers {
2525
google = {
2626
source = "hashicorp/google"
27-
version = "4.83.0"
27+
version = "6.14.1"
2828
}
2929
}
3030
required_version = ">= 1.0"

0 commit comments

Comments
 (0)