Skip to content

Commit

Permalink
update to meet avm spec
Browse files Browse the repository at this point in the history
  • Loading branch information
lonegunmanb committed Jul 4, 2024
1 parent c49faef commit 3ba00ee
Show file tree
Hide file tree
Showing 15 changed files with 81 additions and 65 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The following resources are used by this module:

The following input variables are required:

### <a name="input_container_app_environment_id"></a> [container\_app\_environment\_id](#input\_container\_app\_environment\_id)
### <a name="input_container_app_environment_resource_id"></a> [container\_app\_environment\_resource\_id](#input\_container\_app\_environment\_resource\_id)

Description: The ID of the Container App Environment to host this Container App.

Expand Down
8 changes: 4 additions & 4 deletions examples/acr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,10 @@ resource "azurerm_container_app_environment" "example" {
module "container_apps" {
source = "../.."
resource_group_name = azurerm_resource_group.test.name
container_app_environment_id = azurerm_container_app_environment.example.id
name = "nginx"
revision_mode = "Single"
resource_group_name = azurerm_resource_group.test.name
container_app_environment_resource_id = azurerm_container_app_environment.example.id
name = "nginx"
revision_mode = "Single"
template = {
containers = [
{
Expand Down
8 changes: 4 additions & 4 deletions examples/acr/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ resource "azurerm_container_app_environment" "example" {
module "container_apps" {
source = "../.."

resource_group_name = azurerm_resource_group.test.name
container_app_environment_id = azurerm_container_app_environment.example.id
name = "nginx"
revision_mode = "Single"
resource_group_name = azurerm_resource_group.test.name
container_app_environment_resource_id = azurerm_container_app_environment.example.id
name = "nginx"
revision_mode = "Single"
template = {
containers = [
{
Expand Down
6 changes: 5 additions & 1 deletion examples/acr/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ terraform {
}

provider "azurerm" {
features {}
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
}
10 changes: 5 additions & 5 deletions examples/init-container/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ resource "azurerm_container_app_environment" "example" {
}
module "container_apps" {
source = "../.."
resource_group_name = azurerm_resource_group.test.name
container_app_environment_id = azurerm_container_app_environment.example.id
name = "app-with-init-container-${random_id.container_name.hex}"
revision_mode = "Single"
source = "../.."
resource_group_name = azurerm_resource_group.test.name
container_app_environment_resource_id = azurerm_container_app_environment.example.id
name = "app-with-init-container-${random_id.container_name.hex}"
revision_mode = "Single"
template = {
init_containers = [
{
Expand Down
10 changes: 5 additions & 5 deletions examples/init-container/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ resource "azurerm_container_app_environment" "example" {
}

module "container_apps" {
source = "../.."
resource_group_name = azurerm_resource_group.test.name
container_app_environment_id = azurerm_container_app_environment.example.id
name = "app-with-init-container-${random_id.container_name.hex}"
revision_mode = "Single"
source = "../.."
resource_group_name = azurerm_resource_group.test.name
container_app_environment_resource_id = azurerm_container_app_environment.example.id
name = "app-with-init-container-${random_id.container_name.hex}"
revision_mode = "Single"
template = {
init_containers = [
{
Expand Down
6 changes: 5 additions & 1 deletion examples/init-container/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ terraform {
}

provider "azurerm" {
features {}
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
}
20 changes: 10 additions & 10 deletions examples/startup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ resource "azurerm_container_app_environment" "example" {
}
module "counting" {
source = "../.."
container_app_environment_id = azurerm_container_app_environment.example.id
name = local.counting_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
source = "../.."
container_app_environment_resource_id = azurerm_container_app_environment.example.id
name = local.counting_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
template = {
containers = [
{
Expand Down Expand Up @@ -66,11 +66,11 @@ module "counting" {
}
module "dashboard" {
source = "../.."
container_app_environment_id = azurerm_container_app_environment.example.id
name = local.dashboard_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
source = "../.."
container_app_environment_resource_id = azurerm_container_app_environment.example.id
name = local.dashboard_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
template = {
containers = [
{
Expand Down
20 changes: 10 additions & 10 deletions examples/startup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ resource "azurerm_container_app_environment" "example" {
}

module "counting" {
source = "../.."
container_app_environment_id = azurerm_container_app_environment.example.id
name = local.counting_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
source = "../.."
container_app_environment_resource_id = azurerm_container_app_environment.example.id
name = local.counting_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
template = {
containers = [
{
Expand Down Expand Up @@ -60,11 +60,11 @@ module "counting" {
}

module "dashboard" {
source = "../.."
container_app_environment_id = azurerm_container_app_environment.example.id
name = local.dashboard_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
source = "../.."
container_app_environment_resource_id = azurerm_container_app_environment.example.id
name = local.dashboard_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
template = {
containers = [
{
Expand Down
6 changes: 5 additions & 1 deletion examples/startup/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ terraform {
}

provider "azurerm" {
features {}
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
}
20 changes: 10 additions & 10 deletions examples/vnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ resource "azurerm_private_dns_a_record" "containerapp_record" {
}
module "counting" {
source = "../.."
container_app_environment_id = azurerm_container_app_environment.example.id
name = local.counting_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
source = "../.."
container_app_environment_resource_id = azurerm_container_app_environment.example.id
name = local.counting_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
template = {
containers = [
{
Expand Down Expand Up @@ -102,11 +102,11 @@ module "counting" {
}
module "dashboard" {
source = "../.."
container_app_environment_id = azurerm_container_app_environment.example.id
name = local.dashboard_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
source = "../.."
container_app_environment_resource_id = azurerm_container_app_environment.example.id
name = local.dashboard_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
template = {
containers = [
{
Expand Down
20 changes: 10 additions & 10 deletions examples/vnet/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ resource "azurerm_private_dns_a_record" "containerapp_record" {
}

module "counting" {
source = "../.."
container_app_environment_id = azurerm_container_app_environment.example.id
name = local.counting_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
source = "../.."
container_app_environment_resource_id = azurerm_container_app_environment.example.id
name = local.counting_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
template = {
containers = [
{
Expand Down Expand Up @@ -96,11 +96,11 @@ module "counting" {
}

module "dashboard" {
source = "../.."
container_app_environment_id = azurerm_container_app_environment.example.id
name = local.dashboard_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
source = "../.."
container_app_environment_resource_id = azurerm_container_app_environment.example.id
name = local.dashboard_app_name
resource_group_name = azurerm_resource_group.test.name
revision_mode = "Single"
template = {
containers = [
{
Expand Down
6 changes: 5 additions & 1 deletion examples/vnet/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ terraform {
}

provider "azurerm" {
features {}
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
}
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "azurerm_container_app" "this" {
container_app_environment_id = var.container_app_environment_id
container_app_environment_id = var.container_app_environment_resource_id
name = var.name
resource_group_name = var.resource_group_name
revision_mode = var.revision_mode
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variable "container_app_environment_id" {
variable "container_app_environment_resource_id" {
type = string
description = "The ID of the Container App Environment to host this Container App."
nullable = false
Expand Down

0 comments on commit 3ba00ee

Please sign in to comment.