Skip to content

Commit

Permalink
chore: tags
Browse files Browse the repository at this point in the history
update grafana tagging style
  • Loading branch information
jlangy committed Oct 30, 2024
1 parent 29dadcb commit 7385a2c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
LOKI_AUTH_TOKEN=${{ secrets.LOKI_AUTH_TOKEN_DEV }}
LOKI_BUCKET_NAME=${{ vars.LOKI_BUCKET_NAME_DEV }}
S3_BACKEND_NAME=${{vars.S3_BACKEND_NAME_DEV}}
LOKI_TAG=dev
EOF
Expand All @@ -60,6 +61,7 @@ jobs:
LOKI_AUTH_TOKEN=${{ secrets.LOKI_AUTH_TOKEN_PROD }}
LOKI_BUCKET_NAME=${{ vars.LOKI_BUCKET_NAME_PROD }}
S3_BACKEND_NAME=${{vars.S3_BACKEND_NAME_PROD}}
LOKI_TAG=prod
EOF
Expand All @@ -84,9 +86,9 @@ jobs:
terraform init -backend-config=backend.hcl
- name: Terraform Plan
run: terraform plan -var "auth_secret=${{env.LOKI_AUTH_TOKEN}}" -var "bucket_name=${{ env.LOKI_BUCKET_NAME }}" -no-color
run: terraform plan -var "auth_secret=${{env.LOKI_AUTH_TOKEN}}" -var "bucket_name=${{ env.LOKI_BUCKET_NAME }}" -var "loki_tag=${{env.LOKI_TAG}}" -no-color
working-directory: ./terraform-ecs

- name: Terraform Apply
run: terraform apply -var "auth_secret=${{env.LOKI_AUTH_TOKEN}}" -var "bucket_name=${{ env.LOKI_BUCKET_NAME }}" -auto-approve
run: terraform apply -var "auth_secret=${{env.LOKI_AUTH_TOKEN}}" -var "bucket_name=${{ env.LOKI_BUCKET_NAME }}" -var "loki_tag=${{env.LOKI_TAG}}" -auto-approve
working-directory: ./terraform-ecs
4 changes: 2 additions & 2 deletions terraform-ecs/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ resource "aws_ecs_task_definition" "loki_write" {

container_definitions = jsonencode([{
name = "loki-write"
image = "ghcr.io/bcgov/sso-grafana:ssoteam-2010"
image = "ghcr.io/bcgov/sso-grafana:${var.loki_tag}"
essential = true
memory = var.loki_write_memory
cpu = var.loki_write_cpu
Expand Down Expand Up @@ -113,7 +113,7 @@ resource "aws_ecs_task_definition" "loki_read" {

container_definitions = jsonencode([{
name = "loki-read"
image = "ghcr.io/bcgov/sso-grafana:ssoteam-2010"
image = "ghcr.io/bcgov/sso-grafana:${var.loki_tag}"
essential = true
memory = var.loki_read_memory
cpu = var.loki_read_cpu
Expand Down
5 changes: 5 additions & 0 deletions terraform-ecs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,8 @@ variable "loki_write_memory" {
variable "bucket_name" {
type = string
}

variable "loki_tag" {
type = string
default = "dev"
}

0 comments on commit 7385a2c

Please sign in to comment.