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

Issue #30: As a Devops, I would like to rework the file structure in this directory #37

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
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Infrastructure integration workflow
---
name: Howard integration workflow

on:

Check warning on line 4 in .github/workflows/workflow.yaml

View workflow job for this annotation

GitHub Actions / yaml-check / yaml-lint-check

4:1 [truthy] truthy value should be one of [false, true]

Check warning on line 4 in .github/workflows/workflow.yaml

View workflow job for this annotation

GitHub Actions / yaml-check / yaml-lint-check

4:1 [truthy] truthy value should be one of [false, true]
pull_request:
types:
- opened
Expand All @@ -8,9 +9,10 @@
- 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
ai-cfia/github-workflows/.github/workflows/workflow-markdown-check.yml@main

yaml-check:
uses:
Expand Down
102 changes: 0 additions & 102 deletions .terraform.lock.hcl

This file was deleted.

12 changes: 6 additions & 6 deletions apply-terraform.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
trigger:
branches:
include:
- main
- main

pool:
vmImage: 'ubuntu-latest'
Expand All @@ -22,7 +20,8 @@ stages:
inputs:
provider: 'azurerm'
command: 'init'
workingDirectory: '$(System.DefaultWorkingDirectory)/terraform'
workingDirectory:
'$(System.DefaultWorkingDirectory)/terraform/staging'
backendServiceArm: '$(serviceConnectionName)'
backendAzureRmResourceGroupName: '$(resourceGroupName)'
backendAzureRmStorageAccountName: '$(storageAccountName)'
Expand All @@ -34,7 +33,8 @@ stages:
inputs:
provider: 'azurerm'
command: 'plan'
workingDirectory: '$(System.DefaultWorkingDirectory)/terraform'
workingDirectory:
'$(System.DefaultWorkingDirectory)/terraform/staging'
environmentServiceNameAzureRM: '$(serviceConnectionName)'

- stage: Apply
Expand All @@ -57,5 +57,5 @@ stages:
provider: 'azurerm'
command: 'apply'
workingDirectory:
'$(System.DefaultWorkingDirectory)/terraform'
'$(System.DefaultWorkingDirectory)/terraform/staging'
environmentServiceNameAzureRM: '$(serviceConnectionName)'
21 changes: 0 additions & 21 deletions main.tf

This file was deleted.

34 changes: 0 additions & 34 deletions providers.tf

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ resource "google_container_cluster" "cluster" {

# Optional, if you want multi-zonal cluster
node_locations = [
"${var.location_2}"
var.location_2
]

addons_config {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
terraform {

required_version = ">= 1.7.2"

required_providers {
local = {
source = "hashicorp/local"
Expand All @@ -25,5 +28,5 @@ terraform {

provider "google" {
project = var.project_id
region = var.region
region = var.region
}
26 changes: 26 additions & 0 deletions terraform/prod/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
terraform {

required_version = ">= 1.1.0"

# backend "azurerm" {
# resource_group_name = "rg-ai-cfia-terraform-state"
# storage_account_name = "tfcfiastate"
# container_name = "infra-terraform-state"
# key = "tf/terraform.tfstate"
# }

# required_providers {
# azurerm = {
# source = "hashicorp/azurerm"
# version = "~> 3.25"
# }
# kubernetes = {
# source = "hashicorp/kubernetes"
# version = "2.24.0"
# }
# }
}

# provider "azurerm" {
# features {}
# }
60 changes: 60 additions & 0 deletions terraform/staging/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
terraform {

required_version = ">= 1.7.2"

backend "azurerm" {
resource_group_name = "rg-ai-cfia-terraform-state"
storage_account_name = "tfcfiastate"
container_name = "infra-terraform-state"
key = "tf/terraform.tfstate"
}

# backend "gcs" {
# bucket = "terraform-tfstate-gcp-storage"
# prefix = "terraform/state"
# }

required_providers {
google = {
source = "hashicorp/google"
version = "~> 5.0"
}
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.25"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = "2.24.0"
}
# aws = {
# source = "hashicorp/aws"
# version = "~> 3.0"
# }
}
}

provider "azurerm" {
features {}
}

# provider "google" {
# project = "spartan-rhino-408115"
# region = "northamerica-northeast1"
# }

# provider "kubernetes" {
# config_path = "~/.kube/config"
# config_context = var.kube_ctx
# }

# module "gcp-kubernetes-cluster-0" {
# source = "./terraform/gcp-kubernetes-cluster"

# cluster_name = "acia-cfia"
# project_id = "spartan-rhino-408115"

# region = "northamerica-northeast1"
# location_1 = "northamerica-northeast1-a"
# location_2 = "northamerica-northeast1-b"
# }
4 changes: 4 additions & 0 deletions terraform/staging/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# variable "kube_ctx" {
# description = "The kubernetes cluster context."
# type = string
# }
4 changes: 0 additions & 4 deletions variables.tf

This file was deleted.

Loading