Compare commits
6 Commits
4eccf8e83c
...
146-switch
| Author | SHA1 | Date | |
|---|---|---|---|
| e50213a1aa | |||
| a54105e8e5 | |||
| b8ec5be269 | |||
| 875b8a0d90 | |||
| 81c589001b | |||
| baedfc1675 |
@@ -17,13 +17,3 @@ jobs:
|
|||||||
environment_name: test
|
environment_name: test
|
||||||
version_number: ${{ github.run_id }}
|
version_number: ${{ github.run_id }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
terraform:
|
|
||||||
if: ${{ needs.changes.outputs.infrastructure == 'true' }}
|
|
||||||
name: terraform-plan
|
|
||||||
needs:
|
|
||||||
- changes
|
|
||||||
uses: ./.gitea/workflows/infrastructure.yaml
|
|
||||||
with:
|
|
||||||
environment_name: test
|
|
||||||
secrets: inherit
|
|
||||||
|
|||||||
@@ -31,15 +31,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Terraform init
|
- name: Terraform init
|
||||||
run: |
|
run: |
|
||||||
terraform -chdir=./infrastructure init -input=false
|
terraform -chdir=./infrastructure init -reconfigure -backend-config="./backend/${{ inputs.environment_name }}.backend.tfvars" -input=false
|
||||||
|
|
||||||
- name: Terraform plan
|
- name: Terraform plan
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
|
||||||
run: |
|
run: |
|
||||||
terraform -chdir=./infrastructure plan -no-color -input=false
|
terraform -chdir=./infrastructure plan -no-color -input=false
|
||||||
|
|
||||||
- name: Terraform apply
|
# - name: Terraform apply
|
||||||
if: ${{ github.event_name != 'pull_request' }}
|
# if: ${{ github.event_name != 'pull_request' }}
|
||||||
run: |
|
# run: |
|
||||||
terraform -chdir=./infrastructure apply -no-color -input=false
|
# terraform -chdir=./infrastructure apply -no-color -input=false
|
||||||
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,6 +2,7 @@
|
|||||||
node_modules
|
node_modules
|
||||||
**/.env
|
**/.env
|
||||||
**/.env.*
|
**/.env.*
|
||||||
|
**/*.env
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.dapr
|
.dapr
|
||||||
**/**/secrets.json
|
**/**/secrets.json
|
||||||
|
|||||||
1
infrastructure/backend/prod.backend.tfvars
Normal file
1
infrastructure/backend/prod.backend.tfvars
Normal file
@@ -0,0 +1 @@
|
|||||||
|
container_name = "tfstate-flying-prod"
|
||||||
1
infrastructure/backend/test.backend.tfvars
Normal file
1
infrastructure/backend/test.backend.tfvars
Normal file
@@ -0,0 +1 @@
|
|||||||
|
container_name = "tfstate-flying-test"
|
||||||
@@ -16,12 +16,9 @@ terraform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
backend "remote" {
|
backend "azurerm" {
|
||||||
hostname = "app.terraform.io"
|
resource_group_name = "noahspan"
|
||||||
organization = "noahspan"
|
storage_account_name = "noahspanterraform"
|
||||||
|
key = "terraform.tfstate"
|
||||||
workspaces {
|
|
||||||
prefix = "noahspan-"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user