Skip to content

Commit

Permalink
tfvars files
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasisnes committed Jul 15, 2024
1 parent ff578c6 commit 1504b99
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/infrastructure-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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 }}
8 changes: 8 additions & 0 deletions infrastructure/authorization/README.md
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions infrastructure/authorization/at21.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cidr = "10.202.0.0/22"
1 change: 1 addition & 0 deletions infrastructure/authorization/at22.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cidr = "10.202.0.0/22"
1 change: 1 addition & 0 deletions infrastructure/authorization/at23.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cidr = "10.202.0.0/22"
1 change: 1 addition & 0 deletions infrastructure/authorization/at24.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cidr = "10.202.0.0/22"
8 changes: 8 additions & 0 deletions infrastructure/authorization/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
# }
12 changes: 6 additions & 6 deletions infrastructure/modules/vnet/main.tf
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 1504b99

Please sign in to comment.