diff --git a/.github/workflows/terraform-release.yaml b/.github/workflows/terraform-release.yaml
index 04b96db..3f67574 100644
--- a/.github/workflows/terraform-release.yaml
+++ b/.github/workflows/terraform-release.yaml
@@ -1,4 +1,4 @@
-name: Terraform CI/CD
+name: Terraform Module Release
on:
workflow_dispatch:
pull_request:
@@ -6,8 +6,8 @@ on:
branches:
- main
jobs:
- terraform-ci-cd:
- runs-on: 229685449397
+ terraform-release:
+ runs-on: "229685449397"
permissions:
contents: write
diff --git a/.github/workflows/terraform-validate.yaml b/.github/workflows/terraform-validate.yaml
index 72829d8..ac349eb 100644
--- a/.github/workflows/terraform-validate.yaml
+++ b/.github/workflows/terraform-validate.yaml
@@ -16,7 +16,7 @@ jobs:
- name: Setup Terraform
uses: CSVD/gh-actions-setup-terraform@v2
with:
- terraform_version: '1.7.3'
+ terraform_version: '1.10.5'
- name: Validate Terraform Configuration
id: validate
diff --git a/README.md b/README.md
index 496ad4c..01fb060 100644
--- a/README.md
+++ b/README.md
@@ -35,14 +35,16 @@ sys 0m2.015s
| [aws](#requirement\_aws) | >= 5.14.0 |
| [helm](#requirement\_helm) | >= 2.11.0 |
| [kubernetes](#requirement\_kubernetes) | >= 2.23.0 |
+| [null](#requirement\_null) | >= 3.2.1 |
## Providers
| Name | Version |
|------|---------|
-| [aws](#provider\_aws) | 5.88.0 |
+| [aws](#provider\_aws) | 5.95.0 |
| [helm](#provider\_helm) | 2.17.0 |
| [kubernetes](#provider\_kubernetes) | 2.36.0 |
+| [null](#provider\_null) | 3.2.3 |
## Modules
@@ -60,6 +62,7 @@ sys 0m2.015s
| [kubernetes_storage_class.ebs_encrypted](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/storage_class) | resource |
| [kubernetes_storage_class.efs_sc](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/storage_class) | resource |
| [kubernetes_storage_class.gp3_encrypted](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/storage_class) | resource |
+| [null_resource.git_version](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
| [aws_ebs_default_kms_key.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ebs_default_kms_key) | data source |
| [aws_kms_key.ebs_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/kms_key) | data source |
diff --git a/requirements.tf b/requirements.tf
index ae62e15..32e5c6f 100644
--- a/requirements.tf
+++ b/requirements.tf
@@ -14,5 +14,9 @@ terraform {
source = "hashicorp/kubernetes"
version = ">= 2.23.0"
}
+ null = {
+ source = "hashicorp/null"
+ version = ">= 3.2.1"
+ }
}
}
diff --git a/version.tf b/version.tf
index 20b62d1..77b8249 100644
--- a/version.tf
+++ b/version.tf
@@ -1,4 +1,16 @@
+resource "null_resource" "git_version" {
+ triggers = {
+ # Force this to run on every apply to get the latest tag value
+ always_run = timestamp()
+ }
+
+ provisioner "local-exec" {
+ command = "git describe --tags --abbrev=0 2>/dev/null || echo 'unknown' > ${path.module}/.git_tag"
+ on_failure = continue
+ }
+}
+
locals {
module_name = "tfmod-eks-configuration"
- module_version = "0.1.1"
+ module_version = fileexists("${path.module}/.git_tag") ? trimspace(file("${path.module}/.git_tag")) : "latest"
}