Skip to content

Conversation

@raviharshicorp
Copy link

Background

Please include a one or two sentence description of what you're changing and why.

Relates OR Closes #0000

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration

  • Terraform Version:
  • Any additional relevant variables:

This PR makes me feel

optional gif describing your feelings about this pr

@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.

The main terraform-aws-terraform-enterprise module expects database modules
to provide standardized output names (endpoint, name, password, username, parameters)
but postgres-passwordless module was using different names (postgres_db_endpoint, etc).

This caused 'Missing map element' errors when trying to access local.database
properties in the runtime container engine config.

- Add standardized outputs: endpoint, name, password, username, parameters
- Keep legacy outputs for backward compatibility
- All outputs now match the interface expected by main module locals
- Add database_passwordless_aws_use_iam and database_passwordless_aws_region variables to runtime_container_engine_config module
- Configure DATABASE_AUTH_USE_AWS_IAM and DATABASE_AUTH_AWS_DB_REGION environment variables in database config
- Update main.tf to use local terraform-random-tfe-utility modules and pass AWS IAM auth parameters
- Enable AWS IAM database authentication when postgres_enable_iam_auth=true and postgres_use_password_auth=false
- Correct corrupted line in data.aws_kms_key resource
- Update settings module source to use local version
- Remove postgres_passwordless module that used EC2+Docker (incompatible with AWS IAM auth)
- Use standard database module with RDS for all scenarios including passwordless auth
- Add iam_database_authentication_enabled parameter to RDS instance
- Update database selection logic to use RDS for IAM authentication
- Fix 502 Bad Gateway error when TFE tries to connect with AWS IAM credentials

AWS IAM database authentication only works with RDS/Aurora, not EC2-based PostgreSQL containers.
@raviharshicorp
Copy link
Author

closing this as create a new PR: #379

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.

1 participant