diff --git a/.github/workflows/infrastructure-template.yaml b/.github/workflows/infrastructure-template.yaml index 0dd57bb0..309a2093 100644 --- a/.github/workflows/infrastructure-template.yaml +++ b/.github/workflows/infrastructure-template.yaml @@ -30,6 +30,9 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 + - name: Terraform Set TFVARS + run: echo "TF_VARS_FILE=$(echo ${{ inputs.environment }} | tr '[:upper:]' '[:lower:]').tfvars" >> $GITHUB_ENV + - name: Terraform Initialize uses: altinn/altinn-platform/actions/terraform/plan@features/828 with: @@ -41,7 +44,7 @@ jobs: arm_subscription_id: ${{ vars.ARM_SUBSCRIPTION_ID }} tf_state_name: ${{ env.TF_STATE_NAME }} - tf_args: -var environment=${{ inputs.environment }} + tf_args: -var environment=${{ inputs.environment }} -var-file=${{ env.TF_VARS_FILE }} gh_token: ${{ secrets.GITHUB_TOKEN }} apply: @@ -62,5 +65,5 @@ jobs: arm_client_id: ${{ vars.ARM_CLIENT_ID }} arm_subscription_id: ${{ vars.ARM_SUBSCRIPTION_ID }} - tf_args: -var environment=${{ inputs.environment }} + tf_args: -var environment=${{ inputs.environment }} -var-file=${{ env.TF_VARS_FILE }} tf_state_name: ${{ env.TF_STATE_NAME }} diff --git a/infrastructure/authorization/README.md b/infrastructure/authorization/README.md index e69de29b..7d93e309 100644 --- a/infrastructure/authorization/README.md +++ b/infrastructure/authorization/README.md @@ -0,0 +1,8 @@ + + +## Network Address Ranges +* Full Address Space for Authorization 10.202.0.0/20 +* 10.202.0.0/22 +* 10.202.4.0/22 +* 10.202.8.0/22 +* 10.202.12.0/22 \ No newline at end of file diff --git a/infrastructure/authorization/at21.tfvars b/infrastructure/authorization/at21.tfvars index e69de29b..bd9513ef 100644 --- a/infrastructure/authorization/at21.tfvars +++ b/infrastructure/authorization/at21.tfvars @@ -0,0 +1 @@ +cidr = "10.202.0.0/22" diff --git a/infrastructure/authorization/at22.tfvars b/infrastructure/authorization/at22.tfvars new file mode 100644 index 00000000..bd9513ef --- /dev/null +++ b/infrastructure/authorization/at22.tfvars @@ -0,0 +1 @@ +cidr = "10.202.0.0/22" diff --git a/infrastructure/authorization/at23.tfvars b/infrastructure/authorization/at23.tfvars new file mode 100644 index 00000000..bd9513ef --- /dev/null +++ b/infrastructure/authorization/at23.tfvars @@ -0,0 +1 @@ +cidr = "10.202.0.0/22" diff --git a/infrastructure/authorization/at24.tfvars b/infrastructure/authorization/at24.tfvars new file mode 100644 index 00000000..bd9513ef --- /dev/null +++ b/infrastructure/authorization/at24.tfvars @@ -0,0 +1 @@ +cidr = "10.202.0.0/22" diff --git a/infrastructure/authorization/main.tf b/infrastructure/authorization/main.tf index a7fbd08c..b23ca91e 100644 --- a/infrastructure/authorization/main.tf +++ b/infrastructure/authorization/main.tf @@ -25,3 +25,11 @@ resource "azurerm_resource_group" "authorization" { name = "rg-${local.metadata.environment}-${local.metadata.instance}" location = "norwayeast" } + +# module "vnet" { +# source = "../modules/vnet" +# metadata = local.metadata + +# cidr = var.cidr +# resource_group_name = azurerm_resource_group.authorization.name +# } diff --git a/infrastructure/modules/vnet/main.tf b/infrastructure/modules/vnet/main.tf index 0a7fa6cd..315da3eb 100644 --- a/infrastructure/modules/vnet/main.tf +++ b/infrastructure/modules/vnet/main.tf @@ -1,20 +1,20 @@ locals { - size = 20 + size = 22 subnets = { key_vault = { - ip_addresses = 1 + address_space = 4 } app_configuration = { - ip_addresses = 1 + address_space = 2 } storage_accounts = { - ip_addresses = 1 + address_space = 3 } redis = { - ip_addresses = 1 + address_space = 4 } postgres = { - ip_addresses = 2 + address_space = 5 delegations = { fs = { name = "Microsoft.DBforPostgreSQL/flexibleServers"