Skip to content

Conversation

@raviharshicorp
Copy link

@raviharshicorp raviharshicorp commented Oct 3, 2025

  • Add redis_passwordless_aws_use_iam variable to enable AWS IAM Redis auth
  • Add redis_passwordless_aws_region variable for region specification
  • Configure TFE_REDIS_PASSWORDLESS_AWS_USE_IAM environment variable
  • Configure TFE_REDIS_SIDEKIQ_PASSWORDLESS_AWS_USE_IAM for Sidekiq
  • Configure TFE_REDIS_PASSWORDLESS_AWS_REGION environment variable

These changes enable TFE to use AWS IAM authentication for Redis connections instead of password-based authentication, following the same pattern as Azure MSI Redis authentication.

Background

Part of AWS redis passwordless release test
Relates https://github.com/hashicorp/terraform-enterprise/pull/3149

How has this been tested?

CI/CD: https://github.com/hashicorp/terraform-enterprise/actions/runs/19146818577/job/54726521821

- Add redis_passwordless_aws_use_iam variable to enable AWS IAM Redis auth
- Add redis_passwordless_aws_region variable for region specification
- Configure TFE_REDIS_PASSWORDLESS_AWS_USE_IAM environment variable
- Configure TFE_REDIS_SIDEKIQ_PASSWORDLESS_AWS_USE_IAM for Sidekiq
- Configure TFE_REDIS_PASSWORDLESS_AWS_REGION environment variable

These changes enable TFE to use AWS IAM authentication for Redis connections
instead of password-based authentication, following the same pattern as
Azure MSI Redis authentication.
@hashicorp-cla-app
Copy link

hashicorp-cla-app bot commented Oct 3, 2025

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app
Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

- Add TFE_REDIS_SIDEKIQ_* environment variables for separate Sidekiq Redis
- Add TFE_REDIS_SIDEKIQ_PASSWORDLESS_AWS_* variables for IAM authentication
- Add TFE_REDIS_PASSWORDLESS_AWS_HOST_NAME for cluster name extraction
- Support separate Redis instances for main and Sidekiq with fallback to main Redis
- Add variables: redis_sidekiq_host, redis_sidekiq_user, redis_sidekiq_password
- Enable dual Redis passwordless authentication (main + Sidekiq)
- Add debug output for all Redis environment variables
- Add debug output for input variables received
- Track Redis username propagation to TFE container
- Add redis_passwordless_aws_use_iam variable to variables.tf
- Add TFE_REDIS_PASSWORDLESS_AWS_USE_IAM and TFE_REDIS_SIDEKIQ_PASSWORDLESS_AWS_USE_IAM environment variables to redis_config.tf
- Add debug outputs for Redis environment variables and input variables
- Ensures Redis IAM authentication is properly configured for AWS ElastiCache
…_config

- Fix alignment and indentation in debug_redis_env_vars and debug_redis_input_vars outputs
- Standardize spacing to align equals signs consistently with terraform formatting standards
- Resolves terraform fmt check failure in CI pipeline
}

output "debug_redis_env_vars" {
value = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove this debug outpus

description = "Debug output for Redis environment variables"
}

output "debug_redis_input_vars" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

TFE_REDIS_PASSWORDLESS_AZURE_USE_MSI = var.redis_passwordless_azure_use_msi
TFE_REDIS_SIDEKIQ_PASSWORDLESS_AZURE_USE_MSI = var.redis_passwordless_azure_use_msi
TFE_REDIS_PASSWORDLESS_AZURE_CLIENT_ID = var.redis_passwordless_azure_client_id
TFE_REDIS_PASSWORDLESS_AWS_USE_IAM = var.redis_passwordless_aws_use_iam
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@ajmera-naman ajmera-naman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Configuration seems incorrect

TFE_REDIS_SIDEKIQ_PASSWORDLESS_AZURE_USE_MSI = var.redis_passwordless_azure_use_msi
TFE_REDIS_PASSWORDLESS_AZURE_CLIENT_ID = var.redis_passwordless_azure_client_id
TFE_REDIS_PASSWORDLESS_AWS_USE_IAM = var.redis_passwordless_aws_use_iam
TFE_REDIS_SIDEKIQ_PASSWORDLESS_AWS_USE_IAM = var.redis_passwordless_aws_use_iam
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as @ajmera-naman mentioned above, the problem I feel now is deeper. If the configs are incorrect, the Passwordless auth shouldn't work at all. These are either working with standard auth or we are looking at the incorrect test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants