Commit b7ce7fa
Add scheduled workflow to renew TLS certificates (#23)
* Add scheduled workflow to renew TLS certificates
Add a monthly CI job that runs terraform plan (for verification)
targeting module.domain in the network layer for dev, staging, and
prod networks. This prevents ACME-issued certificates from expiring
on stable networks that don't get regular terraform applies.
Supports manual dispatch with optional network name filter.
* Add push trigger on branch for testing terraform plan
* Add plan/apply flow with GitHub issue notifications
* Fix PIPESTATUS to capture terraform exit code through tee
* Address PR review: remove push trigger, unused var, auto-create label
* Change schedule to twice a month (1st and 15th)
* Refactor: use credentials action, tighter targets, always apply
- Update configure-azure-credentials to accept optional network_name
input, matching the pattern from template-infra's configure-aws-credentials
- Scope terraform targets to individual certificate resources instead
of the entire domain module to avoid touching DNS infrastructure
- Remove issue creation flow in favor of always applying (set and forget)
- Use the credentials action instead of inlined auth logic
* Fix dead link to main.tf.jinja in set-up-network docs
The file was renamed from main.tf to main.tf.jinja but the doc link
was not updated, causing the markdown link checker to fail.
* Remove dead variable and add concurrency guard
- Remove unused network_name variable in configure-azure-credentials
"Get Azure client id" step (only account_name is used)
- Add concurrency key per network to prevent overlapping terraform
applies against the same state
* Move cert renewal logic to bin script, revert docs link fix
- Create bin/renew-tls-certificates script that wraps terraform-init
and terraform-apply with the certificate-specific targets
- Simplify workflow to call the bin script instead of inline terraform
- Revert set-up-network.md link back to main.tf (installed docs don't
have the .jinja extension)
* Pass network_name variable to terraform in renew-tls-certificates
The script was missing -var="network_name=..." which caused terraform
to fail with "No value for required variable" since the networks module
has no .tfvars files and relies on the variable being passed explicitly.
* Stop exporting ARM_SUBSCRIPTION_ID as env var
The infra code specifies subscription_id in each provider block, so
the ARM_SUBSCRIPTION_ID env var is unnecessary and can cause issues
with cross-subscription resources (e.g. domain provider referencing
a different subscription than the network). Pass the subscription id
to azure/login via step output instead.
* Set up OIDC federated token for Azure SDK auth
The ACME provider's DNS solver uses the Go Azure SDK's
DefaultAzureCredential, which doesn't understand ARM_* env vars.
Request a GitHub OIDC token and write it to a file so the SDK's
WorkloadIdentityCredential can authenticate for DNS challenges.
* Remove explicit OIDC token setup, rely on Azure CLI credential
azure/login already authenticates the CLI, so DefaultAzureCredential
should pick it up via AzureCLICredential without needing to manually
fetch and store an OIDC token.
* Ignore main.tf link in markdown link checker
infra/networks/main.tf only exists in instantiated repos (it's
main.tf.jinja in the template), so the link checker always fails
on this file reference in set-up-network.md.
* Revert markdownlint config change, move to separate PR
---------
Co-authored-by: Sean Thomas <sean.thomas@navapbc.com>1 parent 7e4b170 commit b7ce7fa
3 files changed
Lines changed: 96 additions & 9 deletions
File tree
- .github
- actions/configure-azure-credentials
- workflows
- bin
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
11 | 18 | | |
12 | 19 | | |
13 | | - | |
| 20 | + | |
14 | 21 | | |
15 | 22 | | |
16 | | - | |
| 23 | + | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
| |||
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
36 | | - | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
43 | 50 | | |
44 | 51 | | |
45 | 52 | | |
| 53 | + | |
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
49 | | - | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
63 | 70 | | |
64 | 71 | | |
65 | 72 | | |
66 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
67 | 77 | | |
68 | | - | |
69 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
70 | 82 | | |
71 | 83 | | |
72 | 84 | | |
73 | 85 | | |
74 | 86 | | |
75 | | - | |
| 87 | + | |
76 | 88 | | |
| 89 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments