Skip to content

Commit

Permalink
Add Terraform snippets for containerapp/jetty/README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mnriem committed Nov 15, 2024
1 parent 1153531 commit 290723d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
13 changes: 13 additions & 0 deletions acr/jetty/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
resource "null_resource" "acr_build" {
provisioner "local-exec" {
command = <<EOT
az acr build --registry ${azurerm_container_registry.joazcr.name} --resource-group ${azurerm_resource_group.joazrg.name} --image ${var.acr_jetty_image} .
EOT
}
depends_on = [azurerm_container_registry.example]
}

resource "local_file" "acr_jetty_build_output" {
content = file("acr_jetty_build_output.txt")
filename = "${path.module}/acr_jetty_build_output.txt"
}
9 changes: 9 additions & 0 deletions acr/jetty/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
output "acr_jetty_image" {
description = "The name of the Jetty image"
value = var.acr_jetty_image
}

output "acr_jetty_build_output" {
description = "The output of the ACR build"
value = local_file.acr_jetty_build_output.filename
}
5 changes: 5 additions & 0 deletions acr/jetty/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variable "acr_jetty_image" {
description = "The name of the Jetty image"
type = string
default = "jetty:latest"
}

0 comments on commit 290723d

Please sign in to comment.