Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused resources #4

Merged
merged 5 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .devops/code-review-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pr:
autoCancel: true
branches:
include:
- main
Expand Down Expand Up @@ -51,7 +52,7 @@ stages:
dependsOn: []
condition: and(succeeded(), eq(${{parameters.DEV}}, true))
pool:
name: pagopa-dev-linux
name: selfcare-dev-linux
jobs:
- job: terraform_install
steps:
Expand All @@ -65,15 +66,15 @@ stages:
# 2. Run terragrunt plan
- template: templates/terraform-plan/template.yaml@terraform
parameters:
SUBSCRIPTION: DEV-PAGOPA-SERVICE-CONN
SUBSCRIPTION: DEV-SELFCARE-SERVICE-CONN
ENVIRONMENT: dev
WORKINGDIR: 'src/core'

- stage: UAT
dependsOn: []
condition: and(succeeded(), eq(${{parameters.UAT}}, true))
pool:
name: pagopa-uat-linux
name: selfcare-uat-linux
jobs:
- job: terraform_install
steps:
Expand All @@ -87,15 +88,15 @@ stages:
# 2. Run terragrunt plan
- template: templates/terraform-plan/template.yaml@terraform
parameters:
SUBSCRIPTION: UAT-PAGOPA-SERVICE-CONN
SUBSCRIPTION: UAT-SELFCARE-SERVICE-CONN
ENVIRONMENT: uat
WORKINGDIR: 'src/core'

- stage: PROD
dependsOn: []
condition: and(succeeded(), eq(${{parameters.PROD}}, true))
pool:
name: pagopa-prod-linux
name: selfcare-prod-linux
jobs:
- job: terraform_install
steps:
Expand All @@ -109,6 +110,6 @@ stages:
# 2. Run terragrunt plan
- template: templates/terraform-plan/template.yaml@terraform
parameters:
SUBSCRIPTION: PROD-PAGOPA-SERVICE-CONN
SUBSCRIPTION: PROD-SELFCARE-SERVICE-CONN
ENVIRONMENT: prod
WORKINGDIR: 'src/core'
24 changes: 12 additions & 12 deletions .devops/deploy-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ stages:
dependsOn: []
condition: and(succeeded(), eq(${{parameters.DEV}}, true))
pool:
name: pagopa-dev-linux
name: selfcare-dev-linux
jobs:
- job: plan
timeoutInMinutes: $[variables.TIME_OUT]
Expand All @@ -55,15 +55,15 @@ stages:
# 2. Run terraform plan
- template: templates/terraform-plan/template.yaml@terraform
parameters:
SUBSCRIPTION: DEV-PAGOPA-SERVICE-CONN
SUBSCRIPTION: DEV-SELFCARE-SERVICE-CONN
ENVIRONMENT: dev
WORKINGDIR: 'src/core'

- stage: apply_DEV
dependsOn: [plan_DEV]
condition: and(succeeded(), eq(${{parameters.DEV}}, true))
pool:
name: pagopa-dev-linux
name: selfcare-dev-linux
jobs:
# - job: init
# steps:
Expand All @@ -81,7 +81,7 @@ stages:
# 3. Run terraform apply
- template: templates/terraform-apply/template.yaml@terraform
parameters:
SUBSCRIPTION: DEV-PAGOPA-SERVICE-CONN
SUBSCRIPTION: DEV-SELFCARE-SERVICE-CONN
ENVIRONMENT: dev
WORKINGDIR: 'src/core'

Expand All @@ -90,7 +90,7 @@ stages:
dependsOn: []
condition: and(succeeded(), eq(${{parameters.UAT}}, true))
pool:
name: pagopa-uat-linux
name: selfcare-uat-linux
jobs:
- job: plan
timeoutInMinutes: $[variables.TIME_OUT]
Expand All @@ -100,15 +100,15 @@ stages:
# 2. Run terraform plan
- template: templates/terraform-plan/template.yaml@terraform
parameters:
SUBSCRIPTION: UAT-PAGOPA-SERVICE-CONN
SUBSCRIPTION: UAT-SELFCARE-SERVICE-CONN
ENVIRONMENT: uat
WORKINGDIR: 'src/core'

- stage: apply_UAT
dependsOn: [plan_UAT]
condition: and(succeeded(), eq(${{parameters.UAT}}, true))
pool:
name: pagopa-uat-linux
name: selfcare-uat-linux
jobs:
# - job: init
# steps:
Expand All @@ -126,7 +126,7 @@ stages:
# 3. Run terraform apply
- template: templates/terraform-apply/template.yaml@terraform
parameters:
SUBSCRIPTION: UAT-PAGOPA-SERVICE-CONN
SUBSCRIPTION: UAT-SELFCARE-SERVICE-CONN
ENVIRONMENT: uat
WORKINGDIR: 'src/core'

Expand All @@ -135,7 +135,7 @@ stages:
dependsOn: []
condition: and(succeeded(), eq(${{parameters.PROD}}, true))
pool:
name: pagopa-prod-linux
name: selfcare-prod-linux
jobs:
- job: plan
timeoutInMinutes: $[variables.TIME_OUT]
Expand All @@ -145,15 +145,15 @@ stages:
# 2. Run terraform plan
- template: templates/terraform-plan/template.yaml@terraform
parameters:
SUBSCRIPTION: PROD-PAGOPA-SERVICE-CONN
SUBSCRIPTION: PROD-SELFCARE-SERVICE-CONN
ENVIRONMENT: prod
WORKINGDIR: 'src/core'

- stage: apply_PROD
dependsOn: [plan_PROD]
condition: and(succeeded(), eq(${{parameters.PROD}}, true))
pool:
name: pagopa-prod-linux
name: selfcare-prod-linux
jobs:
# - job: init
# steps:
Expand All @@ -171,6 +171,6 @@ stages:
# 3. Run terraform apply
- template: templates/terraform-apply/template.yaml@terraform
parameters:
SUBSCRIPTION: PROD-PAGOPA-SERVICE-CONN
SUBSCRIPTION: PROD-SELFCARE-SERVICE-CONN
ENVIRONMENT: prod
WORKINGDIR: 'src/core'
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
- [ ] Update configuration to existing resources
- [ ] Remove existing resources

### Env to apply

- [ ] DEV
- [ ] UAT
- [ ] PROD

### Does this introduce a change to production resources with possible user impact?

- [ ] Yes, users may be impacted applying this change
Expand Down
22 changes: 21 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
repos:
## general
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
# Common errors
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-yaml
- id: check-executables-have-shebangs
# Cross platform
- id: check-case-conflict
- id: mixed-line-ending
args: [--fix=lf]
# Security
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
## terraform
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.50.0
hooks:
- id: terraform_fmt
- id: terraform_docs
args: ['--args=--sort-by required']
args:
- tfvars hcl --output-file terraform.tfvars.model .
- id: terraform_tflint
args: ['--args=--config=__GIT_WORKING_DIR__/.tflint.hcl']
- id: terraform_tfsec
Expand Down
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ As PagoPA we build our standard Terraform modules, check available modules:
To apply changes follow the standard terraform lifecycle once the code in this repository has been changed:

```sh
terraform init
terraform.sh init [dev|uat|prod]

terraform plan
terraform.sh plan [dev|uat|prod]

terraform apply
terraform.sh apply [dev|uat|prod]
```

## Terraform lock.hcl
Expand Down Expand Up @@ -66,13 +66,3 @@ https://github.com/antonbabenko/pre-commit-terraform#how-to-install
```sh
pre-commit run -a
```

## Terraform docs

Autogenerate Terraform documentation

https://github.com/terraform-docs/terraform-docs#installation

```sh
terraform-docs markdown . --sort-by required > README.md
```
26 changes: 0 additions & 26 deletions src/core/api/apiconfig_api/v1/_base_policy.xml

This file was deleted.

Loading