Skip to content

Commit

Permalink
chore: Migration uat using terraform ca module with suffix (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuraf authored Apr 11, 2024
1 parent 814dd99 commit 92046f1
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions infra/container_apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ No resources.
| <a name="input_image_tag"></a> [image\_tag](#input\_image\_tag) | Image tag to use for the container | `string` | `"latest"` | no |
| <a name="input_is_pnpg"></a> [is\_pnpg](#input\_is\_pnpg) | (Optional) True if you want to apply changes to PNPG environment | `bool` | `false` | no |
| <a name="input_secrets_names"></a> [secrets\_names](#input\_secrets\_names) | KeyVault secrets to get values from | `map(string)` | n/a | yes |
| <a name="input_suffix_increment"></a> [suffix\_increment](#input\_suffix\_increment) | Suffix increment Container App Environment name | `string` | `""` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | n/a | `map(any)` | n/a | yes |
| <a name="input_workload_profile_name"></a> [workload\_profile\_name](#input\_workload\_profile\_name) | Workload Profile name to use | `string` | `null` | no |

Expand Down
8 changes: 4 additions & 4 deletions infra/container_apps/env/uat-pnpg/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
is_pnpg = true
env_short = "u"
cae_name = "cae"
workload_profile_name = "Consumption"
is_pnpg = true
env_short = "u"
suffix_increment = "-001"
cae_name = "cae-001"

tags = {
CreatedBy = "Terraform"
Expand Down
6 changes: 3 additions & 3 deletions infra/container_apps/env/uat/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
env_short = "u"
cae_name = "cae"
workload_profile_name = "Consumption"
env_short = "u"
suffix_increment = "-001"
cae_name = "cae-001"

tags = {
CreatedBy = "Terraform"
Expand Down
1 change: 1 addition & 0 deletions infra/container_apps/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ locals {
project = "selc-${var.env_short}"

container_app_environment_name = "${local.project}${local.pnpg_suffix}-${var.cae_name}"
ca_resource_group_name = "${local.project}-container-app${var.suffix_increment}-rg"
}
1 change: 1 addition & 0 deletions infra/container_apps/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module "container_app_ms_product" {
is_pnpg = var.is_pnpg

env_short = var.env_short
resource_group_name = local.ca_resource_group_name
container_app = var.container_app
container_app_name = "product"
container_app_environment_name = local.container_app_environment_name
Expand Down
6 changes: 6 additions & 0 deletions infra/container_apps/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,9 @@ variable "cae_name" {
description = "Container App Environment name"
default = "cae-cp"
}

variable "suffix_increment" {
type = string
description = "Suffix increment Container App Environment name"
default = ""
}

0 comments on commit 92046f1

Please sign in to comment.