diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 06c78b5..53f654c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,30 +10,30 @@ env: AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_ONLY_AWS_SECRET_ACCESS_KEY }} jobs: - terraform: - name: "Terraform" + tofu: + name: "Tofu" runs-on: ubuntu-latest defaults: run: - working-directory: terraform + working-directory: tofu steps: - uses: actions/checkout@v3 - uses: opentofu/setup-opentofu@v1 - - name: OpenTofu fmt + - name: Format id: fmt run: tofu fmt -check continue-on-error: true - - name: OpenTofu Init + - name: Init id: init run: tofu init - - name: OpenTofu Validate + - name: Validate id: validate run: tofu validate -no-color - - name: OpenTofu Plan + - name: Plan id: plan run: tofu plan -no-color continue-on-error: true @@ -96,10 +96,10 @@ jobs: }) } - - name: Terraform Plan Status + - name: Plan Status if: steps.plan.outcome == 'failure' run: exit 1 - - name: Terraform Apply + - name: Apply if: github.ref == 'refs/heads/main' && github.event_name == 'push' - run: terraform apply -auto-approve -input=false + run: tofu apply -auto-approve -input=false diff --git a/.gitignore b/.gitignore index c5c26bc..5688fcd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,31 +1,9 @@ -# Local .terraform directories **/.terraform/* - -# .tfstate files *.tfstate *.tfstate.* - -# Crash log files crash.log - -# Ignore any .tfvars files that are generated automatically for each Terraform run. Most -# .tfvars files are managed as part of configuration and so should be included in -# version control. -# -# example.tfvars - -# Ignore override files as they are usually used to override resources locally and so -# are not checked in override.tf override.tf.json *_override.tf *_override.tf.json - -# Include override files you do wish to add to version control using negated pattern -# -# !example_override.tf - -# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan -# example: *tfplan* -.env -.terraform/ \ No newline at end of file +.env \ No newline at end of file diff --git a/terraform/.terraform.lock.hcl b/terraform/.terraform.lock.hcl deleted file mode 100644 index 3377b37..0000000 --- a/terraform/.terraform.lock.hcl +++ /dev/null @@ -1,23 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/hashicorp/aws" { - version = "4.31.0" - constraints = "~> 4.0" - hashes = [ - "h1:Ib7NTl1AX+17AP1QHbCTl6G2lIjdrlCSSmu8itTTVmk=", - "h1:h/PywKme1EHT3cIIJhG7BJP6dYEIlFx3wcnI2eYi9Y4=", - "zh:14169119237a7ae174ea19f13edf34ed4de963ab97d937fee9d1f1ddd706f883", - "zh:24276942da2b858c2dd9eb0428cfd82b46e758fa00ae38685f05380f75034a8f", - "zh:378f1a9f603995bb76827b703ace8bf5212a9c7b96a106f4a87a9871249c885f", - "zh:38e992e1137d2e8dc203edd659432c21c87c7cbf99439b68253afdb82a079ead", - "zh:56ff847dd504d4098ff4ea7501c8d5ffae4e1ba0dacb85f658d992de474c8fec", - "zh:5b2ab38ba7d04e0d3c5bf0a0ab1aafe806faaa9be228480b772606bd32d41620", - "zh:6e6c6b10f05018691ef767efadc60fe3cd38adb2e66e65a74fa2be0ce3d7f49d", - "zh:90e9fb656d7c19cf702834d7da275b65fc40fbef10224f6f8295a40ca2acb43b", - "zh:92b5eaca47b3ab1829cf4cd96dc144f456bc023329f3e20cf3d5fdc913e6e5e3", - "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", - "zh:ad782fb8ead528a0d8c7c77d1a417f4d8ceaaefbfc0a0c34993ba92e6dc5ff41", - "zh:b121595f53c85bdbb59504b255628d219c42586cb258f0d4cf8a532a98f766e5", - ] -} diff --git a/tofu/.terraform.lock.hcl b/tofu/.terraform.lock.hcl new file mode 100644 index 0000000..6fa0262 --- /dev/null +++ b/tofu/.terraform.lock.hcl @@ -0,0 +1,20 @@ +# This file is maintained automatically by "tofu init". +# Manual edits may be lost in future updates. + +provider "registry.opentofu.org/hashicorp/aws" { + version = "4.67.0" + constraints = "~> 4.0" + hashes = [ + "h1:we2D/YbkMwtTi4ZrPwcwsDi8jXB2kC9jikZP2UqgI08=", + "zh:2b1321bd60deb949ccb13266e15a2ccacbd80a30c4aa48458d4ca8cffb34491f", + "zh:67b909726b0e4d6e9c8a4ddd8036fcb248fcee9b710280b8563045f7657a721a", + "zh:8c4decefe264717ec0bced279d187cb82aff8a1ab8f1da312240f61299647658", + "zh:91a11c67abe7e3329e86547babc9e56caee23e95beb0438165e8fc7e4f02ae44", + "zh:b1b59c5e5076877eb2d5b7cae8629ab3e030ec7972757d4e8a49a20b17131e06", + "zh:c3cf2f633400c43b0811c9facedbd56f700a637af7d72144a72422c0b635bb2e", + "zh:cfd13d1312127a9326c63126eb637a28dae3249dd67a5bbc52e336fb3e08b259", + "zh:dc49d6b634cdfbf6ae796b19b9c781599ab0bc941e2c229a452c76fbc9eee3cc", + "zh:e2d1bb7c0f66021039724640897bc7b12eb40eff37e0b94015abb6c41e612219", + "zh:ff1c838fb5a695191ff1682db31f7c68b2f7ebeb8d512bf1f0865949728a0b3d", + ] +} diff --git a/terraform/main.tf b/tofu/main.tf similarity index 100% rename from terraform/main.tf rename to tofu/main.tf diff --git a/terraform/modules/zone/main.tf b/tofu/modules/zone/main.tf similarity index 100% rename from terraform/modules/zone/main.tf rename to tofu/modules/zone/main.tf diff --git a/terraform/modules/zone/outputs.tf b/tofu/modules/zone/outputs.tf similarity index 100% rename from terraform/modules/zone/outputs.tf rename to tofu/modules/zone/outputs.tf diff --git a/terraform/modules/zone/variables.tf b/tofu/modules/zone/variables.tf similarity index 100% rename from terraform/modules/zone/variables.tf rename to tofu/modules/zone/variables.tf diff --git a/terraform/variables.tf b/tofu/variables.tf similarity index 100% rename from terraform/variables.tf rename to tofu/variables.tf diff --git a/terraform/zones.tf b/tofu/zones.tf similarity index 100% rename from terraform/zones.tf rename to tofu/zones.tf