Skip to content

Commit 31ec997

Browse files
authored
chore: switch to azure gov account (#1318)
## Description Switches CI testing for Azure to use Azure Gov account ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [x] Other (security config, docs update, etc) ## Steps to Validate - If this PR introduces new functionality to UDS Core or addresses a bug, please document the steps to test the changes. ## Checklist before merging - [ ] Test, docs, adr added or updated as needed - [ ] [Contributor Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md) followed
1 parent 54b2cfc commit 31ec997

4 files changed

Lines changed: 18 additions & 15 deletions

File tree

.github/bundles/aks/uds-bundle.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,4 @@ packages:
139139
secretContents:
140140
cloud: |
141141
AZURE_STORAGE_ACCOUNT_ACCESS_KEY=${AZURE_VELERO_STORAGE_ACCOUNT_ACCESS_KEY}
142-
AZURE_CLOUD_NAME=AzurePublicCloud
142+
AZURE_CLOUD_NAME=AzureUSGovernmentCloud

.github/test-infra/azure/aks/networking.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ resource "azurerm_subnet" "cluster_api_subnet" {
6060
}
6161

6262
resource "azurerm_private_dns_zone" "cluster_dns_zone" {
63-
name = "${local.cluster_name}.postgres.database.azure.com"
63+
name = "${local.cluster_name}.postgres.database.usgovcloudapi.net"
6464
resource_group_name = azurerm_resource_group.this.name
6565
}
6666

.github/test-infra/azure/aks/variables.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ variable "resource_group_name" {
1515
variable "location" {
1616
description = "(Required) Specifies the location where the AKS cluster will be deployed."
1717
type = string
18+
default = "usgovvirginia"
1819
}
1920

2021
variable "dns_prefix" {
@@ -72,7 +73,7 @@ variable "autoscaling_min_node_count_worker" {
7273

7374
variable "default_node_pool_vm_size" {
7475
description = "Specifies the vm size of the default node pool"
75-
default = "Standard_F8s_v2"
76+
default = "Standard_A8_v2"
7677
type = string
7778
}
7879

@@ -84,7 +85,7 @@ variable "worker_node_pool_count" {
8485

8586
variable "worker_pool_vm_size" {
8687
description = "Specifies the vm size of the worker node pool"
87-
default = "Standard_F8s_v2"
88+
default = "Standard_A8_v2"
8889
type = string
8990
}
9091

@@ -150,7 +151,7 @@ variable "default_node_pool_node_labels" {
150151
variable "default_node_pool_os_disk_type" {
151152
description = "(Optional) The type of disk which should be used for the Operating System. Possible values are Ephemeral and Managed. Defaults to Managed. Changing this forces a new resource to be created."
152153
type = string
153-
default = "Ephemeral"
154+
default = "Managed"
154155
}
155156

156157
variable "default_node_pool_node_count" {

.github/workflows/test-aks.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030
runs-on: ubuntu-latest
3131
env:
3232
SHA: ${{ github.sha }}
33-
UDS_REGION: centralus
34-
UDS_RESOURCE_GROUP_NAME: ${{ secrets.AZURE_RESOURCE_GROUP }}
35-
UDS_STORAGE_ACCOUNT_NAME: ${{ secrets.AZURE_STORAGE_ACCOUNT_NAME }}
36-
UDS_CONTAINER_NAME: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}
33+
UDS_REGION: usgovvirginia
34+
UDS_RESOURCE_GROUP_NAME: ${{ secrets.AZURE_GOV_RESOURCE_GROUP }}
35+
UDS_STORAGE_ACCOUNT_NAME: ${{ secrets.AZURE_GOV_STORAGE_ACCOUNT_NAME }}
36+
UDS_CONTAINER_NAME: ${{ secrets.AZURE_GOV_STORAGE_CONTAINER_NAME }}
3737

3838
steps:
3939
- name: Set ENV
@@ -43,10 +43,11 @@ jobs:
4343
echo "TF_VAR_location=${UDS_REGION}" >> $GITHUB_ENV
4444
echo "TF_VAR_cluster_name=uds-ci-${{ matrix.flavor }}-${SHA:0:7}" >> $GITHUB_ENV
4545
echo "TF_VAR_resource_group_name=uds-ci-${{ matrix.flavor }}" >> $GITHUB_ENV
46-
echo "ARM_SUBSCRIPTION_ID=${{ secrets.AZURE_SUBSCRIPTION_ID }}" >> $GITHUB_ENV
47-
echo "ARM_CLIENT_ID=${{ secrets.AZURE_CLIENT_ID }}" >> $GITHUB_ENV
48-
echo "ARM_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}" >> $GITHUB_ENV
46+
echo "ARM_SUBSCRIPTION_ID=${{ secrets.AZURE_GOV_SUBSCRIPTION_ID }}" >> $GITHUB_ENV
47+
echo "ARM_CLIENT_ID=${{ secrets.AZURE_GOV_CLIENT_ID }}" >> $GITHUB_ENV
48+
echo "ARM_TENANT_ID=${{ secrets.AZURE_GOV_TENANT_ID }}" >> $GITHUB_ENV
4949
echo "ARM_USE_OIDC=true" >> $GITHUB_ENV
50+
echo "ARM_ENVIRONMENT=usgovernment" >> $GITHUB_ENV
5051
echo "ARM_STORAGE_USE_AZUREAD=true" >> $GITHUB_ENV
5152
5253
- name: Checkout repository
@@ -59,9 +60,10 @@ jobs:
5960
- name: Azure login
6061
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2
6162
with:
62-
client-id: ${{ secrets.AZURE_CLIENT_ID }}
63-
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
64-
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
63+
client-id: ${{ secrets.AZURE_GOV_CLIENT_ID }}
64+
tenant-id: ${{ secrets.AZURE_GOV_TENANT_ID }}
65+
subscription-id: ${{ secrets.AZURE_GOV_SUBSCRIPTION_ID }}
66+
environment: 'AzureUSGovernment'
6567

6668
- name: Environment setup
6769
uses: ./.github/actions/setup

0 commit comments

Comments
 (0)