Skip to content

Commit

Permalink
sources and helm syntax (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jun 25, 2025
1 parent 380d151 commit 2c29079
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 48 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ Developer NOTE: We should automate this configuration.

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.14.0 |
| <a name="provider_aws.eecr"></a> [aws.eecr](#provider\_aws.eecr) | >= 5.14.0 |
| <a name="provider_helm"></a> [helm](#provider\_helm) | >= 2.11.0 |
| <a name="provider_null"></a> [null](#provider\_null) | >= 3.2.1 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | 6.0.0 |
| <a name="provider_aws.eecr"></a> [aws.eecr](#provider\_aws.eecr) | 6.0.0 |
| <a name="provider_helm"></a> [helm](#provider\_helm) | 3.0.2 |
| <a name="provider_null"></a> [null](#provider\_null) | 3.2.4 |
| <a name="provider_terraform"></a> [terraform](#provider\_terraform) | n/a |

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_images"></a> [images](#module\_images) | git::https://github.e.it.census.gov/terraform-modules/aws-ecr-copy-images.git/ | tf-upgrade |
| <a name="module_tempo-irsa-role"></a> [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 |
| <a name="module_images"></a> [images](#module\_images) | git::https://github.e.it.census.gov/terraform-modules/aws-ecr-copy-images.git | tf-upgrade |
| <a name="module_tempo-irsa-role"></a> [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 | main |
| <a name="module_tempo_s3"></a> [tempo\_s3](#module\_tempo\_s3) | git::https://github.e.it.census.gov/terraform-modules/aws-s3.git//standard | tf-upgrade |

## Resources
Expand Down Expand Up @@ -79,6 +79,7 @@ Developer NOTE: We should automate this configuration.

| Name | Description |
|------|-------------|
| <a name="output_image_config"></a> [image\_config](#output\_image\_config) | Map of image references to their full source paths |
| <a name="output_module_name"></a> [module\_name](#output\_module\_name) | The name of this module. |
| <a name="output_module_version"></a> [module\_version](#output\_module\_version) | The version of this module. |
| <a name="output_tempo_internal_endpoint"></a> [tempo\_internal\_endpoint](#output\_tempo\_internal\_endpoint) | internal endpoint for tempo |
Expand Down
7 changes: 6 additions & 1 deletion copy_images.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ locals {
}

module "images" {
source = "git::https://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
Expand Down Expand Up @@ -49,3 +49,8 @@ provider "aws" {
profile = var.eecr_info.profile
region = var.eecr_info.region
}

output "image_config" {
description = "Map of image references to their full source paths"
value = local.image_config
}
84 changes: 43 additions & 41 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ locals {
# IRSA Role for Tempo
################################################################################
module "tempo-irsa-role" {
source = "git::https://github.e.it.census.gov/SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git/?ref=base"
# tflint-ignore: terraform_module_pinned_source
source = "git::https://github.e.it.census.gov/SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git?ref=main"

role_name = format("%v%v-%v", local.prefixes["eks-role"], var.cluster_name, "tempo")
attach_s3_bucket_owner_policy = true
Expand Down Expand Up @@ -51,44 +52,45 @@ resource "helm_release" "tempo" {
wait = true
timeout = 300

set {
name = "replicas"
value = "1"
}
set {
name = "tempo.repository"
value = format("%v/%v",
module.images.images[local.tempo_key].dest_registry,
module.images.images[local.tempo_key].dest_repository
)
}
set {
name = "tempo.tag"
value = var.tempo_tag
}
set {
name = "tempo.storage.trace.s3.bucket"
value = module.tempo_s3.s3_bucket_id
}
set {
name = "tempo.storage.trace.s3.endpoint"
value = "s3.${var.region}.amazonaws.com"
}
set {
name = "tempo.metricsGenerator.enabled"
value = true
}
set {
name = "tempo.metricsGenerator.remoteWriteUrl"
value = "http://${var.prometheus_svc}.${var.prometheus_namespace}:${var.prometheus_port}/api/v1/write"
}
set {
name = "serviceAccount.annotations.eks\\.amazonaws\\.com/role-arn"
value = module.tempo-irsa-role.iam_role_arn
}
set {
name = "persistence.storageClassName"
value = var.rwo_storage_class
}

set = [
{
name = "replicas"
value = "1"
},
{
name = "tempo.repository"
value = format("%v/%v",
module.images.images[local.tempo_key].dest_registry,
module.images.images[local.tempo_key].dest_repository
)
},
{
name = "tempo.tag"
value = var.tempo_tag
},
{
name = "tempo.storage.trace.s3.bucket"
value = module.tempo_s3.s3_bucket_id
},
{
name = "tempo.storage.trace.s3.endpoint"
value = "s3.${var.region}.amazonaws.com"
},
{
name = "tempo.metricsGenerator.enabled"
value = true
},
{
name = "tempo.metricsGenerator.remoteWriteUrl"
value = "http://${var.prometheus_svc}.${var.prometheus_namespace}:${var.prometheus_port}/api/v1/write"
},
{
name = "serviceAccount.annotations.eks\\.amazonaws\\.com/role-arn"
value = module.tempo-irsa-role.iam_role_arn
},
{
name = "persistence.storageClassName"
value = var.rwo_storage_class
}
]
}

0 comments on commit 2c29079

Please sign in to comment.