Skip to content

Commit

Permalink
Move apps into shared resource group
Browse files Browse the repository at this point in the history
  • Loading branch information
benchiverton committed Jul 2, 2024
1 parent 67a03c8 commit c4903c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/config/container-environment-config.yaml

This file was deleted.

8 changes: 3 additions & 5 deletions .github/workflows/instance-deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,15 @@ jobs:
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Deploy api
uses: benchiverton/container-apps-deploy-action@container-env-resource-group
uses: azure/container-apps-deploy-action@v1
with:
acrName: onlinestorecontainerregistry
acrUsername: ${{ secrets.ACR_USERNAME }}
acrPassword: ${{ secrets.ACR_TOKEN }}
containerAppName: ${{ github.head_ref }}-onlinestore-api
containerAppEnvironmentResourceGroup: onlinestore-shared-rg
imageToDeploy: onlinestorecontainerregistry.azurecr.io/onlinestore-api:${{ github.sha }}
location: 'East US'
resourceGroup: ${{ env.resource_group_name }}
resourceGroup: onlinestore-shared-rg
targetPort: 8080
environmentVariables: OTEL_EXPORTER_OTLP_ENDPOINT=http://${{ github.head_ref }}-onlinestore-monitoring:18889
- name: Deploy website
Expand All @@ -129,10 +128,9 @@ jobs:
acrUsername: ${{ secrets.ACR_USERNAME }}
acrPassword: ${{ secrets.ACR_TOKEN }}
containerAppName: ${{ github.head_ref }}-onlinestore-website
containerAppEnvironmentResourceGroup: onlinestore-shared-rg
imageToDeploy: onlinestorecontainerregistry.azurecr.io/onlinestore-website:${{ github.sha }}
location: 'East US'
resourceGroup: ${{ env.resource_group_name }}
resourceGroup: onlinestore-shared-rg
targetPort: 80
environmentVariables: "API__BASEPATH=https://${{ github.head_ref }}-api.rockpal.co.uk"
- name: Find Comment
Expand Down
6 changes: 3 additions & 3 deletions terraform/instance/container_apps.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data "azurerm_container_app_environment" "apps" {
resource "azurerm_container_app" "api" {
name = "${lower(var.environment)}-${var.name}-api"
container_app_environment_id = data.azurerm_container_app_environment.apps.id
resource_group_name = azurerm_resource_group.instance.name
resource_group_name = data.azurerm_container_app_environment.apps.resource_group_name
revision_mode = "Single"

template {
Expand Down Expand Up @@ -41,7 +41,7 @@ resource "azurerm_container_app" "api" {
resource "azurerm_container_app" "website" {
name = "${lower(var.environment)}-${var.name}-website"
container_app_environment_id = data.azurerm_container_app_environment.apps.id
resource_group_name = azurerm_resource_group.instance.name
resource_group_name = data.azurerm_container_app_environment.apps.resource_group_name
revision_mode = "Single"

template {
Expand Down Expand Up @@ -76,7 +76,7 @@ resource "azurerm_container_app" "website" {
resource "azurerm_container_app" "monitoring" {
name = "${lower(var.environment)}-${var.name}-monitoring"
container_app_environment_id = data.azurerm_container_app_environment.apps.id
resource_group_name = azurerm_resource_group.instance.name
resource_group_name = data.azurerm_container_app_environment.apps.resource_group_name
revision_mode = "Single"

template {
Expand Down

0 comments on commit c4903c9

Please sign in to comment.