Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing Terraform pipelines #114

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/azure_terraform_apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
matrix:
stack:
- acm-general
- sysadmin-demo

defaults:
run:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/azure_terraform_plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
matrix:
stack:
- acm-general
- sysadmin-demo

defaults:
run:
Expand Down
76 changes: 28 additions & 48 deletions azure/terraform/stacks/acm-general/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions azure/terraform/stacks/acm-general/external-dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ resource "azuread_application" "externaldns" {
}

resource "azuread_service_principal" "externaldns" {
application_id = azuread_application.externaldns.application_id
client_id = azuread_application.externaldns.client_id
app_role_assignment_required = false
owners = distinct(concat([data.azuread_client_config.current.object_id], var.additional_owner_ids))
description = "Service Principal for ExternalDNS within on-prem Kubernetes"
}

resource "azuread_service_principal_password" "externaldns" {
display_name = "${var.external_dns_namespace}Password"
service_principal_id = azuread_service_principal.externaldns.object_id
service_principal_id = azuread_service_principal.externaldns.id
}

resource "azurerm_role_assignment" "externaldns_reader" {
Expand All @@ -43,8 +43,8 @@ output "externaldns_sp_keyid" {
value = azuread_service_principal_password.externaldns.key_id
}

output "externaldns_sp_appid" {
value = azuread_application.externaldns.application_id
output "externaldns_sp_clientid" {
value = azuread_application.externaldns.client_id
}

output "externaldns_sp_password" {
Expand Down
11 changes: 9 additions & 2 deletions azure/terraform/stacks/acm-general/providers.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
terraform {
required_version = "1.5.2"
required_version = "1.9.8"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "3.63.0"
version = "4.9.0"
}
azuread = {
source = "hashicorp/azuread"
version = "3.0.2"
}
}
}
Expand All @@ -13,3 +17,6 @@ provider "azurerm" {
features {}
}

provider "azuread" {
# Configuration options
}
34 changes: 0 additions & 34 deletions azure/terraform/stacks/acm-general/service_principal.tf

This file was deleted.

28 changes: 14 additions & 14 deletions azure/terraform/stacks/sysadmin-demo/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions azure/terraform/stacks/sysadmin-demo/chasetest.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resource "azurerm_dns_a_record" "chasetest" {
name = "chasetest"
zone_name = data.azurerm_dns_zone.acmuic_org.name
resource_group_name = data.azurerm_resource_group.acm_general.name
ttl = 60
records = ["127.0.0.1"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Prod environment variables
4 changes: 2 additions & 2 deletions azure/terraform/stacks/sysadmin-demo/providers.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
terraform {
required_version = "1.3.2"
required_version = "1.9.8"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "3.27.0"
version = "4.9.0"
}
}
}
Expand Down
Loading