Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Terraform Enterprise HVD on AWS EC2

Terraform module aligned with HashiCorp Validated Designs (HVD) to deploy Terraform Enterprise (TFE) on Amazon Web Services (AWS) using EC2 instances with a container runtime. This module defaults to deploying TFE in the active-active operational mode, but external is also supported. Docker and Podman are the supported container runtimes.

TFE architecture

Prerequisites

General

  • TFE license file (e.g. terraform.hclic)
  • Terraform CLI >= 1.9 installed on clients/workstations that will be used to deploy TFE
  • General understanding of how to use Terraform (Community Edition)
  • General understanding of how to use AWS
  • git CLI and Visual Studio Code editor installed on workstations are strongly recommended
  • AWS account that TFE will be deployed in with permissions to create these resources via Terraform CLI
  • (Optional) AWS S3 bucket for S3 remote state backend that will be used to manage the Terraform state of this TFE deployment (out-of-band from the TFE application) via Terraform CLI (Community Edition)

Networking

  • AWS VPC ID and the following subnets:
    • Load balancer subnet IDs (can be the same as EC2 subnets if desirable)
    • EC2 (compute) subnet IDs
    • RDS (database) subnet IDs
    • Redis subnet IDs (can be the same as RDS subnets if desirable)
  • (Optional) S3 VPC endpoint configured within VPC
  • (Optional) AWS Route53 hosted zone for TFE DNS record creation
  • Chosen fully qualified domain name (FQDN) for your TFE instance (e.g. tfe.aws.example.com)

📝 Note: It is recommended to specify a minimum of two subnets for each subnet input to enable high availability.

Security groups

TLS certificates

  • TLS certificate (e.g. cert.pem) and private key (e.g. privkey.pem) that matches your chosen fully qualified domain name (FQDN) for TFE
    • TLS certificate and private key must be in PEM format
    • Private key must not be password protected
  • TLS certificate authority (CA) bundle (e.g. ca_bundle.pem) corresponding with the CA that issues your TFE TLS certificates
    • CA bundle must be in PEM format
    • You may include additional certificate chains corresponding to external systems that TFE will make outbound connections to (e.g. your self-hosted VCS, if its certificate was issued by a different CA than your TFE certificate).

📝 Note: All three of these files will be created as secrets in AWS Secrets Manager per the next section.

Secrets management

The following bootstrap secrets stored in AWS Secrets Manager in order to bootstrap the TFE deployment and installation:

  • TFE license file - raw contents of license file stored as a plaintext secret (e.g. cat terraform.hclic)
  • TFE encryption password - random characters stored as a plaintext secret (used to protect internally-managed Vault unseal key and root token)
  • TFE database password - used to create RDS Aurora (PostgreSQL) database cluster; random characters stored as a plaintext secret; value must be between 8 and 128 characters long and must not contain @, ", or / characters
  • TFE Redis password - used to create Redis (Elasticache Replication Group) cluster; random characters stored as a plaintext secret; value must be between 16 and 128 characters long and must not contain @, ", or / characters
  • TFE TLS certificate - file in PEM format, base64-encoded into a string, and stored as a plaintext secret
  • TFE TLS certificate private key - file in PEM format, base64-encoded into a string, and stored as a plaintext secret
  • TFE TLS CA bundle - file in PEM format , base64-encoded into a string, and stored as a plaintext secret

📝 Note: See the TFE bootstrap secrets doc for more details on how these secrets should be stored in AWS Secrets Manager.

Compute

Connecting to shell of EC2 instances

One of the following mechanisms for shell access to TFE EC2 instances:

  • EC2 SSH key pair
  • AWS SSM (can be enabled by setting ec2_allow_ssm boolean input variable to true)

Log forwarding (optional)

One of the following logging destinations:

  • AWS CloudWatch log group
  • AWS S3 bucket
  • A custom fluent bit configuration that will forward logs to custom destination

Usage

  1. Create/configure/validate the applicable prerequisites.

  2. Refer to the ready-made Terraform configuration provided in the main example subdirectory within the examples directory for how to deploy this module. To get started, copy all of the Terraform files from the main example into a new destination directory. This will serve as your root Terraform configuration for managing your TFE deployment. Below is a common directory structure for managing multiple TFE deployments:

    . └── environments ├── production │   ├── backend.tf │   ├── main.tf │   ├── outputs.tf │   ├── terraform.tfvars │   └── variables.tf └── sandbox ├── backend.tf ├── main.tf ├── outputs.tf ├── terraform.tfvars └── variables.tf

    📝 Note: In this example, the user will have two separate TFE deployments; one for their sandbox environment, and one for their production environment. This is recommended, but not required.

  3. (Optional) Uncomment and update the S3 remote state backend configuration provided in the backend.tf file with your own custom values. While this step is highly recommended, it is technically not required to use a remote backend config for your TFE deployment.

  4. Copy the provided terraform.tfvars.example file and rename it to terraform.tfvars. Then, replace or validate all of the variable values enclosed in the < > characters with your own custom values. Inline helper comments are included with some of the variables to help guide you in setting appropriate values. For detailed information about each input variable, as well as additional optional inputs, refer to the variable descriptions or the deployment customizations documentation.

  5. Ensure the module source meta-argument within your main.tf accurately reflects the location from which you are calling this module. We recommend calling the module directly from its Terraform registry location as shown below:

    module "tfe" { source = "hashicorp/terraform-enterprise-hvd/aws" version = "x.x.x" ... }
  6. Navigate to the directory containing your newly created root Terraform configuration for the TFE deployment, and run terraform init, terraform plan, and terraform apply.

  7. After your terraform apply finishes successfully, you can monitor the installation progress by connecting to your TFE EC2 instance shell via SSH or AWS SSM and observing the cloud-init (user_data) logs:

    Connecting to the EC2 instance

    SSH when ec2_os_distro is ubuntu:

    ssh -i /path/to/ec2_ssh_key_pair.pem ubuntu@<ec2-private-ip>

    SSH when ec2_os_distro is rhel or al2023:

    ssh -i /path/to/ec2_ssh_key_pair.pem ec2-user@<ec2-private-ip>

    Viewing the logs

    View the higher-level logs:

    tail -f /var/log/tfe-cloud-init.log

    View the lower-level logs:

    journalctl -xu cloud-final -f

    📝 Note: The -f argument is to follow the logs as they append in real-time, and is optional. You may remove the -f for a static view.

    Successful install log message

    The log files should display the following log message after the cloud-init (user_data) script finishes successfully:

    [INFO] tfe_user_data script finished successfully!
  8. After the cloud-init (user_data) script finishes successfully, while still connected to the TFE EC2 instance shell, you can check the health status of TFE:

    cd /etc/tfe sudo docker compose exec tfe tfe-health-check-status
  9. Follow the steps to create the TFE initial admin user.

Docs

Below are links to various docs related to the customization and management of your TFE deployment:

Module support

This open source software is maintained by the HashiCorp Technical Field Organization, independently of our enterprise products. While our Support Engineering team provides dedicated support for our enterprise offerings, this open source software is not included.

  • For help using this open source software, please engage your account team.
  • To report bugs/issues with this open source software, please open them directly against this code repository using the GitHub issues feature.

Please note that there is no official Service Level Agreement (SLA) for support of this software as a HashiCorp customer. This software falls under the definition of Community Software/Versions in your Agreement. We appreciate your understanding and collaboration in improving our open source projects.

Requirements

NameVersion
terraform>= 1.9
aws~> 5.100

Providers

NameVersion
aws~> 5.100

Resources

NameType
aws_autoscaling_group.tferesource
aws_db_parameter_group.tferesource
aws_db_subnet_group.tferesource
aws_elasticache_replication_group.redis_clusterresource
aws_elasticache_subnet_group.tferesource
aws_iam_instance_profile.tfe_ec2resource
aws_iam_policy.s3_crrresource
aws_iam_policy_attachment.s3_crrresource
aws_iam_role.s3_crrresource
aws_iam_role.tfe_ec2resource
aws_iam_role_policy.tfe_ec2resource
aws_iam_role_policy_attachment.aws_ssmresource
aws_launch_template.tferesource
aws_lb.albresource
aws_lb.nlbresource
aws_lb_listener.alb_443resource
aws_lb_listener.lb_nlb_443resource
aws_lb_target_group.alb_443resource
aws_lb_target_group.nlb_443resource
aws_rds_cluster.tferesource
aws_rds_cluster_instance.tferesource
aws_rds_cluster_parameter_group.tferesource
aws_rds_global_cluster.tferesource
aws_route53_record.alias_recordresource
aws_s3_bucket.tferesource
aws_s3_bucket_public_access_block.tferesource
aws_s3_bucket_replication_configuration.tferesource
aws_s3_bucket_server_side_encryption_configuration.tferesource
aws_s3_bucket_versioning.tferesource
aws_security_group.ec2_allow_egressresource
aws_security_group.ec2_allow_ingressresource
aws_security_group.lb_allow_egressresource
aws_security_group.lb_allow_ingressresource
aws_security_group.rds_allow_ingressresource
aws_security_group.redis_allow_ingressresource
aws_security_group_rule.ec2_allow_cidr_ingress_tfe_metrics_httpresource
aws_security_group_rule.ec2_allow_cidr_ingress_tfe_metrics_httpsresource
aws_security_group_rule.ec2_allow_egress_allresource
aws_security_group_rule.ec2_allow_egress_dns_tcpresource
aws_security_group_rule.ec2_allow_egress_dns_udpresource
aws_security_group_rule.ec2_allow_egress_httpresource
aws_security_group_rule.ec2_allow_egress_httpsresource
aws_security_group_rule.ec2_allow_egress_proxy_httpresource
aws_security_group_rule.ec2_allow_egress_proxy_httpsresource
aws_security_group_rule.ec2_allow_egress_rdsresource
aws_security_group_rule.ec2_allow_egress_redisresource
aws_security_group_rule.ec2_allow_egress_vaultresource
aws_security_group_rule.ec2_allow_ingress_sshresource
aws_security_group_rule.ec2_allow_ingress_tfe_https_from_lbresource
aws_security_group_rule.ec2_allow_ingress_vaultresource
aws_security_group_rule.lb_allow_egress_allresource
aws_security_group_rule.lb_allow_ingress_tfe_https_from_cidrresource
aws_security_group_rule.lb_allow_ingress_tfe_https_from_ec2resource
aws_security_group_rule.rds_allow_ingress_from_ec2resource
aws_security_group_rule.redis_allow_ingress_from_ec2resource
aws_ami.al2023data source
aws_ami.rheldata source
aws_ami.selecteddata source
aws_ami.ubuntudata source
aws_availability_zones.availabledata source
aws_caller_identity.currentdata source
aws_cloudwatch_log_group.log_fwddata source
aws_ecr_repository.tfe_app_container_imagedata source
aws_iam_policy_document.s3_crrdata source
aws_iam_policy_document.s3_crr_assume_roledata source
aws_iam_policy_document.tfe_ec2_allow_cloudwatchdata source
aws_iam_policy_document.tfe_ec2_allow_cost_estimationdata source
aws_iam_policy_document.tfe_ec2_allow_ebs_kms_cmkdata source
aws_iam_policy_document.tfe_ec2_allow_get_redis_password_secretdata source
aws_iam_policy_document.tfe_ec2_allow_rds_kms_cmkdata source
aws_iam_policy_document.tfe_ec2_allow_redis_kms_cmkdata source
aws_iam_policy_document.tfe_ec2_allow_s3data source
aws_iam_policy_document.tfe_ec2_allow_s3_kms_cmkdata source
aws_iam_policy_document.tfe_ec2_allow_s3_log_fwddata source
aws_iam_policy_document.tfe_ec2_allow_tfe_app_image_pull_from_ecrdata source
aws_iam_policy_document.tfe_ec2_assume_roledata source
aws_iam_policy_document.tfe_ec2_combineddata source
aws_iam_policy_document.tfe_ec2_get_enc_password_secretdata source
aws_iam_policy_document.tfe_ec2_get_license_secretdata source
aws_iam_policy_document.tfe_ec2_get_rds_password_secretdata source
aws_iam_policy_document.tfe_ec2_get_tls_ca_bundle_secretdata source
aws_iam_policy_document.tfe_ec2_get_tls_cert_secretdata source
aws_iam_policy_document.tfe_ec2_get_tls_privkey_secretdata source
aws_partition.currentdata source
aws_region.currentdata source
aws_route53_zone.tfedata source
aws_s3_bucket.log_fwddata source
aws_secretsmanager_secret_version.tfe_database_passworddata source
aws_secretsmanager_secret_version.tfe_redis_passworddata source

Inputs

NameDescriptionTypeDefaultRequired
ec2_subnet_idsList of subnet IDs to use for the EC2 instance. Private subnets is the best practice here.list(string)n/ayes
friendly_name_prefixFriendly name prefix used for uniquely naming all AWS resources for this deployment. Most commonly set to either an environment (e.g. 'sandbox', 'prod'), a team name, or a project name.stringn/ayes
lb_subnet_idsList of subnet IDs to use for the load balancer. If lb_is_internal is false, then these should be public subnets. Otherwise, these should be private subnets.list(string)n/ayes
rds_subnet_idsList of subnet IDs to use for RDS database subnet group. Private subnets is the best practice here.list(string)n/ayes
tfe_database_password_secret_arnARN of AWS Secrets Manager secret for the TFE database password used to create RDS Aurora (PostgreSQL) database cluster. Secret type should be plaintext. Value of secret must be from 8 to 128 alphanumeric characters or symbols (excluding @, ", and /).stringn/ayes
tfe_encryption_password_secret_arnARN of AWS Secrets Manager secret for TFE encryption password. Secret type should be plaintext.stringn/ayes
tfe_fqdnFully qualified domain name (FQDN) of TFE instance. This name should resolve to the DNS name or IP address of the TFE load balancer and will be what clients use to access TFE.stringn/ayes
tfe_license_secret_arnARN of AWS Secrets Manager secret for TFE license file. Secret type should be plaintext.stringn/ayes
tfe_tls_ca_bundle_secret_arnARN of AWS Secrets Manager secret for private/custom TLS Certificate Authority (CA) bundle in PEM format. Secret must be stored as a base64-encoded string. Secret type should be plaintext.stringn/ayes
tfe_tls_cert_secret_arnARN of AWS Secrets Manager secret for TFE TLS certificate in PEM format. Secret must be stored as a base64-encoded string. Secret type should be plaintext.stringn/ayes
tfe_tls_privkey_secret_arnARN of AWS Secrets Manager secret for TFE TLS private key in PEM format. Secret must be stored as a base64-encoded string. Secret type should be plaintext.stringn/ayes
vpc_idID of VPC where TFE will be deployed.stringn/ayes
additional_no_proxyComma-separated list of domains, IP addresses, or CIDR ranges that TFE should bypass the proxy when making outbound requests, provided http_proxy or https_proxy are set. This list is in addition to automatically included addresses like RDS, S3, and Redis, which are dynamically added to no_proxy by the user_data script. Do not set if http_proxy and/or https_proxy are not configured.stringnullno
asg_health_check_grace_periodThe amount of time to wait for a new TFE EC2 instance to become healthy. If this threshold is breached, the ASG will terminate the instance and launch a new one.number900no
asg_instance_countDesired number of TFE EC2 instances to run in autoscaling group. Must be 1 when tfe_operational_mode is external.number1no
asg_max_sizeMax number of TFE EC2 instances to run in autoscaling group. Only valid when tfe_operational_mode is active-active. Value is hard-coded to 1 when tfe_operational_mode is external.number3no
cidr_allow_egress_ec2_dnsList of destination CIDR ranges to allow TCP/53 and UDP/53 (DNS) outbound from TFE EC2 instances. Only set if you want to use custom DNS servers instead of the AWS-provided DNS resolver within your VPC.list(string)nullno
cidr_allow_egress_ec2_httpList of destination CIDR ranges to allow TCP/80 outbound from TFE EC2 instances.list(string)
[
"0.0.0.0/0"
]
no
cidr_allow_egress_ec2_httpsList of destination CIDR ranges to allow TCP/443 outbound from TFE EC2 instances. Include the CIDR range of your VCS provider if you are configuring VCS integration with TFE.list(string)
[
"0.0.0.0/0"
]
no
cidr_allow_egress_ec2_proxyList of destination CIDR range(s) where proxy server exists. Required and only valid when http_proxy and/or https_proxy are set.list(string)nullno
cidr_allow_ingress_ec2_sshList of CIDR ranges to allow SSH ingress to TFE EC2 instance (i.e. bastion IP, client/workstation IP, etc.).list(string)nullno
cidr_allow_ingress_tfe_443List of CIDR ranges allowed to access the TFE application over HTTPS (port 443).list(string)
[
"0.0.0.0/0"
]
no
cidr_allow_ingress_tfe_metrics_httpList of CIDR ranges to allow TCP/9090 (HTTP) inbound to metrics endpoint on TFE EC2 instances.list(string)nullno
cidr_allow_ingress_tfe_metrics_httpsList of CIDR ranges to allow TCP/9091 (HTTPS) inbound to metrics endpoint on TFE EC2 instances.list(string)nullno
cloudwatch_log_group_nameName of CloudWatch Log Group to configure as log forwarding destination. Only valid when tfe_log_forwarding_enabled is true.stringnullno
common_tagsMap of common tags for all taggable AWS resources.map(string){}no
container_runtimeContainer runtime to use for TFE. Supported values are docker or podman.string"docker"no
create_route53_tfe_dns_recordBoolean to create Route53 Alias Record for tfe_hostname resolving to Load Balancer DNS name. If true, route53_tfe_hosted_zone_name is also required.boolfalseno
custom_fluent_bit_configCustom Fluent Bit configuration for log forwarding. Only valid when tfe_log_forwarding_enabled is true and log_fwd_destination_type is custom.stringnullno
custom_tfe_startup_script_templateFilename of a custom TFE startup script template to use in place of of the built-in user_data script. The file must exist within a directory named './templates' in your current working directory.stringnullno
docker_versionVersion of Docker to install on TFE EC2 instances. Not applicable to Amazon Linux 2023 distribution (when ec2_os_distro is al2023).string"28.0.1"no
ebs_iopsAmount of IOPS to configure when EBS volume type is gp3. Must be greater than or equal to 3000 and less than or equal to 16000.number3000no
ebs_is_encryptedBoolean to encrypt the EBS root block device of the TFE EC2 instance(s). An AWS managed key will be used when true unless a value is also specified for ebs_kms_key_arn.booltrueno
ebs_kms_key_arnARN of KMS customer managed key (CMK) to encrypt TFE EC2 EBS volumes.stringnullno
ebs_throughputThroughput (MB/s) to configure when EBS volume type is gp3. Must be greater than or equal to 125 and less than or equal to 1000.number250no
ebs_volume_sizeSize (GB) of the root EBS volume for TFE EC2 instances. Must be greater than or equal to 50 and less than or equal to 16000.number50no
ebs_volume_typeEBS volume type for TFE EC2 instances.string"gp3"no
ec2_allow_all_egressBoolean to allow all egress traffic from TFE EC2 instances.boolfalseno
ec2_allow_ssmBoolean to attach the AmazonSSMManagedInstanceCore policy to the TFE instance role, allowing the SSM agent (if present) to function.boolfalseno
ec2_ami_idCustom AMI ID for TFE EC2 launch template. If specified, value of ec2_os_distro must coincide with this custom AMI OS distro.stringnullno
ec2_instance_sizeEC2 instance type for TFE EC2 launch template.string"m7i.xlarge"no
ec2_os_distroLinux OS distribution type for TFE EC2 instance. Choose from al2023, ubuntu, rhel, centos.string"ubuntu"no
ec2_ssh_key_pairName of existing SSH key pair to attach to TFE EC2 instance.stringnullno
http_proxyProxy address (including port number) for TFE to use for outbound HTTP requests (e.g. http://proxy.example.com:3128).stringnullno
https_proxyProxy address (including port number) for TFE to use for outbound HTTPS requests (e.g. http://proxy.example.com:3128).stringnullno
is_secondary_regionBoolean indicating whether this TFE deployment is in the primary or secondary (replica) region.boolfalseno
lb_is_internalBoolean to create an internal (private) load balancer. The lb_subnet_ids must be private subnets when this is true.booltrueno
lb_stickiness_enabledBoolean to enable sticky sessions for the load balancer. When lb_type is nlb, sticky sessions enabled by client IP Address.booltrueno
lb_typeIndicates which type of AWS load balancer is created: Application Load Balancer (alb) or Network Load Balancer (nlb).string"nlb"no
log_fwd_destination_typeType of log forwarding destination for Fluent Bit. Supported values are s3, cloudwatch, or custom.string"cloudwatch"no
rds_apply_immediatelyBoolean to apply changes immediately to RDS cluster instance.booltrueno
rds_aurora_engine_modeRDS Aurora database engine mode.string"provisioned"no
rds_aurora_engine_versionEngine version of RDS Aurora PostgreSQL.string"16.10"no
rds_aurora_instance_classInstance class of Aurora PostgreSQL database.string"db.r6i.xlarge"no
rds_aurora_replica_countNumber of replica (reader) cluster instances to create within the RDS Aurora database cluster (within the same region).number1no
rds_availability_zonesList of AWS availability zones to spread Aurora database cluster instances across. Leave as null and RDS will automatically assign 3 availability zones.list(string)nullno
rds_backup_retention_periodThe number of days to retain backups for. Must be between 0 and 35. Must be greater than 0 if the database cluster is used as a source of a read replica cluster.number35no
rds_deletion_protectionBoolean to enable deletion protection for RDS Aurora global cluster.boolfalseno
rds_force_destroyBoolean to enable the removal of RDS database cluster members from RDS global cluster on destroy.boolfalseno
rds_global_cluster_idID of RDS global cluster. Only required only when is_secondary_region is true, otherwise leave as null.stringnullno
rds_kms_key_arnARN of KMS customer managed key (CMK) to encrypt TFE RDS cluster.stringnullno
rds_parameter_group_familyFamily of RDS Aurora PostgreSQL database parameter group.string"aurora-postgresql16"no
rds_performance_insights_enabledBoolean to enable performance insights for RDS cluster instance(s).booltrueno
rds_performance_insights_retention_periodNumber of days to retain RDS performance insights data. Must be between 7 and 731.number7no
rds_preferred_backup_windowDaily time range (UTC) for RDS backup to occur. Must not overlap with rds_preferred_maintenance_window.string"04:00-04:30"no
rds_preferred_maintenance_windowWindow (UTC) to perform RDS database maintenance. Must not overlap with rds_preferred_backup_window.string"Sun:08:00-Sun:09:00"no
rds_replication_source_identifierARN of source RDS cluster or cluster instance if this database cluster is to be created as a read replica. Only required when is_secondary_region is true, otherwise leave as null.stringnullno
rds_skip_final_snapshotBoolean to enable RDS to take a final database snapshot before destroying.boolfalseno
rds_source_regionSource region for RDS cross-region replication. Only required when is_secondary_region is true, otherwise leave as null.stringnullno
rds_storage_encryptedBoolean to encrypt RDS storage. An AWS managed key will be used when true unless a value is also specified for rds_kms_key_arn.booltrueno
redis_apply_immediatelyBoolean to apply changes immediately to Redis cluster.booltrueno
redis_at_rest_encryption_enabledBoolean to enable encryption at rest on Redis cluster. An AWS managed key will be used when true unless a value is also specified for redis_kms_key_arn.booltrueno
redis_auto_minor_version_upgradeBoolean to enable automatic minor version upgrades for Redis cluster.booltrueno
redis_automatic_failover_enabledBoolean for deploying Redis nodes in multiple availability zones and enabling automatic failover.booltrueno
redis_engine_versionRedis version number.string"7.1"no
redis_kms_key_arnARN of KMS customer managed key (CMK) to encrypt Redis cluster with.stringnullno
redis_multi_az_enabledBoolean to create Redis nodes across multiple availability zones. If true, redis_automatic_failover_enabled must also be true, and more than one subnet must be specified within redis_subnet_ids.booltrueno
redis_node_typeType (size) of Redis node from a compute, memory, and network throughput standpoint.string"cache.m5.large"no
redis_parameter_group_nameName of parameter group to associate with Redis cluster.string"default.redis7"no
redis_portPort number the Redis nodes will accept connections on.number6379no
redis_subnet_idsList of subnet IDs to use for Redis cluster subnet group. Private subnets is the best practice here.list(string)[]no
redis_transit_encryption_enabledBoolean to enable TLS encryption between TFE and the Redis cluster.booltrueno
route53_tfe_hosted_zone_is_privateBoolean indicating if route53_tfe_hosted_zone_name is a private hosted zone.boolfalseno
route53_tfe_hosted_zone_nameRoute53 Hosted Zone name to create tfe_hostname Alias record in. Required if create_route53_tfe_dns_record is true.stringnullno
s3_destination_bucket_arnARN of destination S3 bucket for cross-region replication configuration. Bucket should already exist in secondary region. Required when s3_enable_bucket_replication is true.string""no
s3_destination_bucket_kms_key_arnARN of KMS key of destination S3 bucket for cross-region replication configuration if it is encrypted with a customer managed key (CMK).stringnullno
s3_enable_bucket_replicationBoolean to enable cross-region replication for TFE S3 bucket. An s3_destination_bucket_arn is required when true.boolfalseno
s3_enable_bucket_replication_bidirectionalEnables bidirectional replication from secondary region to primary region. Only valid when s3_enable_bucket_replication and is_secondary_region are true.boolfalseno
s3_enable_bucket_replication_rtcBoolean to enable real-time change (RTC) monitoring for TFE S3 bucket replication. Only valid when s3_enable_bucket_replication is true.boolfalseno
s3_force_destroyBoolean to enable force destruction of S3 bucket and all objects within it. When true, the bucket can be destroyed even if it contains objects.boolfalseno
s3_kms_key_arnARN of KMS customer managed key (CMK) to encrypt TFE S3 bucket with.stringnullno
s3_log_fwd_bucket_nameName of S3 bucket to configure as log forwarding destination. Only valid when tfe_log_forwarding_enabled is true.stringnullno
tfe_admin_https_portPort the TFE application container listens on for system (admin) API endpoints HTTPS traffic. This value is used for both the host and container port.number9443no
tfe_alb_tls_certificate_arnARN of existing TFE TLS certificate imported in ACM to be used for application load balancer (ALB) HTTPS listeners. Required when lb_type is alb.stringnullno
tfe_capacity_concurrencyMaximum number of concurrent Terraform runs to allow on a TFE node.number10no
tfe_capacity_cpuMaximum number of CPU cores that a Terraform run is allowed to consume in TFE. Set to 0 for no limit.number0no
tfe_capacity_memoryMaximum amount of memory (in MiB) that a Terraform run is allowed to consume in TFE.number2048no
tfe_cost_estimation_iam_enabledBoolean to add AWS pricing actions to TFE IAM instance profile for cost estimation feature.stringtrueno
tfe_database_nameName of TFE database to create within RDS global cluster.string"tfe"no
tfe_database_parametersPostgreSQL server parameters for the connection URI. Used to configure the PostgreSQL connection.string"sslmode=require"no
tfe_database_userUsername for TFE RDS database cluster.string"tfe"no
tfe_hairpin_addressingBoolean to enable hairpin addressing for layer 4 load balancer with loopback prevention. Must be true when lb_type is nlb and lb_is_internal is true.booltrueno
tfe_http_portPort the TFE application container listens on for HTTP traffic. This is not the host port.number8080no
tfe_https_portPort the TFE application container listens on for HTTPS traffic. This is not the host port.number8443no
tfe_iact_subnetsComma-separated list of subnets in CIDR notation (e.g., 10.0.0.0/8,192.168.0.0/24) that are allowed to retrieve the TFE initial admin creation token (IACT) via the API or web browser. Leave as null to disable IACT retrieval via the API from external clients.stringnullno
tfe_iact_time_limitNumber of minutes that the TFE initial admin creation token (IACT) can be retrieved via the API after the application starts.number60no
tfe_iact_tokenA pre-populated TFE initial admin creation token (IACT). Leave as null for the system to generate a random one.stringnullno
tfe_iact_trusted_proxiesComma-separated list of proxy IP addresses that are allowed to retrieve the TFE initial admin creation token (IACT) via the API or web browser. Leave as null to disable IACT retrieval via the API from external clients through a proxy.stringnullno
tfe_image_nameName of the TFE application container image. Override this only if you are hosting the image in a custom registry. If you are using Amazon ECR, specify only the repository name here (e.g., 'tfe-app'), not the full image path.string"hashicorp/terraform-enterprise"no
tfe_image_repository_passwordPassword for authenticating to the container registry that hosts the TFE application container image. Leave as null if using the default TFE registry, as the TFE license will be used as the password. If you are using Amazon ECR, this should be a valid ECR token or leave as null to use the instance profile.stringnullno
tfe_image_repository_urlContainer registry hostname for the TFE application container image. Override this only if you are hosting the image in a custom registry. If you are using Amazon ECR, specify only the registry URI (e.g., '.dkr.ecr..amazonaws.com'), not the full image path.string"images.releases.hashicorp.com"no
tfe_image_repository_usernameUsername for authenticating to the container registry that hosts the TFE application container image. Override this only if you are hosting the image in a custom registry. If you are using Amazon ECR, specify 'AWS'.string"terraform"no
tfe_image_tagTag for the TFE application container image, representing the specific version of Terraform Enterprise to install.string"v202505-1"no
tfe_ipv6_enabledBoolean to enable TFE to listen on IPv6 and IPv4 addresses. When false, TFE listens on IPv4 addresses only.boolfalseno
tfe_license_reporting_opt_outBoolean to opt out of reporting TFE licensing information to HashiCorp.boolfalseno
tfe_log_forwarding_enabledBoolean to enable TFE log forwarding feature.boolfalseno
tfe_metrics_enableBoolean to enable TFE metrics endpoints.boolfalseno
tfe_metrics_http_portHTTP port for TFE metrics scrape.number9090no
tfe_metrics_https_portHTTPS port for TFE metrics scrape.number9091no
tfe_object_storage_s3_access_key_idAccess key ID for S3 bucket. Required when tfe_object_storage_s3_use_instance_profile is false.stringnullno
tfe_object_storage_s3_secret_access_keySecret access key for S3 bucket. Required when tfe_object_storage_s3_use_instance_profile is false.stringnullno
tfe_object_storage_s3_use_instance_profileBoolean to use TFE instance profile for S3 bucket access. If false, tfe_object_storage_s3_access_key_id and tfe_object_storage_s3_secret_access_key are required.booltrueno
tfe_operational_modeOperational mode for TFE. Valid values are active-active or external.string"active-active"no
tfe_redis_password_secret_arnARN of AWS Secrets Manager secret for the TFE Redis password used to create Redis (Elasticache Replication Group) cluster. Secret type should be plaintext. Value of secret must be from 16 to 128 alphanumeric characters or symbols (excluding @, ", and /).stringnullno
tfe_run_pipeline_docker_networkDocker network where the containers that execute Terraform runs will be created. The network must already exist, it will not be created automatically. Leave as null to use the default network created by TFE.stringnullno
tfe_run_pipeline_imageFully qualified container image reference for the Terraform default agent container (e.g., 'internal-registry.example.com/tfe-agent:latest'). This is referred to as the TFE_RUN_PIPELINE_IMAGE and is the image that is used to execute Terraform runs when execution mode is set to remote. The container registry hosting this image must allow anonymous (unauthenticated) pulls.stringnullno
tfe_tls_enforceBoolean to enforce TLS.boolfalseno
tfe_usage_reporting_opt_outBoolean to opt out of reporting TFE usage information to HashiCorp.boolfalseno
tfe_vault_disable_mlockBoolean to disable mlock for internal Vault.boolfalseno

Outputs

NameDescription
elasticache_replication_group_arnARN of ElastiCache Replication Group (Redis) cluster.
elasticache_replication_group_idID of ElastiCache Replication Group (Redis) cluster.
elasticache_replication_group_primary_endpoint_addressPrimary endpoint address of ElastiCache Replication Group (Redis) cluster.
lb_dns_nameDNS name of the Load Balancer.
rds_aurora_cluster_arnARN of RDS Aurora database cluster.
rds_aurora_cluster_endpointRDS Aurora database cluster endpoint.
rds_aurora_cluster_membersList of instances that are part of this RDS Aurora database cluster.
rds_aurora_global_cluster_idRDS Aurora global database cluster identifier.
s3_bucket_arnARN of TFE S3 bucket.
s3_bucket_nameName of TFE S3 bucket.
s3_crr_iam_role_arnARN of S3 cross-region replication IAM role.
tfe_create_initial_admin_user_urlURL to create TFE initial admin user.
tfe_database_hostPostgreSQL server endpoint in the format that TFE will connect to.
tfe_urlURL to access TFE application based on value of tfe_fqdn input.

关于 About

A Terraform module for provisioning and installing Terraform Enterprise on AWS EC2 as described in HashiCorp Validated Designs

语言 Languages

HCL79.3%
Shell20.3%
Smarty0.4%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
55
Total Commits
峰值: 9次/周
Less
More

核心贡献者 Contributors