Skip to content

Commit 28374d8

Browse files
committed
chore: change IaC to Terraform
1 parent fd8eecc commit 28374d8

24 files changed

Lines changed: 676 additions & 504 deletions

.github/workflows/azure-dev.yml

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
# Run when commits are pushed to main
2-
on:
3-
workflow_dispatch:
4-
push:
5-
# Run when commits are pushed to mainline branch (main or master)
6-
# Set this to the mainline branch you are using
7-
branches:
8-
- main
1+
# # Run when commits are pushed to main
2+
# on:
3+
# workflow_dispatch:
4+
# push:
5+
# # Run when commits are pushed to mainline branch (main or master)
6+
# # Set this to the mainline branch you are using
7+
# branches:
8+
# - main
99

10-
# Set up permissions for deploying with secretless Azure federated credentials
11-
# https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure?tabs=azure-portal%2Clinux#set-up-azure-login-with-openid-connect-authentication
12-
permissions:
13-
id-token: write
14-
contents: read
10+
# # Set up permissions for deploying with secretless Azure federated credentials
11+
# # https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure?tabs=azure-portal%2Clinux#set-up-azure-login-with-openid-connect-authentication
12+
# permissions:
13+
# id-token: write
14+
# contents: read
1515

1616

17-
jobs:
18-
build:
19-
runs-on: ubuntu-latest
20-
env:
21-
AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
22-
AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
23-
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
24-
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
25-
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
26-
SERVICE_FASTAPI_POSTGRES_ACA_RESOURCE_EXISTS: ${{ vars.SERVICE_FASTAPI_POSTGRES_ACA_RESOURCE_EXISTS }}
27-
steps:
28-
- name: Checkout
29-
uses: actions/checkout@v4
30-
- name: Install azd
31-
uses: Azure/setup-azd@v2
32-
- name: Log in with Azure (Federated Credentials)
33-
run: |
34-
azd auth login `
35-
--client-id "$Env:AZURE_CLIENT_ID" `
36-
--federated-credential-provider "github" `
37-
--tenant-id "$Env:AZURE_TENANT_ID"
38-
shell: pwsh
17+
# jobs:
18+
# build:
19+
# runs-on: ubuntu-latest
20+
# env:
21+
# AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
22+
# AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
23+
# AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
24+
# AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
25+
# AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
26+
# SERVICE_FASTAPI_POSTGRES_ACA_RESOURCE_EXISTS: ${{ vars.SERVICE_FASTAPI_POSTGRES_ACA_RESOURCE_EXISTS }}
27+
# steps:
28+
# - name: Checkout
29+
# uses: actions/checkout@v4
30+
# - name: Install azd
31+
# uses: Azure/setup-azd@v2
32+
# - name: Log in with Azure (Federated Credentials)
33+
# run: |
34+
# azd auth login `
35+
# --client-id "$Env:AZURE_CLIENT_ID" `
36+
# --federated-credential-provider "github" `
37+
# --tenant-id "$Env:AZURE_TENANT_ID"
38+
# shell: pwsh
3939

4040

41-
- name: Provision Infrastructure
42-
run: azd provision --no-prompt
43-
env:
44-
AZURE_KEY_VAULT_NAME: ${{ secrets.AZURE_KEY_VAULT_NAME }}
41+
# - name: Provision Infrastructure
42+
# run: azd provision --no-prompt
43+
# env:
44+
# AZURE_KEY_VAULT_NAME: ${{ secrets.AZURE_KEY_VAULT_NAME }}
4545

46-
- name: Deploy Application
47-
run: azd deploy --no-prompt
48-
env:
49-
AZURE_KEY_VAULT_NAME: ${{ secrets.AZURE_KEY_VAULT_NAME }}
46+
# - name: Deploy Application
47+
# run: azd deploy --no-prompt
48+
# env:
49+
# AZURE_KEY_VAULT_NAME: ${{ secrets.AZURE_KEY_VAULT_NAME }}
5050

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,19 @@ __pycache__/
3232
temp/
3333
tmp/
3434
.azure
35+
36+
# Terraform
37+
.terraform
38+
**/.terraform/*
39+
*.tfstate
40+
*.tfstate.*
41+
crash.log
42+
crash.*.log
43+
override.tf
44+
override.tf.json
45+
*_override.tf
46+
*_override.tf.json
47+
.terraformrc
48+
terraform.rc
49+
.terraform.lock.hcl
50+
*.tfplan

azure.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ services:
1010
language: python
1111
docker:
1212
path: Dockerfile
13+
registry: ${AZURE_CONTAINER_REGISTRY_ENDPOINT}
1314
resources:
1415
fastapi-postgres-aca:
1516
type: host.containerapp
@@ -18,3 +19,5 @@ resources:
1819
port: 8000
1920
pycon-members:
2021
type: db.postgres
22+
infra:
23+
provider: terraform

infra/abbreviations.json

Lines changed: 0 additions & 137 deletions
This file was deleted.

infra/main.bicep

Lines changed: 0 additions & 56 deletions
This file was deleted.

infra/main.parameters.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)