Skip to content

Commit

Permalink
bunch of changes after PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Krusty93 committed Nov 2, 2023
1 parent 392d29e commit 52750fb
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 41 deletions.
35 changes: 0 additions & 35 deletions .container_app/locals.tf

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ data "azurerm_container_app_environment" "container_app_environment" {
name = "${local.project}-cae"
}

resource "azapi_resource" "container_app_onboarding" {
resource "azapi_resource" "container_app" {
type = "Microsoft.App/containerApps@2023-05-01"
name = "${local.project}-${local.app_name}-ca"
location = data.azurerm_resource_group.resource_group_app.location
Expand All @@ -46,7 +46,6 @@ resource "azapi_resource" "container_app_onboarding" {
latestRevision = true
label = "latest"
weight = 100

}
]
targetPort = 8080
Expand All @@ -58,7 +57,7 @@ resource "azapi_resource" "container_app_onboarding" {
containers = [
{
env = concat(var.app_settings, local.secrets_env)
image = "ghcr.io/pagopa/selfcare-onboarding:${var.image_tag}"
image = "ghcr.io/pagopa/selfcare-onboarding-ms:${var.image_tag}"
name = "${local.project}-${local.app_name}"
resources = {
cpu = var.container_app.cpu
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions .container_apps/onboarding-ms/locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
locals {
project = "${var.prefix}-${var.env_short}"
app_name = "onboarding-ms"

secrets = [for secret in var.key_vault.secrets_names :
{
identity = "system"
name = "${secret}"
keyVaultUrl = data.azurerm_key_vault_secret.keyvault_secret["${secret}"].id
}]

secrets_env = [for secret in var.key_vault.secrets_names :
{
name = upper(secret)
secretRef = secret
}]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions .github/workflows/deploy_onboarding_ms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
- prod

env:
DIR: "./.container_app"
DIR: "./.container_apps/onboarding-ms"
# This condition (that unfortunately must be replicated for the first job)
# sets the environment depending on the current context for manually
# started workflows, it picks up the value coming from the UI; otherwise,
Expand Down Expand Up @@ -80,12 +80,13 @@ jobs:
id: meta
uses: docker/[email protected]
with:
images: ghcr.io/${{ github.repository }}
images: ghcr.io/${{ github.repository }}-ms
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=sha
labels: org.opencontainers.image.title=${{ github.repository }}
labels:
org.opencontainers.image.title=${{ github.repository }}-ms
org.opencontainers.image.description=SelfCare onboarding microservice
org.opencontainers.image.authors=PagoPA
org.opencontainers.image.url=github.com/pagopa/${{ github.repository }}
Expand Down

0 comments on commit 52750fb

Please sign in to comment.