diff --git a/.github/workflows/dev-deployment.yml b/.github/workflows/dev-deployment.yml index b1cf8f1..57237bf 100644 --- a/.github/workflows/dev-deployment.yml +++ b/.github/workflows/dev-deployment.yml @@ -44,7 +44,9 @@ jobs: aws-region: ${{ secrets.AWS_REGION }} - name: Initialize Terraform - run: terraform init + run: | + cd iac + terraform init - name: Select Terraform Workspace run: terraform workspace select dev diff --git a/.github/workflows/prod-deployment.yml b/.github/workflows/prod-deployment.yml index 135b1ef..b3af443 100644 --- a/.github/workflows/prod-deployment.yml +++ b/.github/workflows/prod-deployment.yml @@ -44,7 +44,9 @@ jobs: aws-region: ${{ secrets.AWS_REGION }} - name: Initialize Terraform - run: terraform init + run: | + cd iac + terraform init - name: Select Terraform Workspace run: terraform workspace select prod diff --git a/.terraform-version b/iac/.terraform-version similarity index 100% rename from .terraform-version rename to iac/.terraform-version diff --git a/.terraform.lock.hcl b/iac/.terraform.lock.hcl similarity index 95% rename from .terraform.lock.hcl rename to iac/.terraform.lock.hcl index 924b5fb..fe21a57 100644 --- a/.terraform.lock.hcl +++ b/iac/.terraform.lock.hcl @@ -4,6 +4,7 @@ provider "registry.terraform.io/hashicorp/archive" { version = "2.4.0" hashes = [ + "h1:ZtsrX5F13Ohsv/k/BvgyBVn0gF+lW4bkG7JmCGrN35Y=", "h1:cJokkjeH1jfpG4QEHdRx0t2j8rr52H33A7C/oX73Ok4=", "zh:18e408596dd53048f7fc8229098d0e3ad940b92036a24287eff63e2caec72594", "zh:392d4216ecd1a1fd933d23f4486b642a8480f934c13e2cae3c13b6b6a7e34a7b", @@ -23,6 +24,7 @@ provider "registry.terraform.io/hashicorp/archive" { provider "registry.terraform.io/hashicorp/aws" { version = "5.15.0" hashes = [ + "h1:3nyOhTsrJuoemeNyCu6rrhdWfJR0TCsq+9DZeErSd0g=", "h1:CFUr3EXmKTr3G4Nl+Yxf24NnhKQQDCyeBG+SS4YFblE=", "zh:069d0037cd1f8791a27ec31a535ce47d02d4f220fe88f9c3caa8661c0a98892a", "zh:08c18e8f5f69736e86919e6c2a68c94f39f879511d51b2a8e58ad1776ee18854", @@ -45,6 +47,7 @@ provider "registry.terraform.io/hashicorp/aws" { provider "registry.terraform.io/hashicorp/null" { version = "3.2.1" hashes = [ + "h1:tSj1mL6OQ8ILGqR2mDu7OYYYWf+hoir0pf9KAQ8IzO8=", "h1:ydA0/SNRVB1o95btfshvYsmxA+jZFRZcvKzZSB+4S1M=", "zh:58ed64389620cc7b82f01332e27723856422820cfd302e304b5f6c3436fb9840", "zh:62a5cc82c3b2ddef7ef3a6f2fedb7b9b3deff4ab7b414938b08e51d6e8be87cb", diff --git a/apigw.tf b/iac/apigw.tf similarity index 100% rename from apigw.tf rename to iac/apigw.tf diff --git a/dynamo.tf b/iac/dynamo.tf similarity index 100% rename from dynamo.tf rename to iac/dynamo.tf diff --git a/iam.tf b/iac/iam.tf similarity index 100% rename from iam.tf rename to iac/iam.tf diff --git a/lambda.tf b/iac/lambda.tf similarity index 95% rename from lambda.tf rename to iac/lambda.tf index ea5e4d3..1db8a60 100644 --- a/lambda.tf +++ b/iac/lambda.tf @@ -1,7 +1,7 @@ resource "null_resource" "api_function_binary" { provisioner "local-exec" { command = "GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GOFLAGS=-trimpath go build -mod=readonly -tags lambda.norpc -ldflags='-s -w' -o ../api_function_bootstrap/bootstrap ./lambda/api" - working_dir = "./src" + working_dir = "../src" } triggers = { @@ -12,7 +12,7 @@ resource "null_resource" "api_function_binary" { resource "null_resource" "populate_provider_versions_binary" { provisioner "local-exec" { command = "GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GOFLAGS=-trimpath go build -mod=readonly -tags lambda.norpc -ldflags='-s -w' -o ../populate_provider_versions_bootstrap/bootstrap ./lambda/populate_provider_versions" - working_dir = "./src" + working_dir = "../src" } triggers = { @@ -24,7 +24,7 @@ data "archive_file" "api_function_archive" { depends_on = [null_resource.api_function_binary] type = "zip" - source_file = "./api_function_bootstrap/bootstrap" + source_file = "../api_function_bootstrap/bootstrap" output_path = "api_bootstrap.zip" } @@ -32,7 +32,7 @@ data "archive_file" "populate_provider_versions_archive" { depends_on = [null_resource.populate_provider_versions_binary] type = "zip" - source_file = "./populate_provider_versions_bootstrap/bootstrap" + source_file = "../populate_provider_versions_bootstrap/bootstrap" output_path = "populate_provider_versions_bootstrap.zip" } diff --git a/main.tf b/iac/main.tf similarity index 100% rename from main.tf rename to iac/main.tf diff --git a/r53.tf b/iac/r53.tf similarity index 100% rename from r53.tf rename to iac/r53.tf diff --git a/secrets.tf b/iac/secrets.tf similarity index 100% rename from secrets.tf rename to iac/secrets.tf diff --git a/variables.tf b/iac/variables.tf similarity index 100% rename from variables.tf rename to iac/variables.tf