Skip to content

Commit

Permalink
add cos_image_name to container module, by only using the last elemen…
Browse files Browse the repository at this point in the history
…t of the string
  • Loading branch information
dimisjim authored Apr 18, 2024
1 parent 47bcb77 commit e533d6b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ module "container" {
source = "terraform-google-modules/container-vm/google"
version = "3.1.1"

cos_image_name = element(split("/", var.machine_image), length(split("/", var.machine_image))-1)

container = {
image = var.image
securityContext = {
Expand Down

0 comments on commit e533d6b

Please sign in to comment.