-
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.
Merge pull request #29 from ai-cfia/28-as-a-devops-i-would-like-to-au…
…tomate-azure-infrastructure-deployment-using-terraform Issue #28: As a DevOps, I would like to automate Azure infrastructure deployment using Terraform
- Loading branch information
Showing
4 changed files
with
122 additions
and
34 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 |
---|---|---|
@@ -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,16 +1,24 @@ | ||
# Infrastructure Repository for ACIA-CFIA AI-Lab | ||
|
||
This repository is dedicated to the infrastructure management of the ACIA-CFIA AI-Lab. It contains scripts, configurations, and documentation pertinent to infrastructure and DevOps practices within the lab, facilitating setup, deployment, and management across multiple cloud platforms including AWS, GCP, and Azure. | ||
This repository is dedicated to the infrastructure management of the ACIA-CFIA | ||
AI-Lab. It contains scripts, configurations, and documentation pertinent to | ||
infrastructure and DevOps practices within the lab, facilitating setup, | ||
deployment, and management across multiple cloud platforms including AWS, GCP, | ||
and Azure. | ||
|
||
## Contents: | ||
## Contents | ||
|
||
Cross-Cloud Setup Scripts: Automation scripts for seamless configuration across AWS, GCP, and Azure, covering project initiation, billing account association, artifact repository orchestration, and service account setup. | ||
GitHub Repository Creation Guide: Detailed instructions for creating new repositories in alignment with ACIA-CFIA standards. | ||
Getting Started: | ||
Cross-Cloud Setup Scripts: Automation scripts for seamless configuration across | ||
AWS, GCP, and Azure, covering project initiation, billing account association, | ||
artifact repository orchestration, and service account setup. GitHub Repository | ||
Creation Guide: Detailed instructions for creating new repositories in alignment | ||
with ACIA-CFIA standards. Getting Started: | ||
|
||
## Clone this repository | ||
|
||
## Clone this repository. | ||
1. Navigate to the desired script or documentation. | ||
2. Follow the provided instructions. | ||
3. Related Repositories: | ||
|
||
Dev-Rel-Docs: Contains introductory files and documentation related to developer relations at ACIA-CFIA AI-Lab. | ||
Dev-Rel-Docs: Contains introductory files and documentation related to developer | ||
relations at ACIA-CFIA AI-Lab. |
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)' |