Skip to content

Commit ae87474

Browse files
committed
feat(odic): fix issues and disable azure for now
1 parent 891feb6 commit ae87474

File tree

4 files changed

+39
-25
lines changed

4 files changed

+39
-25
lines changed

.github/setup/azure/main.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
#
44
# Note: Token lifetime is controlled by Azure AD's default policy (60 minutes).
55
# To extend token lifetime, you would need to create a TokenLifetimePolicy using accessTokenLifeTime.sh script after applying this terraform configuration
6+
7+
# TODO: Fix Azure federated identity credential for merge queue authentication
8+
# - Add environment-based credential or specific merge queue subject pattern
9+
# - Subject pattern needed: repo:MaterializeInc/materialize-terraform-self-managed:environment:production
10+
# - Or alternative: repo:MaterializeInc/materialize-terraform-self-managed:merge_group(verify if this works, if it does then prefer this)
11+
12+
# TODO: After permissions issue is fixed:
13+
# 1. Test terraform configuration and apply federated identity credential changes
14+
# 2. Update Azure workflow to use environment-based authentication (add environment: production to job)
15+
# 3. Re-enable merge_group trigger in .github/workflows/test-azure.yml
16+
# 4. Validate merge queue authentication works with new federated identity credential
17+
18+
# TODO: Investigate and resolve Azure permissions issues preventing terraform apply
619
resource "azuread_application" "github_actions" {
720
display_name = "mz-self-managed-github-actions"
821
description = "Application for GitHub Actions CI/CD with OIDC authentication"

.github/setup/gcp/backend.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ terraform {
44
key = "github-setup/oidc/gcp/terraform.tfstate"
55
region = "us-east-1"
66
encrypt = true
7+
profile = "materialize-admin"
78
# profile = "" # Add your profile name here since backend block doesn't accept variables
89
}
910
}

.github/setup/gcp/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ resource "google_iam_workload_identity_pool_provider" "github_actions" {
3030

3131
# Attribute mapping from GitHub OIDC token to GCP attributes
3232
attribute_mapping = {
33-
"google.subject" = "assertion.sub"
33+
"google.subject" = "assertion.repository + \":\" + assertion.run_id"
3434
"attribute.actor" = "assertion.actor"
3535
"attribute.repository" = "assertion.repository"
3636
"attribute.repository_owner" = "assertion.repository_owner"
3737
"attribute.ref" = "assertion.ref"
3838
"attribute.workflow" = "assertion.workflow"
39+
"attribute.run_id" = "assertion.run_id"
3940
}
4041

4142
# Security: Only allow tokens from MaterializeInc organization

.github/workflows/test-azure.yml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
name: Azure Tests
22

33
on:
4-
# Primary trigger: GitHub merge queue with smart path filtering
5-
merge_group:
6-
paths-ignore:
7-
- "**" # Ignore all paths - effectively disables this workflow remove this to enabled the workflow once perms issue is fixed
8-
# Exclude other cloud providers
9-
- "aws/**"
10-
- "gcp/**"
11-
- "test/aws/**"
12-
- "test/gcp/**"
13-
# Exclude setup files from other cloud providers
14-
- ".github/setup/aws/**"
15-
- ".github/setup/gcp/**"
16-
# Exclude examples
17-
- "azure/examples/**"
18-
# Exclude documentation and config
19-
- "**.md"
20-
- "**.env"
21-
- ".gitignore"
22-
- "LICENSE"
23-
# Exclude AWS/GCP specific workflows
24-
- ".github/workflows/test-aws*.yml"
25-
- ".github/workflows/test-gcp*.yml"
26-
- ".github/scripts/**"
4+
# DISABLED: Primary trigger commented out until Azure permissions and federated identity issues are resolved
5+
# merge_group:
6+
# paths-ignore:
7+
# # Exclude other cloud providers
8+
# - "aws/**"
9+
# - "gcp/**"
10+
# - "test/aws/**"
11+
# - "test/gcp/**"
12+
# # Exclude setup files from other cloud providers
13+
# - ".github/setup/aws/**"
14+
# - ".github/setup/gcp/**"
15+
# # Exclude examples
16+
# - "azure/examples/**"
17+
# # Exclude documentation and config
18+
# - "**.md"
19+
# - "**.env"
20+
# - ".gitignore"
21+
# - "LICENSE"
22+
# # Exclude AWS/GCP specific workflows
23+
# - ".github/workflows/test-aws*.yml"
24+
# - ".github/workflows/test-gcp*.yml"
25+
# - ".github/scripts/**"
2726

28-
# Manual trigger: For testing and debugging purposes
27+
# Manual trigger: For testing and debugging purposes (ONLY trigger until issues are resolved)
2928
workflow_dispatch:
3029
inputs:
3130
test_stage:

0 commit comments

Comments
 (0)