Module: elastic-beanstalk-environment
Terraform module to provision AWS Elastic Beanstalk environment
Searching for Maintainer!
The Cloud Posse team no longer utilizes Beanstalk all that much, but this module is still fairly popular. In an effort to give it the attention it deserves, we're searching for a volunteer maintainer to manage this specific repository's issues and pull requests (of which a number are already stacked up). This is a great opportunity for anyone who is looking to solidify and strengthen their Terraform skillset while also giving back to the SweetOps open source community!
You can learn more about being a SweetOps contributor on our docs site here.
If you're interested, reach out to us via the #terraform channel in the SweetOps Slack or directly via email @ [email protected]
Usage
For a complete example, see examples/complete
provider "aws" {
region = var.region
}
module "vpc" {
source = "cloudposse/vpc/aws"
# Cloud Posse recommends pinning every module to a specific version
version = "x.x.x"
cidr_block = "172.16.0.0/16"
context = module.this.context
}
module "subnets" {
source = "cloudposse/dynamic-subnets/aws"
# Cloud Posse recommends pinning every module to a specific version
version = "x.x.x"
availability_zones = var.availability_zones
vpc_id = module.vpc.vpc_id
igw_id = module.vpc.igw_id
cidr_block = module.vpc.vpc_cidr_block
nat_gateway_enabled = true
nat_instance_enabled = false
context = module.this.context
}
module "elastic_beanstalk_application" {
source = "cloudposse/elastic-beanstalk-application/aws"
# Cloud Posse recommends pinning every module to a specific version
version = "x.x.x"
description = "Test Elastic Beanstalk application"
context = module.this.context
}
module "elastic_beanstalk_environment" {
source = "../../"
description = var.description
region = var.region
availability_zone_selector = var.availability_zone_selector
dns_zone_id = var.dns_zone_id
wait_for_ready_timeout = var.wait_for_ready_timeout
elastic_beanstalk_application_name = module.elastic_beanstalk_application.elastic_beanstalk_application_name
environment_type = var.environment_type
loadbalancer_type = var.loadbalancer_type
elb_scheme = var.elb_scheme
tier = var.tier
version_label = var.version_label
force_destroy = var.force_destroy
instance_type = var.instance_type
root_volume_size = var.root_volume_size
root_volume_type = var.root_volume_type
autoscale_min = var.autoscale_min
autoscale_max = var.autoscale_max
autoscale_measure_name = var.autoscale_measure_name
autoscale_statistic = var.autoscale_statistic
autoscale_unit = var.autoscale_unit
autoscale_lower_bound = var.autoscale_lower_bound
autoscale_lower_increment = var.autoscale_lower_increment
autoscale_upper_bound = var.autoscale_upper_bound
autoscale_upper_increment = var.autoscale_upper_increment
vpc_id = module.vpc.vpc_id
loadbalancer_subnets = module.subnets.public_subnet_ids
application_subnets = module.subnets.private_subnet_ids
allow_all_egress = true
additional_security_group_rules = [
{
type = "ingress"
from_port = 0
to_port = 65535
protocol = "-1"
source_security_group_id = module.vpc.vpc_default_security_group_id
description = "Allow all inbound traffic from trusted Security Groups"
}
]
rolling_update_enabled = var.rolling_update_enabled
rolling_update_type = var.rolling_update_type
updating_min_in_service = var.updating_min_in_service
updating_max_batch = var.updating_max_batch
healthcheck_url = var.healthcheck_url
application_port = var.application_port
solution_stack_name = var.solution_stack_name
additional_settings = var.additional_settings
env_vars = var.env_vars
extended_ec2_policy_document = data.aws_iam_policy_document.minimal_s3_permissions.json
prefer_legacy_ssm_policy = false
prefer_legacy_service_policy = false
scheduled_actions = var.scheduled_actions
context = module.this.context
}
data "aws_iam_policy_document" "minimal_s3_permissions" {
statement {
sid = "AllowS3OperationsOnElasticBeanstalkBuckets"
actions = [
"s3:ListAllMyBuckets",
"s3:GetBucketLocation"
]
resources = ["*"]
}
}
Variables
Required Variables
application_subnets(list(string)) requiredList of subnets to place EC2 instances
elastic_beanstalk_application_name(string) requiredElastic Beanstalk application name
region(string) requiredAWS region
solution_stack_name(string) requiredElastic Beanstalk stack, e.g. Docker, Go, Node, Java, IIS. For more info, see https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html
vpc_id(string) requiredID of the VPC in which to provision the AWS resources
Optional Variables
additional_security_group_rules(list(any)) optionalA list of Security Group rule objects to add to the created security group, in addition to the ones
this module normally creates. (To suppress the module's rules, setcreate_security_groupto false
and supply your own security group viaassociated_security_group_ids.)
The keys and values of the objects are fully compatible with theaws_security_group_ruleresource, except
forsecurity_group_idwhich will be ignored, and the optional "key" which, if provided, must be unique and known at "plan" time.
To get more info see https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule .Default value:
[ ]additional_settingsoptionalAdditional Elastic Beanstalk setttings. For full list of options, see https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html
Type:
list(object({
namespace = string
name = string
value = string
}))Default value:
[ ]alb_zone_id(map(string)) optionalALB zone id
Default value:
{
"af-south-1": "Z1EI3BVKMKK4AM",
"ap-east-1": "ZPWYUBWRU171A",
"ap-northeast-1": "Z1R25G3KIG2GBW",
"ap-northeast-2": "Z3JE5OI70TWKCP",
"ap-south-1": "Z18NTBI3Y7N9TZ",
"ap-southeast-1": "Z16FZ9L249IFLT",
"ap-southeast-2": "Z2PCDNR3VC2G1N",
"ca-central-1": "ZJFCZL7SSZB5I",
"eu-central-1": "Z1FRNW7UH4DEZJ",
"eu-north-1": "Z23GO28BZ5AETM",
"eu-south-1": "Z10VDYYOA2JFKM",
"eu-west-1": "Z2NYPWQ7DFZAZH",
"eu-west-2": "Z1GKAAAUGATPF1",
"eu-west-3": "Z3Q77PNBQS71R4",
"me-south-1": "Z2BBTEKR2I36N2",
"sa-east-1": "Z10X7K2B4QSOFV",
"us-east-1": "Z117KPS5GTRQ2G",
"us-east-2": "Z14LCN19Q5QHIC",
"us-gov-east-1": "Z2NIFVYYW2VKV1",
"us-gov-west-1": "Z31GFT0UA1I2HV",
"us-west-1": "Z1LQECGX5PH1X",
"us-west-2": "Z38NKT9BP95V3O"
}allow_all_egress(bool) optionalIf
true, the created security group will allow egress on all ports and protocols to all IP addresses.
If this is false and no egress rules are otherwise specified, then no egress will be allowed.Default value:
trueami_id(string) optionalThe id of the AMI to associate with the Amazon EC2 instances
Default value:
nullapplication_port(number) optionalPort application is listening on
Default value:
80associate_public_ip_address(bool) optionalWhether to associate public IP addresses to the instances
Default value:
falseassociated_security_group_ids(list(string)) optionalA list of IDs of Security Groups to associate the created resource with, in addition to the created security group.
These security groups will not be modified and, ifcreate_security_groupisfalse, must have rules providing the desired access.Default value:
[ ]autoscale_lower_bound(number) optionalMinimum level of autoscale metric to remove an instance
Default value:
20autoscale_lower_increment(number) optionalHow many Amazon EC2 instances to remove when performing a scaling activity.
Default value:
-1autoscale_max(number) optionalMaximum instances to launch
Default value:
3autoscale_measure_name(string) optionalMetric used for your Auto Scaling trigger
Default value:
"CPUUtilization"autoscale_min(number) optionalMinumum instances to launch
Default value:
2autoscale_statistic(string) optionalStatistic the trigger should use, such as Average
Default value:
"Average"autoscale_unit(string) optionalUnit for the trigger measurement, such as Bytes
Default value:
"Percent"autoscale_upper_bound(number) optionalMaximum level of autoscale metric to add an instance
Default value:
80autoscale_upper_increment(number) optionalHow many Amazon EC2 instances to add when performing a scaling activity
Default value:
1availability_zone_selector(string) optionalAvailability Zone selector
Default value:
"Any 2"create_security_group(bool) optionalSet
trueto create and configure a Security Group for the cluster.Default value:
truedeployment_batch_size(number) optionalPercentage or fixed number of Amazon EC2 instances in the Auto Scaling group on which to simultaneously perform deployments. Valid values vary per deployment_batch_size_type setting
Default value:
1deployment_batch_size_type(string) optionalThe type of number that is specified in deployment_batch_size_type
Default value:
"Fixed"deployment_ignore_health_check(bool) optionalDo not cancel a deployment due to failed health checks
Default value:
falsedeployment_policy(string) optionalUse the DeploymentPolicy option to set the deployment type. The following values are supported:
AllAtOnce,Rolling,RollingWithAdditionalBatch,Immutable,TrafficSplittingDefault value:
"Rolling"deployment_timeout(number) optionalNumber of seconds to wait for an instance to complete executing commands
Default value:
600description(string) optionalShort description of the Environment
Default value:
""dns_subdomain(string) optionalThe subdomain to create on Route53 for the EB environment. For the subdomain to be created, the
dns_zone_idvariable must be set as wellDefault value:
""dns_zone_id(string) optionalRoute53 parent zone ID. The module will create sub-domain DNS record in the parent zone for the EB environment
Default value:
""elb_scheme(string) optionalSpecify
internalif you want to create an internal load balancer in your Amazon VPC so that your Elastic Beanstalk application cannot be accessed from outside your Amazon VPCDefault value:
"public"enable_capacity_rebalancing(bool) optionalSpecifies whether to enable the Capacity Rebalancing feature for Spot Instances in your Auto Scaling Group
Default value:
falseenable_loadbalancer_logs(bool) optionalWhether to enable Load Balancer Logging to the S3 bucket.
Default value:
trueenable_log_publication_control(bool) optionalCopy the log files for your application's Amazon EC2 instances to the Amazon S3 bucket associated with your application
Default value:
falseenable_spot_instances(bool) optionalEnable Spot Instance requests for your environment
Default value:
falseenable_stream_logs(bool) optionalWhether to create groups in CloudWatch Logs for proxy and deployment logs, and stream logs from each instance in your environment
Default value:
falseenhanced_reporting_enabled(bool) optionalWhether to enable "enhanced" health reporting for this environment. If false, "basic" reporting is used. When you set this to false, you must also set
enable_managed_actionsto falseDefault value:
trueenv_vars(map(string)) optionalMap of custom ENV variables to be provided to the application running on Elastic Beanstalk, e.g. env_vars = { DB_USER = 'admin' DB_PASS = 'xxxxxx' }
Default value:
{ }environment_type(string) optionalEnvironment type, e.g. 'LoadBalanced' or 'SingleInstance'. If setting to 'SingleInstance',
rolling_update_typemust be set to 'Time',updating_min_in_servicemust be set to 0, andloadbalancer_subnetswill be unused (it applies to the ELB, which does not exist in SingleInstance environments)Default value:
"LoadBalanced"extended_ec2_policy_document(string) optionalExtensions or overrides for the IAM role assigned to EC2 instances
Default value:
""force_destroy(bool) optionalForce destroy the S3 bucket for load balancer logs
Default value:
falsehealth_streaming_delete_on_terminate(bool) optionalWhether to delete the log group when the environment is terminated. If false, the health data is kept RetentionInDays days.
Default value:
falsehealth_streaming_enabled(bool) optionalFor environments with enhanced health reporting enabled, whether to create a group in CloudWatch Logs for environment health and archive Elastic Beanstalk environment health data. For information about enabling enhanced health, see aws:elasticbeanstalk:healthreporting:system.
Default value:
falsehealth_streaming_retention_in_days(number) optionalThe number of days to keep the archived health data before it expires.
Default value:
7healthcheck_healthy_threshold_count(number) optionalThe number of consecutive successful requests before Elastic Load Balancing changes the instance health status
Default value:
3healthcheck_httpcodes_to_match(list(string)) optionalList of HTTP codes that indicate that an instance is healthy. Note that this option is only applicable to environments with a network or application load balancer
Default value:
[
"200"
]healthcheck_interval(number) optionalThe interval of time, in seconds, that Elastic Load Balancing checks the health of the Amazon EC2 instances of your application
Default value:
10healthcheck_timeout(number) optionalThe amount of time, in seconds, to wait for a response during a health check. Note that this option is only applicable to environments with an application load balancer
Default value:
5healthcheck_unhealthy_threshold_count(number) optionalThe number of consecutive unsuccessful requests before Elastic Load Balancing changes the instance health status
Default value:
3healthcheck_url(string) optionalApplication Health Check URL. Elastic Beanstalk will call this URL to check the health of the application running on EC2 instances
Default value:
"/"http_listener_enabled(bool) optionalEnable port 80 (http)
Default value:
trueinstance_refresh_enabled(bool) optionalEnable weekly instance replacement.
Default value:
trueinstance_type(string) optionalInstances type
Default value:
"t2.micro"keypair(string) optionalName of SSH key that will be deployed on Elastic Beanstalk and DataPipeline instance. The key should be present in AWS
Default value:
""loadbalancer_certificate_arn(string) optionalLoad Balancer SSL certificate ARN. The certificate must be present in AWS Certificate Manager
Default value:
""loadbalancer_connection_idle_timeout(number) optionalClassic load balancer only: Number of seconds that the load balancer waits for any data to be sent or received over the connection. If no data has been sent or received after this time period elapses, the load balancer closes the connection.
Default value:
60loadbalancer_crosszone(bool) optionalConfigure the classic load balancer to route traffic evenly across all instances in all Availability Zones rather than only within each zone.
Default value:
trueloadbalancer_is_shared(bool) optionalFlag to create a shared application loadbalancer. Only when loadbalancer_type = "application" https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-alb-shared.html
Default value:
falseloadbalancer_managed_security_group(string) optionalLoad balancer managed security group
Default value:
""loadbalancer_redirect_http_to_https(bool) optionalRedirect HTTP traffic to HTTPS listener
Default value:
falseloadbalancer_redirect_http_to_https_host(string) optionalDefines the host for the HTTP to HTTPS redirection rule
Default value:
"#{host}"loadbalancer_redirect_http_to_https_path_pattern(list(string)) optionalDefines the path pattern for the HTTP to HTTPS redirection rule
Default value:
[
"*"
]loadbalancer_redirect_http_to_https_port(string) optionalDefines the port for the HTTP to HTTPS redirection rule
Default value:
"443"loadbalancer_redirect_http_to_https_priority(number) optionalDefines the priority for the HTTP to HTTPS redirection rule
Default value:
1loadbalancer_redirect_http_to_https_status_code(string) optionalThe redirect status code
Default value:
"HTTP_301"loadbalancer_security_groups(list(string)) optionalLoad balancer security groups
Default value:
[ ]loadbalancer_ssl_policy(string) optionalSpecify a security policy to apply to the listener. This option is only applicable to environments with an application load balancer
Default value:
""loadbalancer_subnets(list(string)) optionalList of subnets to place Elastic Load Balancer
Default value:
[ ]loadbalancer_type(string) optionalLoad Balancer type, e.g. 'application' or 'classic'
Default value:
"classic"logs_delete_on_terminate(bool) optionalWhether to delete the log groups when the environment is terminated. If false, the logs are kept RetentionInDays days
Default value:
falselogs_retention_in_days(number) optionalThe number of days to keep log events before they expire.
Default value:
7managed_actions_enabled(bool) optionalEnable managed platform updates. When you set this to true, you must also specify a
PreferredStartTimeandUpdateLevelDefault value:
trueprefer_legacy_service_policy(bool) optionalWhether to use AWSElasticBeanstalkService (deprecated) or AWSElasticBeanstalkManagedUpdatesCustomerRolePolicy policy
Default value:
trueprefer_legacy_ssm_policy(bool) optionalWhether to use AmazonEC2RoleforSSM (will soon be deprecated) or AmazonSSMManagedInstanceCore policy
Default value:
truepreferred_start_time(string) optionalConfigure a maintenance window for managed actions in UTC
Default value:
"Sun:10:00"rolling_update_enabled(bool) optionalWhether to enable rolling update
Default value:
truerolling_update_type(string) optionalHealthorImmutable. Set it toImmutableto apply the configuration change to a fresh group of instancesDefault value:
"Health"root_volume_iops(number) optionalThe IOPS of the EBS root volume (only applies for gp3 and io1 types)
Default value:
nullroot_volume_size(number) optionalThe size of the EBS root volume
Default value:
8root_volume_throughput(number) optionalThe type of the EBS root volume (only applies for gp3 type)
Default value:
nullroot_volume_type(string) optionalThe type of the EBS root volume
Default value:
"gp2"s3_bucket_access_log_bucket_name(string) optionalName of the S3 bucket where s3 access log will be sent to
Default value:
""s3_bucket_versioning_enabled(bool) optionalWhen set to 'true' the s3 origin bucket will have versioning enabled
Default value:
truescheduled_actionsoptionalDefine a list of scheduled actions
Type:
list(object({
name = string
minsize = string
maxsize = string
desiredcapacity = string
starttime = string
endtime = string
recurrence = string
suspend = bool
}))Default value:
[ ]security_group_create_before_destroy(bool) optionalSet
trueto enable Terraformcreate_before_destroybehavior on the created security group.
We recommend setting thistrueon new security groups, but default it tofalsebecausetrue
will cause existing security groups to be replaced, possibly requiring the resource to be deleted and recreated.
Note that changing this value will always cause the security group to be replaced.Default value:
falsesecurity_group_create_timeout(string) optionalHow long to wait for the security group to be created.
Default value:
"10m"security_group_delete_timeout(string) optionalHow long to retry on
DependencyViolationerrors during security group deletion from
lingering ENIs left by certain AWS services such as Elastic Load Balancing.Default value:
"15m"security_group_description(string) optionalThe description to assign to the created Security Group.
Warning: Changing the description causes the security group to be replaced.Default value:
"Security Group for the EB environment"security_group_name(list(string)) optionalThe name to assign to the created security group. Must be unique within the VPC.
If not provided, will be derived from thenull-label.contextpassed in.
Ifcreate_before_destroyis true, will be used as a name prefix.Default value:
[ ]shared_loadbalancer_arn(string) optionalARN of the shared application load balancer. Only when loadbalancer_type = "application".
Default value:
""spot_fleet_on_demand_above_base_percentage(number) optionalThe percentage of On-Demand Instances as part of additional capacity that your Auto Scaling group provisions beyond the SpotOnDemandBase instances. This option is relevant only when enable_spot_instances is true.
Default value:
-1spot_fleet_on_demand_base(number) optionalThe minimum number of On-Demand Instances that your Auto Scaling group provisions before considering Spot Instances as your environment scales up. This option is relevant only when enable_spot_instances is true.
Default value:
0spot_max_price(number) optionalThe maximum price per unit hour, in US$, that you're willing to pay for a Spot Instance. This option is relevant only when enable_spot_instances is true. Valid values are between 0.001 and 20.0
Default value:
-1ssh_listener_enabled(bool) optionalEnable SSH port
Default value:
falsessh_listener_port(number) optionalSSH port
Default value:
22tier(string) optionalElastic Beanstalk Environment tier, 'WebServer' or 'Worker'
Default value:
"WebServer"update_level(string) optionalThe highest level of update to apply with managed platform updates
Default value:
"minor"updating_max_batch(number) optionalMaximum number of instances to update at once
Default value:
1updating_min_in_service(number) optionalMinimum number of instances in service during update
Default value:
1version_label(string) optionalElastic Beanstalk Application version to deploy
Default value:
""wait_for_ready_timeout(string) optionalThe maximum duration to wait for the Elastic Beanstalk Environment to be in a ready state before timing out
Default value:
"20m"
Context Variables
The following variables are defined in the context.tf file of this module and part of the terraform-null-label pattern.
context.tf file of this module and part of the terraform-null-label pattern.additional_tag_map(map(string)) optionalAdditional key-value pairs to add to each map in
tags_as_list_of_maps. Not added totagsorid.
This is for some rare cases where resources want additional configuration of tags
and therefore take a list of maps with tag key, value, and additional configuration.Required: No
Default value:
{ }attributes(list(string)) optionalID element. Additional attributes (e.g.
workersorcluster) to add toid,
in the order they appear in the list. New attributes are appended to the
end of the list. The elements of the list are joined by thedelimiter
and treated as a single ID element.Required: No
Default value:
[ ]context(any) optionalSingle object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables asnullto use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional_tag_map, which are merged.Required: No
Default value:
{
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"descriptor_formats": {},
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_key_case": null,
"label_order": [],
"label_value_case": null,
"labels_as_tags": [
"unset"
],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {},
"tenant": null
}delimiter(string) optionalDelimiter to be used between ID elements.
Defaults to-(hyphen). Set to""to use no delimiter at all.Required: No
Default value:
nulldescriptor_formats(any) optionalDescribe additional descriptors to be output in the
descriptorsoutput map.
Map of maps. Keys are names of descriptors. Values are maps of the form
\{<br/> format = string<br/> labels = list(string)<br/> \}
(Type isanyso the map values can later be enhanced to provide additional options.)
formatis a Terraform format string to be passed to theformat()function.
labelsis a list of labels, in order, to pass toformat()function.
Label values will be normalized before being passed toformat()so they will be
identical to how they appear inid.
Default is{}(descriptorsoutput will be empty).Required: No
Default value:
{ }enabled(bool) optionalSet to false to prevent the module from creating any resources
Required: NoDefault value:
nullenvironment(string) optionalID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT'
Required: NoDefault value:
nullid_length_limit(number) optionalLimit
idto this many characters (minimum 6).
Set to0for unlimited length.
Set tonullfor keep the existing setting, which defaults to0.
Does not affectid_full.Required: No
Default value:
nulllabel_key_case(string) optionalControls the letter case of the
tagskeys (label names) for tags generated by this module.
Does not affect keys of tags passed in via thetagsinput.
Possible values:lower,title,upper.
Default value:title.Required: No
Default value:
nulllabel_order(list(string)) optionalThe order in which the labels (ID elements) appear in the
id.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present.Required: No
Default value:
nulllabel_value_case(string) optionalControls the letter case of ID elements (labels) as included in
id,
set as tag values, and output by this module individually.
Does not affect values of tags passed in via thetagsinput.
Possible values:lower,title,upperandnone(no transformation).
Set this totitleand setdelimiterto""to yield Pascal Case IDs.
Default value:lower.Required: No
Default value:
nulllabels_as_tags(set(string)) optionalSet of labels (ID elements) to include as tags in the
tagsoutput.
Default is to include all labels.
Tags with empty values will not be included in thetagsoutput.
Set to[]to suppress all generated tags.
Notes:
The value of thenametag, if included, will be theid, not thename.
Unlike othernull-labelinputs, the initial setting oflabels_as_tagscannot be
changed in later chained modules. Attempts to change it will be silently ignored.Required: No
Default value:
[
"default"
]name(string) optionalID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
This is the only ID element not also included as atag.
The "name" tag is set to the fullidstring. There is no tag with the value of thenameinput.Required: No
Default value:
nullnamespace(string) optionalID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique
Required: NoDefault value:
nullregex_replace_chars(string) optionalTerraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set,"/[^a-zA-Z0-9-]/"is used to remove all characters other than hyphens, letters and digits.Required: No
Default value:
nullstage(string) optionalID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release'
Required: NoDefault value:
nulltags(map(string)) optionalAdditional tags (e.g.
{'BusinessUnit': 'XYZ'}).
Neither the tag keys nor the tag values will be modified by this module.Required: No
Default value:
{ }tenant(string) optionalID element (Rarely used, not included by default). A customer identifier, indicating who this instance of a resource is for
Required: NoDefault value:
null
Outputs
all_settingsList of all option settings configured in the environment. These are a combination of default settings and their overrides from setting in the configuration
applicationThe Elastic Beanstalk Application for this environment
autoscaling_groupsThe autoscaling groups used by this environment
ec2_instance_profile_role_nameInstance IAM role name
ec2_service_role_arnEC2 service IAM role ARN
elb_zone_idELB zone ID
endpointFully qualified DNS name for the environment
hostnameDNS hostname
idID of the Elastic Beanstalk environment
instancesInstances used by this environment
launch_configurationsLaunch configurations in use by this environment
load_balancer_log_bucketName of bucket where Load Balancer logs are stored (if enabled)
load_balancersElastic Load Balancers in use by this environment
nameName of the Elastic Beanstalk environment
queuesSQS queues in use by this environment
security_group_arnElastic Beanstalk environment Security Group ARN
security_group_idElastic Beanstalk environment Security Group ID
security_group_nameElastic Beanstalk environment Security Group name
settingSettings specifically set for this environment
tierThe environment tier
triggersAutoscaling triggers in use by this environment
Dependencies
Requirements
terraform, version:>= 1.3.0aws, version:>= 4.0random, version:>= 3.5.1
Providers
aws, version:>= 4.0random, version:>= 3.5.1
Modules
| Name | Version | Source | Description |
|---|---|---|---|
aws_security_group | 1.0.1 | cloudposse/security-group/aws | n/a |
dns_hostname | 0.12.2 | cloudposse/route53-cluster-hostname/aws | n/a |
elb_logs | 0.20.0 | cloudposse/lb-s3-bucket/aws | n/a |
this | 0.25.0 | cloudposse/label/null | n/a |
Resources
The following resources are used by this module:
aws_elastic_beanstalk_environment.default(resource)aws_iam_instance_profile.ec2(resource)aws_iam_role.ec2(resource)aws_iam_role.service(resource)aws_iam_role_policy.default(resource)aws_iam_role_policy_attachment.ecr_readonly(resource)aws_iam_role_policy_attachment.elastic_beanstalk_multi_container_docker(resource)aws_iam_role_policy_attachment.enhanced_health(resource)aws_iam_role_policy_attachment.service(resource)aws_iam_role_policy_attachment.ssm_automation(resource)aws_iam_role_policy_attachment.ssm_ec2(resource)aws_iam_role_policy_attachment.web_tier(resource)aws_iam_role_policy_attachment.worker_tier(resource)aws_lb_listener_rule.redirect_http_to_https(resource)aws_ssm_activation.ec2(resource)random_string.elb_logs_suffix(resource)
Data Sources
The following data sources are used by this module:
aws_iam_policy_document.default(data source)aws_iam_policy_document.ec2(data source)aws_iam_policy_document.extended(data source)aws_iam_policy_document.service(data source)aws_lb_listener.http(data source)aws_partition.current(data source)