Skip to content

Commit

Permalink
gha opex refactioring (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
pasqualespica authored Jun 18, 2024
1 parent e1bb39c commit e330298
Show file tree
Hide file tree
Showing 28 changed files with 115 additions and 25 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/create_dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
strategy:
matrix:
environment: [prod]
product: [apim_v1, apim_v2]
infra: [apim_v1, apim_v2]
product: [redirect, trx_v1, trx_v2]
max-parallel: 1
environment:
name: ${{ matrix.environment }}
Expand All @@ -43,8 +44,8 @@ jobs:
- uses: pagopa/[email protected]
with:
environment: ${{ matrix.environment }}
api-name: ${{ matrix.product }} # empty to have `.opex/env` directory structure
config: .opex/${{ matrix.product }}/env/${{ matrix.environment }}/config.yaml
api-name: ${{ matrix.infra }}/${{ matrix.product }} # empty to have `.opex/env` directory structure
config: .opex/${{ matrix.infra }}/${{ matrix.product }}/env/${{ matrix.environment }}/config.yaml
client-id: ${{ secrets.CLIENT_ID }}
tenant-id: ${{ secrets.TENANT_ID }}
subscription-id: ${{ secrets.SUBSCRIPTION_ID }}
Expand Down
1 change: 0 additions & 1 deletion .opex/apim_v1/env/uat/backend.ini

This file was deleted.

4 changes: 0 additions & 4 deletions .opex/apim_v1/env/uat/backend.tfvars

This file was deleted.

9 changes: 0 additions & 9 deletions .opex/apim_v1/env/uat/config.yaml

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource_group_name = "terraform-state-rg"
storage_account_name = "tfappprodpagopa"
container_name = "terraform-state"
key = "opex.pagopa-ecommerce-transactions-service.terraform.tfstate"
key = "opex.pagopa-ecommerce-transactions-service-redirect.terraform.tfstate"
12 changes: 12 additions & 0 deletions .opex/apim_v1/redirect/env/prod/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
oa3_spec: ./api-spec/client/openapi/redirect/redirect-api.yaml # If start with http the file would be downloaded from the internet
name: opex_pagopa-ecommerce-transactions-redirect-service
location: West Europe
timespan: 5m # Default, a number or a timespan https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/timespan
data_source: /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-api-rg/providers/Microsoft.ApiManagement/service/pagopa-p-apim
resource_type: api-management
action_groups:
- /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-monitor-rg/providers/microsoft.insights/actionGroups/PagoPA
- /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-monitor-rg/providers/microsoft.insights/actionGroups/SlackPagoPA
overrides:
hosts: # Use these hosts instead of those inside the OpenApi spec
- api.platform.pagopa.it
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions .opex/apim_v1/trx_v1/env/prod/backend.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource_group_name = "terraform-state-rg"
storage_account_name = "tfappprodpagopa"
container_name = "terraform-state"
key = "opex.pagopa-ecommerce-transactions-v1-service.terraform.tfstate"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
oa3_spec: ./api-spec/transactions-api.yaml # If start with http the file would be downloaded from the internet
name: opex_pagopa-ecommerce-transactions-service
oa3_spec: ./api-spec/v1/transactions-api.yaml # If start with http the file would be downloaded from the internet
name: opex_pagopa-ecommerce-transactions-v1-service
location: West Europe
timespan: 5m # Default, a number or a timespan https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/timespan
data_source: /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-api-rg/providers/Microsoft.ApiManagement/service/pagopa-p-apim
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions .opex/apim_v1/trx_v2/env/prod/backend.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
subscription=PROD-pagoPA
4 changes: 4 additions & 0 deletions .opex/apim_v1/trx_v2/env/prod/backend.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource_group_name = "terraform-state-rg"
storage_account_name = "tfappprodpagopa"
container_name = "terraform-state"
key = "opex.pagopa-ecommerce-transactions-v1-service.terraform.tfstate"
12 changes: 12 additions & 0 deletions .opex/apim_v1/trx_v2/env/prod/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
oa3_spec: ./api-spec/v2/transactions-api.yaml # If start with http the file would be downloaded from the internet
name: opex_pagopa-ecommerce-transactions-v2-service
location: West Europe
timespan: 5m # Default, a number or a timespan https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/timespan
data_source: /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-api-rg/providers/Microsoft.ApiManagement/service/pagopa-p-apim
resource_type: api-management
action_groups:
- /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-monitor-rg/providers/microsoft.insights/actionGroups/PagoPA
- /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-monitor-rg/providers/microsoft.insights/actionGroups/SlackPagoPA
overrides:
hosts: # Use these hosts instead of those inside the OpenApi spec
- api.platform.pagopa.it
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
prefix = "pagopa"
env_short = "u"
env_short = "p"


tags = {
CreatedBy = "Terraform"
Environment = "UAT"
Environment = "Prod"
Owner = "pagoPA"
Source = "https://github.com/pagopa/pagopa-ecommerce-transactions-service"
CostCenter = "TS310 - PAGAMENTI & SERVIZI"
Expand Down
1 change: 1 addition & 0 deletions .opex/apim_v2/redirect/env/prod/backend.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
subscription=PROD-pagoPA
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource_group_name = "terraform-state-rg"
storage_account_name = "tfappprodpagopa"
container_name = "terraform-state"
key = "opex.pagopa-ecommerce-transactions-service-apimv2.terraform.tfstate"
key = "opex.pagopa-ecommerce-transactions-service-redirect-apimv2.terraform.tfstate"
13 changes: 13 additions & 0 deletions .opex/apim_v2/redirect/env/prod/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
oa3_spec: ./api-spec/client/openapi/redirect/redirect-api.yaml # If start with http the file would be downloaded from the internet
name: opex_pagopa-ecommerce-transactions-redirect-service-apimv2
location: West Europe
timespan: 5m # Default, a number or a timespan https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/timespan
# data_source: /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-api-rg/providers/Microsoft.ApiManagement/service/pagopa-p-apim
data_source: /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-api-rg/providers/Microsoft.ApiManagement/service/pagopa-p-weu-core-apim-v2
resource_type: api-management
action_groups:
- /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-monitor-rg/providers/microsoft.insights/actionGroups/PagoPA
- /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-monitor-rg/providers/microsoft.insights/actionGroups/SlackPagoPA
overrides:
hosts: # Use these hosts instead of those inside the OpenApi spec
- api.platform.pagopa.it
11 changes: 11 additions & 0 deletions .opex/apim_v2/redirect/env/prod/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix = "pagopa"
env_short = "p"


tags = {
CreatedBy = "Terraform"
Environment = "Prod"
Owner = "pagoPA"
Source = "https://github.com/pagopa/pagopa-ecommerce-transactions-service"
CostCenter = "TS310 - PAGAMENTI & SERVIZI"
}
1 change: 1 addition & 0 deletions .opex/apim_v2/trx_v1/env/prod/backend.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
subscription=PROD-pagoPA
4 changes: 4 additions & 0 deletions .opex/apim_v2/trx_v1/env/prod/backend.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource_group_name = "terraform-state-rg"
storage_account_name = "tfappprodpagopa"
container_name = "terraform-state"
key = "opex.pagopa-ecommerce-transactions-v1-service-apimv2.terraform.tfstate"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
oa3_spec: ./api-spec/transactions-api.yaml # If start with http the file would be downloaded from the internet
name: opex_pagopa-ecommerce-transactions-service-apimv2
oa3_spec: ./api-spec/v1/transactions-api.yaml # If start with http the file would be downloaded from the internet
name: opex_pagopa-ecommerce-transactions-v1-service-apimv2
location: West Europe
timespan: 5m # Default, a number or a timespan https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/timespan
# data_source: /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-api-rg/providers/Microsoft.ApiManagement/service/pagopa-p-apim
Expand Down
11 changes: 11 additions & 0 deletions .opex/apim_v2/trx_v1/env/prod/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix = "pagopa"
env_short = "p"


tags = {
CreatedBy = "Terraform"
Environment = "Prod"
Owner = "pagoPA"
Source = "https://github.com/pagopa/pagopa-ecommerce-transactions-service"
CostCenter = "TS310 - PAGAMENTI & SERVIZI"
}
1 change: 1 addition & 0 deletions .opex/apim_v2/trx_v2/env/prod/backend.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
subscription=PROD-pagoPA
4 changes: 4 additions & 0 deletions .opex/apim_v2/trx_v2/env/prod/backend.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource_group_name = "terraform-state-rg"
storage_account_name = "tfappprodpagopa"
container_name = "terraform-state"
key = "opex.pagopa-ecommerce-transactions-v2-service-apimv2.terraform.tfstate"
13 changes: 13 additions & 0 deletions .opex/apim_v2/trx_v2/env/prod/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
oa3_spec: ./api-spec/v2/transactions-api.yaml # If start with http the file would be downloaded from the internet
name: opex_pagopa-ecommerce-transactions-v2-service-apimv2
location: West Europe
timespan: 5m # Default, a number or a timespan https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/timespan
# data_source: /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-api-rg/providers/Microsoft.ApiManagement/service/pagopa-p-apim
data_source: /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-api-rg/providers/Microsoft.ApiManagement/service/pagopa-p-weu-core-apim-v2
resource_type: api-management
action_groups:
- /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-monitor-rg/providers/microsoft.insights/actionGroups/PagoPA
- /subscriptions/b9fc9419-6097-45fe-9f74-ba0641c91912/resourceGroups/pagopa-p-monitor-rg/providers/microsoft.insights/actionGroups/SlackPagoPA
overrides:
hosts: # Use these hosts instead of those inside the OpenApi spec
- api.platform.pagopa.it
11 changes: 11 additions & 0 deletions .opex/apim_v2/trx_v2/env/prod/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix = "pagopa"
env_short = "p"


tags = {
CreatedBy = "Terraform"
Environment = "Prod"
Owner = "pagoPA"
Source = "https://github.com/pagopa/pagopa-ecommerce-transactions-service"
CostCenter = "TS310 - PAGAMENTI & SERVIZI"
}

0 comments on commit e330298

Please sign in to comment.