Skip to content

Commit 10f9de8

Browse files
committed
chore: update iac
1 parent 28374d8 commit 10f9de8

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

azure.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,9 @@ services:
88
project: ./src
99
host: containerapp
1010
language: python
11+
resourceName: ${SERVICE_FASTAPI_POSTGRES_ACA_NAME}
1112
docker:
1213
path: Dockerfile
1314
registry: ${AZURE_CONTAINER_REGISTRY_ENDPOINT}
14-
resources:
15-
fastapi-postgres-aca:
16-
type: host.containerapp
17-
uses:
18-
- pycon-members
19-
port: 8000
20-
pycon-members:
21-
type: db.postgres
2215
infra:
2316
provider: terraform

infra/output.tf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,30 @@ output "CONTAINER_APP_FQDN" {
5353
description = "The FQDN of the Container App"
5454
value = module.containerapp.container_app_fqdn
5555
}
56+
57+
output "DATABASE_URL" {
58+
description = "PostgreSQL connection string"
59+
value = module.postgres.connection_string
60+
sensitive = true
61+
}
62+
63+
64+
# ------------------------------------------------------------------------------------------------------
65+
# Azure Developer CLI (azd) Service Outputs
66+
# Required for azd deploy to work - maps to service name in azure.yaml
67+
# ------------------------------------------------------------------------------------------------------
68+
69+
output "SERVICE_FASTAPI_POSTGRES_ACA_NAME" {
70+
description = "The name of the Container App for azd service mapping"
71+
value = module.containerapp.container_app_name
72+
}
73+
74+
output "SERVICE_FASTAPI_POSTGRES_ACA_URI" {
75+
description = "The URI of the Container App for azd service mapping"
76+
value = module.containerapp.container_app_url
77+
}
78+
79+
output "SERVICE_FASTAPI_POSTGRES_ACA_IMAGE_NAME" {
80+
description = "The image name for the Container App"
81+
value = var.container_image
82+
}

0 commit comments

Comments
 (0)