Skip to content

Commit

Permalink
update google terraform version, replace container registry by artifa…
Browse files Browse the repository at this point in the history
…ct registry
  • Loading branch information
swapkh91 committed Jan 8, 2025
1 parent 509be4f commit 481e9e2
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/_nebari/stages/infrastructure/template/gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ data "google_compute_zones" "gcpzones" {

module "registry-jupyterhub" {
source = "./modules/registry"

repository_id = "${var.name}-${var.environment}"
location = var.region
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
resource "google_container_registry" "registry" {
location = var.location
resource "google_artifact_registry_repository" "registry" {
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/artifact_registry_repository#argument-reference
repository_id = var.repository_id
location = var.location
format = var.format
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
variable "location" {
# https://cloud.google.com/container-registry/docs/pushing-and-pulling#pushing_an_image_to_a_registry
# https://cloud.google.com/artifact-registry/docs/docker/pushing-and-pulling
description = "Location of registry"
type = string
default = "US"
}

variable "format" {
# https://cloud.google.com/artifact-registry/docs/reference/rest/v1/projects.locations.repositories#Format
description = "The format of packages that are stored in the repository"
type = string
default = "DOCKER"
}

variable "repository_id" {
description = "Name of repository"
type = string
}
2 changes: 1 addition & 1 deletion src/_nebari/stages/infrastructure/template/gcp/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "4.8.0"
version = "6.14.1"
}
}
required_version = ">= 1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/_nebari/stages/terraform_state/template/gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "4.83.0"
version = "6.14.1"
}
}
required_version = ">= 1.0"
Expand Down

0 comments on commit 481e9e2

Please sign in to comment.