Skip to content

Commit

Permalink
Merge pull request #109 from PerfectThymeTech/marvinbuss/update_config
Browse files Browse the repository at this point in the history
Update Config
  • Loading branch information
marvinbuss authored Sep 25, 2024
2 parents 5b21c9f + b2f2a60 commit 70366d6
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
id: terraform_setup
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.6.6"
terraform_version: "1.9.6"
terraform_wrapper: true

# Checkout repository
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
with:
environment: "dev"
config: "PerfectThymeTech"
terraform_version: "1.6.6"
node_version: 18
terraform_version: "1.9.6"
node_version: 20
working_directory: "./code/infra"
tenant_id: "3556be79-2979-4b19-a1af-4dd4e6d9ed7e"
subscription_id: "8f171ff9-2b5b-4f0f-aed5-7fa360a1d094"
tenant_id: "37963dd4-f4e6-40f8-a7d6-24b97919e452"
subscription_id: "e82c5267-9dc4-4f45-ac13-abdd5e130d27"
secrets:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
Expand Down
4 changes: 4 additions & 0 deletions code/infra/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ resource "azapi_resource" "subnet_private_endpoints" {
serviceEndpoints = []
}
})

depends_on = [
azapi_resource.subnet_container_app
]
}
28 changes: 28 additions & 0 deletions code/infra/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
provider "azurerm" {
disable_correlation_request_id = false
environment = "public"
skip_provider_registration = false
storage_use_azuread = true
# use_oidc = true

features {
key_vault {
recover_soft_deleted_key_vaults = true
recover_soft_deleted_certificates = true
recover_soft_deleted_keys = true
recover_soft_deleted_secrets = true
}
resource_group {
prevent_deletion_if_contains_resources = false
}
}
}

provider "azapi" {
default_location = var.location
default_tags = var.tags
disable_correlation_request_id = false
environment = "public"
skip_provider_registration = false
# use_oidc = true
}
29 changes: 0 additions & 29 deletions code/infra/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,3 @@ terraform {
use_azuread_auth = true
}
}

provider "azurerm" {
disable_correlation_request_id = false
environment = "public"
skip_provider_registration = false
storage_use_azuread = true
# use_oidc = true

features {
key_vault {
recover_soft_deleted_key_vaults = true
recover_soft_deleted_certificates = true
recover_soft_deleted_keys = true
recover_soft_deleted_secrets = true
}
resource_group {
prevent_deletion_if_contains_resources = true
}
}
}

provider "azapi" {
default_location = var.location
default_tags = var.tags
disable_correlation_request_id = false
environment = "public"
skip_provider_registration = false
# use_oidc = true
}
6 changes: 3 additions & 3 deletions config/PerfectThymeTech/azurerm.tfbackend
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
environment = "public"
subscription_id = "8f171ff9-2b5b-4f0f-aed5-7fa360a1d094"
resource_group_name = "mycrp-prd-cicd"
storage_account_name = "mycrpprdstg001"
subscription_id = "e82c5267-9dc4-4f45-ac13-abdd5e130d27"
resource_group_name = "rg-terraform"
storage_account_name = "terraformststg001"
container_name = "github-agent"
key = "terraform.tfstate"
use_azuread_auth = true
16 changes: 8 additions & 8 deletions config/PerfectThymeTech/vars.tfvars
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# General variables
location = "northeurope"
environment = "prd"
prefix = "gha"
prefix = "ghr"
tags = {
"workload" = "github-runners"
}
log_analytics_workspace_id = "/subscriptions/8f171ff9-2b5b-4f0f-aed5-7fa360a1d094/resourceGroups/DefaultResourceGroup-NEU/providers/Microsoft.OperationalInsights/workspaces/DefaultWorkspace-8f171ff9-2b5b-4f0f-aed5-7fa360a1d094-NEU"
log_analytics_workspace_id = "/subscriptions/e82c5267-9dc4-4f45-ac13-abdd5e130d27/resourceGroups/ptt-dev-logging-rg/providers/Microsoft.OperationalInsights/workspaces/ptt-dev-log001"

# Github variables
github_org_name = "PerfectThymeTech"
Expand All @@ -14,9 +14,9 @@ github_org_name = "PerfectThymeTech"
container_image_reference = "ghcr.io/perfectthymetech/githubagentazure:main"

# Network variables
vnet_id = "/subscriptions/8f171ff9-2b5b-4f0f-aed5-7fa360a1d094/resourceGroups/mycrp-prd-network/providers/Microsoft.Network/virtualNetworks/mycrp-prd-vnet001"
nsg_id = "/subscriptions/8f171ff9-2b5b-4f0f-aed5-7fa360a1d094/resourceGroups/mycrp-prd-network/providers/Microsoft.Network/networkSecurityGroups/mycrp-prd-nsg001"
route_table_id = "/subscriptions/8f171ff9-2b5b-4f0f-aed5-7fa360a1d094/resourceGroups/mycrp-prd-network/providers/Microsoft.Network/routeTables/mycrp-prd-rt001"
subnet_cidr_container_app = "10.0.3.0/27"
subnet_cidr_private_endpoints = "10.0.3.32/27"
private_dns_zone_id_key_vault = "/subscriptions/8f171ff9-2b5b-4f0f-aed5-7fa360a1d094/resourceGroups/mycrp-prd-global-dns/providers/Microsoft.Network/privateDnsZones/privatelink.vaultcore.azure.net"
vnet_id = "/subscriptions/e82c5267-9dc4-4f45-ac13-abdd5e130d27/resourceGroups/ptt-dev-hub-northeurope-rg/providers/Microsoft.Network/virtualNetworks/ptt-dev-vnet001"
nsg_id = "/subscriptions/e82c5267-9dc4-4f45-ac13-abdd5e130d27/resourceGroups/ptt-dev-hub-northeurope-rg/providers/Microsoft.Network/networkSecurityGroups/ptt-dev-default-nsg001"
route_table_id = "/subscriptions/e82c5267-9dc4-4f45-ac13-abdd5e130d27/resourceGroups/ptt-dev-hub-northeurope-rg/providers/Microsoft.Network/routeTables/ptt-dev-default-rt001"
subnet_cidr_container_app = "10.0.1.192/26"
subnet_cidr_private_endpoints = "10.0.2.0/26"
private_dns_zone_id_key_vault = "/subscriptions/e82c5267-9dc4-4f45-ac13-abdd5e130d27/resourceGroups/ptt-dev-privatedns-rg/providers/Microsoft.Network/privateDnsZones/privatelink.vaultcore.azure.net"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pre-commit~=3.6.0
pre-commit~=3.8.0

0 comments on commit 70366d6

Please sign in to comment.