From ac30d725c768f6a864bc71d704f6b60f44d23b69 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Wed, 26 Feb 2025 17:41:21 -0500 Subject: [PATCH 01/13] revert replicas change --- main.tf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 745a29c..5ec3b77 100644 --- a/main.tf +++ b/main.tf @@ -54,7 +54,11 @@ resource "helm_release" "tempo" { set { name = "replicas" - value = "1" + value = "3" + } + set { + name = "replicas" + value = "2" } set { name = "tempo.repository" From 3a294869b9d761b86c4391cdbf6aa3bf8b1b36da Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Fri, 28 Feb 2025 18:21:59 -0500 Subject: [PATCH 02/13] autoscaling --- main.tf | 4 ---- tempo_values.yaml | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/main.tf b/main.tf index 5ec3b77..f25d872 100644 --- a/main.tf +++ b/main.tf @@ -52,10 +52,6 @@ resource "helm_release" "tempo" { wait = true timeout = 300 - set { - name = "replicas" - value = "3" - } set { name = "replicas" value = "2" diff --git a/tempo_values.yaml b/tempo_values.yaml index 24a6bbd..70ebf27 100644 --- a/tempo_values.yaml +++ b/tempo_values.yaml @@ -27,8 +27,8 @@ ingester: enabled: true resources: requests: - cpu: "1m" - memory: "1Mi" + cpu: "100m" + memory: "128Mi" limits: cpu: "200m" memory: "256Mi" @@ -37,8 +37,8 @@ distributor: enabled: true resources: requests: - cpu: "1m" - memory: "1Mi" + cpu: "100m" + memory: "128Mi" limits: cpu: "200m" memory: "256Mi" @@ -47,8 +47,8 @@ compactor: enabled: true resources: requests: - cpu: "1m" - memory: "1Mi" + cpu: "100m" + memory: "128Mi" limits: cpu: "200m" memory: "256Mi" @@ -57,8 +57,8 @@ querier: enabled: true resources: requests: - cpu: "1m" - memory: "1Mi" + cpu: "100m" + memory: "128Mi" limits: cpu: "200m" memory: "256Mi" @@ -67,8 +67,8 @@ gateway: enabled: true resources: requests: - cpu: "1m" - memory: "1Mi" + cpu: "100m" + memory: "128Mi" limits: cpu: "200m" memory: "256Mi" From 574faa78fd3cc0074b1cbca7e030e6a010348ef3 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Mon, 3 Mar 2025 20:05:27 -0500 Subject: [PATCH 03/13] try tempo-distributed --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index f25d872..3fe160c 100644 --- a/main.tf +++ b/main.tf @@ -42,7 +42,7 @@ module "tempo-irsa-role" { # Helm Chart for Tempo ################################################################################ resource "helm_release" "tempo" { - chart = "tempo" + chart = "tempo-distributed" version = var.tempo_chart_version name = "tempo" namespace = var.namespace From 4a60944d893e2c405840b00765bfaecccf7a09e6 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Mon, 3 Mar 2025 20:10:20 -0500 Subject: [PATCH 04/13] would require config update --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 3fe160c..f25d872 100644 --- a/main.tf +++ b/main.tf @@ -42,7 +42,7 @@ module "tempo-irsa-role" { # Helm Chart for Tempo ################################################################################ resource "helm_release" "tempo" { - chart = "tempo-distributed" + chart = "tempo" version = var.tempo_chart_version name = "tempo" namespace = var.namespace From e06a542c432a257923fe5b7c9018528791190ad9 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Thu, 6 Mar 2025 19:53:53 -0500 Subject: [PATCH 05/13] update values --- main.tf | 2 +- tempo_values.yaml | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/main.tf b/main.tf index f25d872..745a29c 100644 --- a/main.tf +++ b/main.tf @@ -54,7 +54,7 @@ resource "helm_release" "tempo" { set { name = "replicas" - value = "2" + value = "1" } set { name = "tempo.repository" diff --git a/tempo_values.yaml b/tempo_values.yaml index 70ebf27..24a6bbd 100644 --- a/tempo_values.yaml +++ b/tempo_values.yaml @@ -27,8 +27,8 @@ ingester: enabled: true resources: requests: - cpu: "100m" - memory: "128Mi" + cpu: "1m" + memory: "1Mi" limits: cpu: "200m" memory: "256Mi" @@ -37,8 +37,8 @@ distributor: enabled: true resources: requests: - cpu: "100m" - memory: "128Mi" + cpu: "1m" + memory: "1Mi" limits: cpu: "200m" memory: "256Mi" @@ -47,8 +47,8 @@ compactor: enabled: true resources: requests: - cpu: "100m" - memory: "128Mi" + cpu: "1m" + memory: "1Mi" limits: cpu: "200m" memory: "256Mi" @@ -57,8 +57,8 @@ querier: enabled: true resources: requests: - cpu: "100m" - memory: "128Mi" + cpu: "1m" + memory: "1Mi" limits: cpu: "200m" memory: "256Mi" @@ -67,8 +67,8 @@ gateway: enabled: true resources: requests: - cpu: "100m" - memory: "128Mi" + cpu: "1m" + memory: "1Mi" limits: cpu: "200m" memory: "256Mi" From 5ed26ce805df5aed28b0388728db9f96c4d7e079 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Thu, 13 Mar 2025 21:08:28 -0400 Subject: [PATCH 06/13] set limits to recommended and requests a bit higher --- tempo_values.yaml | 59 +++++++---------------------------------------- 1 file changed, 8 insertions(+), 51 deletions(-) diff --git a/tempo_values.yaml b/tempo_values.yaml index 24a6bbd..5b2e47b 100644 --- a/tempo_values.yaml +++ b/tempo_values.yaml @@ -1,4 +1,11 @@ tempo: + resources: + requests: + cpu: 100m + memory: 512Mi + limits: + cpu: 2000m + memory: 6Gi storage: trace: backend: s3 @@ -18,62 +25,12 @@ serviceAccount: persistence: enabled: true + enableStatefulSetAutoDeletePVC: false accessModes: - ReadWriteOnce size: 10Gi -ingester: - autoscaling: - enabled: true - resources: - requests: - cpu: "1m" - memory: "1Mi" - limits: - cpu: "200m" - memory: "256Mi" -distributor: - autoscaling: - enabled: true - resources: - requests: - cpu: "1m" - memory: "1Mi" - limits: - cpu: "200m" - memory: "256Mi" -compactor: - autoscaling: - enabled: true - resources: - requests: - cpu: "1m" - memory: "1Mi" - limits: - cpu: "200m" - memory: "256Mi" -querier: - autoscaling: - enabled: true - resources: - requests: - cpu: "1m" - memory: "1Mi" - limits: - cpu: "200m" - memory: "256Mi" -gateway: - autoscaling: - enabled: true - resources: - requests: - cpu: "1m" - memory: "1Mi" - limits: - cpu: "200m" - memory: "256Mi" traces: jaeger: zipkin: - # -- Enable Tempo to ingest Zipkin traces enabled: true From 06eee652a4db89affe25403fa228e754dec985ca Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Fri, 21 Mar 2025 22:01:20 -0400 Subject: [PATCH 07/13] update s3 naming --- README.md | 5 ++++- s3.tf | 30 +++++++++++++++++++++++++----- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e587c7f..4f94173 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Developer NOTE: We should automate this configuration. |------|---------| | [aws](#provider\_aws) | >= 5.14.0 | | [helm](#provider\_helm) | >= 2.11.0 | +| [terraform](#provider\_terraform) | n/a | ## Modules @@ -39,13 +40,15 @@ Developer NOTE: We should automate this configuration. |------|--------|---------| | [images](#module\_images) | git@github.e.it.census.gov:terraform-modules/aws-ecr-copy-images.git/ | tf-upgrade | | [tempo-irsa-role](#module\_tempo-irsa-role) | git@github.e.it.census.gov:SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git/ | base | -| [tempo-s3](#module\_tempo-s3) | git@github.e.it.census.gov:terraform-modules/aws-s3.git//standard | tf-upgrade | +| [tempo\_s3](#module\_tempo\_s3) | git@github.e.it.census.gov:terraform-modules/aws-s3.git//standard | tf-upgrade | ## Resources | Name | Type | |------|------| | [helm_release.tempo](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | +| [terraform_data.bucket_name_validator](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/resources/data) | resource | +| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source | | [aws_s3_bucket.s3_server_access_logs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/s3_bucket) | data source | ## Inputs diff --git a/s3.tf b/s3.tf index 498fa70..b1ded19 100644 --- a/s3.tf +++ b/s3.tf @@ -1,14 +1,34 @@ -## create bucket +data "aws_caller_identity" "current" {} + +locals { + account_id = data.aws_caller_identity.current.account_id + bucket_name = format("%v%v-tempo-%v-%v", local.prefixes["eks-s3"], var.cluster_name, local.account_id, local.region_short) + region_short = join("", [for c in split("-", var.region) : substr(c, 0, 1)]) +} data "aws_s3_bucket" "s3_server_access_logs" { bucket = format("inf-logs-%v-%v", local.account_id, var.region) } -module "tempo-s3" { - source = "git@github.e.it.census.gov:terraform-modules/aws-s3.git//standard?ref=tf-upgrade" +# Validate S3 bucket name length +resource "terraform_data" "bucket_name_validator" { + input = local.bucket_name + + lifecycle { + precondition { + condition = length(local.bucket_name) >= 3 && length(local.bucket_name) <= 63 + error_message = "S3 bucket name must be between 3 and 63 characters. Current name '${local.bucket_name}' is ${length(local.bucket_name)} characters." + } + } +} + +module "tempo_s3" { + depends_on = [terraform_data.bucket_name_validator] + source = "git@github.e.it.census.gov:terraform-modules/aws-s3.git//standard?ref=tf-upgrade" - bucket_name = format("%v-tempo", var.cluster_name) + bucket_name = local.bucket_name access_log_bucket = data.aws_s3_bucket.s3_server_access_logs.id + force_destroy = true - tags = local.tags + tags = var.tags } From 8e681619d22b41412637dffafb93e6d705275db4 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Fri, 21 Mar 2025 22:03:48 -0400 Subject: [PATCH 08/13] update irsa role name --- main.tf | 2 +- prefixes.tf | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 prefixes.tf diff --git a/main.tf b/main.tf index 745a29c..22b74f5 100644 --- a/main.tf +++ b/main.tf @@ -17,7 +17,7 @@ locals { module "tempo-irsa-role" { source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git/?ref=base" - role_name = "${var.cluster_name}-tempo" + role_name = format("%v%v-%v", local.prefixes["eks-role"], var.cluster_name, "tempo") attach_s3_bucket_owner_policy = true attach_encrypted_object_manager_policy = true diff --git a/prefixes.tf b/prefixes.tf new file mode 100644 index 0000000..e9a6127 --- /dev/null +++ b/prefixes.tf @@ -0,0 +1,35 @@ +locals { + prefixes = { + "efs" = "v-efs-" + "s3" = "v-s3-" + "ebs" = "v-ebs-" + "kms" = "k-kms-" + "role" = "r-" + "policy" = "p-" + "group" = "g-" + "security-group" = "" # "sg-" + # VPC + "vpc" = "" + "dhcp-options" = "" + "vpc-peer" = "vpcp-" + "route-table" = "route-" + "subnet" = "" + "vpc-endpoint" = "vpce-" + "elastic-ip" = "eip-" + "nat-gateway" = "nat-" + "internet-gateway" = "igw-" + "network-acl" = "nacl-" + "customer-gateway" = "cgw-" + "vpn-gateway" = "vpcg-" + "vpn-connection" = "vpn_" + "log-group" = "lg-" + "log-stream" = "lgs-" + # EKS + "eks" = "eks-" + "eks-s3" = "v-s3-eks-" + "eks-user" = "s-eks-" + "eks-role" = "r-eks-" + "eks-policy" = "p-eks-" + "eks-security-group" = "eks-sg-" # "sg-eks-" + } +} From cc909eec4bc403e87acaafb3e2cd13ddf7523ee5 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Mon, 24 Mar 2025 12:50:58 -0400 Subject: [PATCH 09/13] fix dupe data item --- aws_data.tf | 1 + s3.tf | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 aws_data.tf diff --git a/aws_data.tf b/aws_data.tf new file mode 100644 index 0000000..8fc4b38 --- /dev/null +++ b/aws_data.tf @@ -0,0 +1 @@ +data "aws_caller_identity" "current" {} diff --git a/s3.tf b/s3.tf index b1ded19..376e021 100644 --- a/s3.tf +++ b/s3.tf @@ -1,5 +1,3 @@ -data "aws_caller_identity" "current" {} - locals { account_id = data.aws_caller_identity.current.account_id bucket_name = format("%v%v-tempo-%v-%v", local.prefixes["eks-s3"], var.cluster_name, local.account_id, local.region_short) From 68f7cc3a3370bc07ab713e2e6f56728e50e19285 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Mon, 24 Mar 2025 12:55:11 -0400 Subject: [PATCH 10/13] fix dupe --- README.md | 1 - main.tf | 5 ++--- variables.tf | 5 ----- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4f94173..e717ee1 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,6 @@ Developer NOTE: We should automate this configuration. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [account\_id](#input\_account\_id) | The account\_id holding these resources (for the s3 bucket.) | `string` | n/a | yes | | [cluster\_name](#input\_cluster\_name) | EKS cluster name name component used through out the EKS cluster describing its purpose (ex: dice-dev) | `string` | n/a | yes | | [namespace](#input\_namespace) | The namespace into which tempo will be deployed | `string` | `"tempo"` | no | | [oidc\_provider\_arn](#input\_oidc\_provider\_arn) | The ARN in the EKS cluster for the OpenID Connect identity provider. | `string` | n/a | yes | diff --git a/main.tf b/main.tf index 22b74f5..7b5e7de 100644 --- a/main.tf +++ b/main.tf @@ -1,7 +1,6 @@ locals { - oidc_arn = var.oidc_provider_arn - tags = var.tags - account_id = var.account_id + oidc_arn = var.oidc_provider_arn + tags = var.tags tempo_internal_hostname = format("tempo.%v.svc.cluster.local", var.namespace) tempo_internal_port_number = 3100 diff --git a/variables.tf b/variables.tf index e824a9d..ce7152f 100644 --- a/variables.tf +++ b/variables.tf @@ -9,11 +9,6 @@ variable "region" { type = string } -variable "account_id" { - description = "The account_id holding these resources (for the s3 bucket.)" - type = string -} - variable "cluster_name" { description = "EKS cluster name name component used through out the EKS cluster describing its purpose (ex: dice-dev)" type = string From a7f6b31d0cd0a97b004b293b3b4bbd4f007a76ad Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Mon, 24 Mar 2025 12:57:37 -0400 Subject: [PATCH 11/13] fix refs to tempo_s3 --- main.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.tf b/main.tf index 7b5e7de..7a6de40 100644 --- a/main.tf +++ b/main.tf @@ -21,11 +21,11 @@ module "tempo-irsa-role" { attach_encrypted_object_manager_policy = true s3_bucket_arns = [ - module.tempo-s3.s3_bucket_arn, - "${module.tempo-s3.s3_bucket_arn}/*", + module.tempo_s3.s3_bucket_arn, + "${module.tempo_s3.s3_bucket_arn}/*", ] kms_key_arns = [ - module.tempo-s3.kms_key_arn + module.tempo_s3.kms_key_arn ] oidc_providers = { @@ -68,7 +68,7 @@ resource "helm_release" "tempo" { } set { name = "tempo.storage.trace.s3.bucket" - value = module.tempo-s3.s3_bucket_id + value = module.tempo_s3.s3_bucket_id } set { name = "tempo.storage.trace.s3.endpoint" From d8f1b4371011ebc39435705c5e1081d822a9f2d1 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Tue, 1 Apr 2025 11:54:47 -0400 Subject: [PATCH 12/13] add module release process --- .github/workflows/terraform-release.yaml | 73 ++++++++++++++++ .github/workflows/terraform-validate.yaml | 42 +++++++++ .github/workflows/terragrunt-cicd.yml | 101 ---------------------- 3 files changed, 115 insertions(+), 101 deletions(-) create mode 100644 .github/workflows/terraform-release.yaml create mode 100644 .github/workflows/terraform-validate.yaml delete mode 100644 .github/workflows/terragrunt-cicd.yml diff --git a/.github/workflows/terraform-release.yaml b/.github/workflows/terraform-release.yaml new file mode 100644 index 0000000..90910bc --- /dev/null +++ b/.github/workflows/terraform-release.yaml @@ -0,0 +1,73 @@ +name: Terraform CI/CD +on: + workflow_dispatch: + pull_request: + types: [closed] + branches: + - main +jobs: + terraform-ci-cd: + runs-on: 229685449397 + permissions: + contents: write + + steps: + - name: Checkout code + uses: CSVD/gh-actions-checkout@v4 + + - name: Setup Terraform + uses: CSVD/gh-actions-setup-terraform@v3 + with: + terraform_version: "1.9.1" + + - name: Setup GITHUB Credentials + id: github_credentials + uses: CSVD/gh-auth@main + with: + github_app_pem_file: ${{ secrets.GH_APP_PEM_FILE }} + github_app_installation_id: ${{ vars.GH_APP_INSTALLATION_ID }} + github_app_id: ${{ vars.GH_APP_ID }} + + + - name: Debug Authentication + run: | + # Print the GitHub server URL + echo "GitHub Server URL: ${{ github.server_url }}" + + # Extract the host from the URL + HOST="${{ github.server_url }}" + HOST="${HOST#*//}" + HOST="${HOST%%/*}" + echo "GitHub Host: $HOST" + + # Check if token exists + if [[ -n "${{ steps.github_credentials.outputs.github_token }}" ]]; then + echo "Token generated successfully" + # Test the token with a simple GitHub API call (without exposing the token) + STATUS=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer ${{ steps.github_credentials.outputs.github_token }}" "${{ github.server_url }}/api/v3/user") + echo "API Test Status Code: $STATUS" + else + echo "No token was generated!" + fi + + - name: Setup GitHub CLI + run: | + # Force manual authentication since setup-git might not work with GitHub Enterprise + echo "${{ steps.github_credentials.outputs.github_token }}" > /tmp/token.txt + gh auth login --with-token --hostname "github.e.it.census.gov" < /tmp/token.txt + rm /tmp/token.txt + + # Test GitHub CLI auth status + gh auth status || echo "GitHub CLI authentication failed" + + - name: AWS Auth + id: aws_auth + uses: CSVD/aws-auth@main + with: + ecs: true + + - name: Run Terraform Module Release Action + uses: CSVD/terraform-module-release@main + with: + github-token: ${{ steps.github_credentials.outputs.github_token }} + working-directory: '.' diff --git a/.github/workflows/terraform-validate.yaml b/.github/workflows/terraform-validate.yaml new file mode 100644 index 0000000..72829d8 --- /dev/null +++ b/.github/workflows/terraform-validate.yaml @@ -0,0 +1,42 @@ +name: Terraform Validate +on: + pull_request: + workflow_dispatch: + +jobs: + + terraform-validate: + runs-on: "229685449397" + permissions: + contents: write + steps: + - name: Checkout code + uses: CSVD/gh-actions-checkout@v4 + + - name: Setup Terraform + uses: CSVD/gh-actions-setup-terraform@v2 + with: + terraform_version: '1.7.3' + + - name: Validate Terraform Configuration + id: validate + uses: CSVD/terraform-validate@main + + - name: Check Validation/Test Results + if: always() + run: | + # Set default values if outputs are empty + IS_VALID="${{ steps.validate.outputs.is_valid }}" + TESTS_PASSED="${{ steps.validate.outputs.tests_passed }}" + + # If outputs are empty, set them to false + [ -z "$IS_VALID" ] && IS_VALID="false" + [ -z "$TESTS_PASSED" ] && TESTS_PASSED="false" + + if [[ "$IS_VALID" != "true" || "$TESTS_PASSED" != "true" ]]; then + echo "Validation or test errors found:" + echo "${{ steps.validate.outputs.stderr }}" + exit 1 + else + echo "All validations and tests passed successfully!" + fi diff --git a/.github/workflows/terragrunt-cicd.yml b/.github/workflows/terragrunt-cicd.yml deleted file mode 100644 index a78523e..0000000 --- a/.github/workflows/terragrunt-cicd.yml +++ /dev/null @@ -1,101 +0,0 @@ -name: 'Terraform Module CI' - -on: - push: - branches: - - main - paths: - - '**/*.hcl' - - '**/*.tf' - pull_request: - branches: - - main - paths: - - '**/*.hcl' - - '**/*.tf' - -permissions: - contents: read - pull-requests: write - -jobs: - validate: - name: 'Validate Module' - runs-on: self-hosted - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Terraform - uses: hashicorp/setup-terraform@v2 - with: - terraform_version: 1.5.0 - - - name: Terraform Init - run: | - terraform init -backend=false - - - name: Terraform Format - run: | - terraform fmt -check - - - name: Terraform Validate - run: | - terraform validate - - - name: Run tflint - uses: terraform-linters/setup-tflint@v3 - if: github.event_name == 'pull_request' - - - name: Lint Terraform - if: github.event_name == 'pull_request' - run: | - tflint --format compact - - release: - name: 'Create Release' - needs: validate - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - runs-on: self-hosted - permissions: - contents: write - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - - name: Install Commitizen - run: | - pip install commitizen - - - name: Configure Git - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - - - name: Bump Version and Generate Changelog - id: cz - run: | - cz bump --yes - echo "new_version=$(cz version --project)" >> $GITHUB_OUTPUT - echo "changelog=$(cz changelog --dry-run)" >> $GITHUB_OUTPUT - - - name: Create Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: v${{ steps.cz.outputs.new_version }} - release_name: Release v${{ steps.cz.outputs.new_version }} - draft: false - prerelease: false - body: ${{ steps.cz.outputs.changelog }} From 82172da523771e1de4e3e4178e71eac6c3cb64a0 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Tue, 1 Apr 2025 20:49:18 -0400 Subject: [PATCH 13/13] update module source --- .pre-commit-config.yaml | 4 ++-- README.md | 6 +++--- copy_images.tf | 2 +- main.tf | 2 +- s3.tf | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ef52d70..8244dbb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: # Terraform Hooks - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.97.3 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases + rev: v1.98.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases hooks: - id: terraform_fmt args: @@ -94,6 +94,6 @@ repos: # - --hook-config=--parallelism-ci-cpu-cores=2 - repo: https://github.com/ljnsn/cz-conventional-gitmoji - rev: v0.6.1 + rev: v0.7.0 hooks: - id: conventional-gitmoji diff --git a/README.md b/README.md index e717ee1..824072e 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,9 @@ Developer NOTE: We should automate this configuration. | Name | Source | Version | |------|--------|---------| -| [images](#module\_images) | git@github.e.it.census.gov:terraform-modules/aws-ecr-copy-images.git/ | tf-upgrade | -| [tempo-irsa-role](#module\_tempo-irsa-role) | git@github.e.it.census.gov:SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git/ | base | -| [tempo\_s3](#module\_tempo\_s3) | git@github.e.it.census.gov:terraform-modules/aws-s3.git//standard | tf-upgrade | +| [images](#module\_images) | git::https://github.e.it.census.gov/terraform-modules/aws-ecr-copy-images.git/ | tf-upgrade | +| [tempo-irsa-role](#module\_tempo-irsa-role) | git::https://github.e.it.census.gov/SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git/ | base | +| [tempo\_s3](#module\_tempo\_s3) | git::https://github.e.it.census.gov/terraform-modules/aws-s3.git//standard | tf-upgrade | ## Resources diff --git a/copy_images.tf b/copy_images.tf index 7d14060..fbb90ef 100644 --- a/copy_images.tf +++ b/copy_images.tf @@ -15,7 +15,7 @@ locals { } module "images" { - source = "git@github.e.it.census.gov:terraform-modules/aws-ecr-copy-images.git/?ref=tf-upgrade" + source = "git::https://github.e.it.census.gov/terraform-modules/aws-ecr-copy-images.git/?ref=tf-upgrade" profile = var.profile application_name = var.cluster_name diff --git a/main.tf b/main.tf index 7a6de40..4515b8f 100644 --- a/main.tf +++ b/main.tf @@ -14,7 +14,7 @@ locals { # IRSA Role for Tempo ################################################################################ module "tempo-irsa-role" { - source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git/?ref=base" + source = "git::https://github.e.it.census.gov/SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git/?ref=base" role_name = format("%v%v-%v", local.prefixes["eks-role"], var.cluster_name, "tempo") attach_s3_bucket_owner_policy = true diff --git a/s3.tf b/s3.tf index 376e021..4a70192 100644 --- a/s3.tf +++ b/s3.tf @@ -22,7 +22,7 @@ resource "terraform_data" "bucket_name_validator" { module "tempo_s3" { depends_on = [terraform_data.bucket_name_validator] - source = "git@github.e.it.census.gov:terraform-modules/aws-s3.git//standard?ref=tf-upgrade" + source = "git::https://github.e.it.census.gov/terraform-modules/aws-s3.git//standard?ref=tf-upgrade" bucket_name = local.bucket_name access_log_bucket = data.aws_s3_bucket.s3_server_access_logs.id