-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue #1: fixed EOF and completing the merge from main
- Loading branch information
Showing
5 changed files
with
111 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: Infra integration workflow | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- closed | ||
- synchronize | ||
|
||
jobs: | ||
|
||
markdown-check: | ||
uses: | ||
ai-cfia/github-workflows/.github/workflows/workflow-markdown-check.yml@76-as-a-devops-i-would-like-to-fix-the-markdown-lint-workflow | ||
|
||
yaml-check: | ||
uses: | ||
ai-cfia/github-workflows/.github/workflows/workflow-yaml-check.yml@main | ||
|
||
repo-standard: | ||
uses: | ||
ai-cfia/github-workflows/.github/workflows/workflow-repo-standards-validation.yml@main | ||
secrets: inherit | ||
|
||
terraform-check: | ||
uses: | ||
ai-cfia/github-workflows/.github/workflows/workflow-terraform-check.yml@main | ||
with: | ||
config-file-path: '.tflint.hcl' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"aliveStatusCodes": [999,200,403] | ||
} | ||
"aliveStatusCodes": [200,403] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
plugin "terraform" { | ||
enabled = true | ||
preset = "recommended" | ||
} | ||
|
||
plugin "azurerm" { | ||
enabled = true | ||
version = "0.25.1" | ||
source = "github.com/terraform-linters/tflint-ruleset-azurerm" | ||
} | ||
|
||
plugin "aws" { | ||
enabled = true | ||
version = "0.29.0" | ||
source = "github.com/terraform-linters/tflint-ruleset-aws" | ||
} | ||
|
||
plugin "google" { | ||
enabled = true | ||
version = "0.26.0" | ||
source = "github.com/terraform-linters/tflint-ruleset-google" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,61 @@ | ||
--- | ||
trigger: | ||
branches: | ||
include: | ||
- 3-create-a-kubernetes-cluster-for-azure-w-the-ingress-nginx | ||
- main | ||
|
||
pool: | ||
vmImage: 'ubuntu-latest' | ||
steps: | ||
- task: TerraformTaskV1@0 | ||
displayName: Terra Init | ||
inputs: | ||
provider: 'azurerm' | ||
command: 'init' | ||
workingDirectory: '$(System.DefaultWorkingDirectory)/terraform' | ||
backendServiceArm: 'CFSC-AiLabChatbot-Sub-SP' | ||
backendAzureRmResourceGroupName: 'rg-ai-cfia-terraform-state' | ||
backendAzureRmStorageAccountName: 'tfcfiastate' | ||
backendAzureRmContainerName: 'infra-terraform-state' | ||
backendAzureRmKey: 'tf/terraform.tfstate' | ||
- task: TerraformTaskV1@0 | ||
displayName: Terra Plan | ||
inputs: | ||
provider: 'azurerm' | ||
command: 'plan' | ||
workingDirectory: $(System.DefaultWorkingDirectory) | ||
environmentServiceNameAzureRM: 'CFSC-AiLabChatbot-Sub-SP' | ||
- task: TerraformTaskV1@0 | ||
displayName: Terra Apply | ||
inputs: | ||
provider: 'azurerm' | ||
command: 'apply' | ||
workingDirectory: $(System.DefaultWorkingDirectory) | ||
environmentServiceNameAzureRM: 'CFSC-AiLabChatbot-Sub-SP' | ||
|
||
variables: | ||
- group: terraform-backend-settings | ||
|
||
stages: | ||
- stage: InitAndPlan | ||
displayName: 'Initialize and Plan' | ||
jobs: | ||
- job: TerraformInitPlan | ||
displayName: 'Terraform Init and Plan' | ||
steps: | ||
- task: TerraformTaskV2@2 | ||
displayName: Terra Init | ||
inputs: | ||
provider: 'azurerm' | ||
command: 'init' | ||
workingDirectory: '$(System.DefaultWorkingDirectory)/terraform' | ||
backendServiceArm: '$(serviceConnectionName)' | ||
backendAzureRmResourceGroupName: '$(resourceGroupName)' | ||
backendAzureRmStorageAccountName: '$(storageAccountName)' | ||
backendAzureRmContainerName: '$(containerName)' | ||
backendAzureRmKey: '$(stateKey)' | ||
|
||
- task: TerraformTaskV1@0 | ||
displayName: Terra Plan | ||
inputs: | ||
provider: 'azurerm' | ||
command: 'plan' | ||
workingDirectory: '$(System.DefaultWorkingDirectory)/terraform' | ||
environmentServiceNameAzureRM: '$(serviceConnectionName)' | ||
|
||
- stage: Apply | ||
displayName: 'Apply Terraform Plan' | ||
dependsOn: InitAndPlan | ||
condition: succeeded() | ||
jobs: | ||
- deployment: TerraformApply | ||
displayName: 'Terraform Apply' | ||
pool: | ||
vmImage: 'ubuntu-latest' | ||
environment: 'ProductionApproval' | ||
strategy: | ||
runOnce: | ||
deploy: | ||
steps: | ||
- task: TerraformTaskV1@0 | ||
displayName: 'Terra Apply' | ||
inputs: | ||
provider: 'azurerm' | ||
command: 'apply' | ||
workingDirectory: | ||
'$(System.DefaultWorkingDirectory)/terraform' | ||
environmentServiceNameAzureRM: '$(serviceConnectionName)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters