Coder Social home page Coder Social logo

cloudposse / terraform-aws-elastic-beanstalk-environment Goto Github PK

View Code? Open in Web Editor NEW
299.0 30.0 327.0 1.52 MB

Terraform module to provision an AWS Elastic Beanstalk Environment

Home Page: https://cloudposse.com/accelerate

License: Apache License 2.0

HCL 86.04% Makefile 3.19% Go 10.77%
terraform terraform-modules elasticbeanstalk aws environment hcl2

terraform-aws-elastic-beanstalk-environment's Introduction

Project Banner

Latest ReleaseLast UpdatedSlack Community

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]

Tip

👽 Use Atmos with Terraform

Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform.
Works with Github Actions, Atlantis, or Spacelift.

Watch demo of using Atmos with Terraform
Example of running atmos to manage infrastructure from our Quick Start tutorial.

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 = ["*"]
  }
}

Important

In Cloud Posse's examples, we avoid pinning modules to specific versions to prevent discrepancies between the documentation and the latest released versions. However, for your own projects, we strongly advise pinning each module to the exact version you're using. This practice ensures the stability of your infrastructure. Additionally, we recommend implementing a systematic approach for updating versions to avoid unexpected changes.

Makefile Targets

Available targets:

  help                                Help screen
  help/all                            Display help for all targets
  help/short                          This help short screen
  lint                                Lint terraform code

Requirements

Name Version
terraform >= 1.3.0
aws >= 4.0
random >= 3.5.1

Providers

Name Version
aws >= 4.0
random >= 3.5.1

Modules

Name Source Version
aws_security_group cloudposse/security-group/aws 1.0.1
dns_hostname cloudposse/route53-cluster-hostname/aws 0.12.2
elb_logs cloudposse/lb-s3-bucket/aws 0.20.0
this cloudposse/label/null 0.25.0

Resources

Name Type
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
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

Inputs

Name Description Type Default Required
additional_security_group_rules A 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, set create_security_group to false
and supply your own security group via associated_security_group_ids.)
The keys and values of the objects are fully compatible with the aws_security_group_rule resource, except
for security_group_id which 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 .
list(any) [] no
additional_settings Additional Elastic Beanstalk setttings. For full list of options, see https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html
list(object({
namespace = string
name = string
value = string
}))
[] no
additional_tag_map Additional key-value pairs to add to each map in tags_as_list_of_maps. Not added to tags or id.
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.
map(string) {} no
alb_zone_id ALB zone id map(string)
{
"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"
}
no
allow_all_egress If 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.
bool true no
ami_id The id of the AMI to associate with the Amazon EC2 instances string null no
application_port Port application is listening on number 80 no
application_subnets List of subnets to place EC2 instances list(string) n/a yes
associate_public_ip_address Whether to associate public IP addresses to the instances bool false no
associated_security_group_ids A 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, if create_security_group is false, must have rules providing the desired access.
list(string) [] no
attributes ID element. Additional attributes (e.g. workers or cluster) to add to id,
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 the delimiter
and treated as a single ID element.
list(string) [] no
autoscale_lower_bound Minimum level of autoscale metric to remove an instance number 20 no
autoscale_lower_increment How many Amazon EC2 instances to remove when performing a scaling activity. number -1 no
autoscale_max Maximum instances to launch number 3 no
autoscale_measure_name Metric used for your Auto Scaling trigger string "CPUUtilization" no
autoscale_min Minumum instances to launch number 2 no
autoscale_statistic Statistic the trigger should use, such as Average string "Average" no
autoscale_unit Unit for the trigger measurement, such as Bytes string "Percent" no
autoscale_upper_bound Maximum level of autoscale metric to add an instance number 80 no
autoscale_upper_increment How many Amazon EC2 instances to add when performing a scaling activity number 1 no
availability_zone_selector Availability Zone selector string "Any 2" no
context Single object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as null to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional_tag_map, which are merged.
any
{
"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
}
no
create_security_group Set true to create and configure a Security Group for the cluster. bool true no
delimiter Delimiter to be used between ID elements.
Defaults to - (hyphen). Set to "" to use no delimiter at all.
string null no
deployment_batch_size Percentage 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 number 1 no
deployment_batch_size_type The type of number that is specified in deployment_batch_size_type string "Fixed" no
deployment_ignore_health_check Do not cancel a deployment due to failed health checks bool false no
deployment_policy Use the DeploymentPolicy option to set the deployment type. The following values are supported: AllAtOnce, Rolling, RollingWithAdditionalBatch, Immutable, TrafficSplitting string "Rolling" no
deployment_timeout Number of seconds to wait for an instance to complete executing commands number 600 no
description Short description of the Environment string "" no
descriptor_formats Describe additional descriptors to be output in the descriptors output map.
Map of maps. Keys are names of descriptors. Values are maps of the form
{<br> format = string<br> labels = list(string)<br>}
(Type is any so the map values can later be enhanced to provide additional options.)
format is a Terraform format string to be passed to the format() function.
labels is a list of labels, in order, to pass to format() function.
Label values will be normalized before being passed to format() so they will be
identical to how they appear in id.
Default is {} (descriptors output will be empty).
any {} no
dns_subdomain The subdomain to create on Route53 for the EB environment. For the subdomain to be created, the dns_zone_id variable must be set as well string "" no
dns_zone_id Route53 parent zone ID. The module will create sub-domain DNS record in the parent zone for the EB environment string "" no
elastic_beanstalk_application_name Elastic Beanstalk application name string n/a yes
elb_scheme Specify internal if 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 VPC string "public" no
enable_capacity_rebalancing Specifies whether to enable the Capacity Rebalancing feature for Spot Instances in your Auto Scaling Group bool false no
enable_loadbalancer_logs Whether to enable Load Balancer Logging to the S3 bucket. bool true no
enable_log_publication_control Copy the log files for your application's Amazon EC2 instances to the Amazon S3 bucket associated with your application bool false no
enable_spot_instances Enable Spot Instance requests for your environment bool false no
enable_stream_logs Whether to create groups in CloudWatch Logs for proxy and deployment logs, and stream logs from each instance in your environment bool false no
enabled Set to false to prevent the module from creating any resources bool null no
enhanced_reporting_enabled Whether 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_actions to false bool true no
env_vars Map of custom ENV variables to be provided to the application running on Elastic Beanstalk, e.g. env_vars = { DB_USER = 'admin' DB_PASS = 'xxxxxx' } map(string) {} no
environment ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' string null no
environment_type Environment type, e.g. 'LoadBalanced' or 'SingleInstance'. If setting to 'SingleInstance', rolling_update_type must be set to 'Time', updating_min_in_service must be set to 0, and loadbalancer_subnets will be unused (it applies to the ELB, which does not exist in SingleInstance environments) string "LoadBalanced" no
extended_ec2_policy_document Extensions or overrides for the IAM role assigned to EC2 instances string "" no
force_destroy Force destroy the S3 bucket for load balancer logs bool false no
health_streaming_delete_on_terminate Whether to delete the log group when the environment is terminated. If false, the health data is kept RetentionInDays days. bool false no
health_streaming_enabled For 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. bool false no
health_streaming_retention_in_days The number of days to keep the archived health data before it expires. number 7 no
healthcheck_healthy_threshold_count The number of consecutive successful requests before Elastic Load Balancing changes the instance health status number 3 no
healthcheck_httpcodes_to_match List 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 list(string)
[
"200"
]
no
healthcheck_interval The interval of time, in seconds, that Elastic Load Balancing checks the health of the Amazon EC2 instances of your application number 10 no
healthcheck_timeout The 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 number 5 no
healthcheck_unhealthy_threshold_count The number of consecutive unsuccessful requests before Elastic Load Balancing changes the instance health status number 3 no
healthcheck_url Application Health Check URL. Elastic Beanstalk will call this URL to check the health of the application running on EC2 instances string "/" no
http_listener_enabled Enable port 80 (http) bool true no
id_length_limit Limit id to this many characters (minimum 6).
Set to 0 for unlimited length.
Set to null for keep the existing setting, which defaults to 0.
Does not affect id_full.
number null no
instance_refresh_enabled Enable weekly instance replacement. bool true no
instance_type Instances type string "t2.micro" no
keypair Name of SSH key that will be deployed on Elastic Beanstalk and DataPipeline instance. The key should be present in AWS string "" no
label_key_case Controls the letter case of the tags keys (label names) for tags generated by this module.
Does not affect keys of tags passed in via the tags input.
Possible values: lower, title, upper.
Default value: title.
string null no
label_order The 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.
list(string) null no
label_value_case Controls 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 the tags input.
Possible values: lower, title, upper and none (no transformation).
Set this to title and set delimiter to "" to yield Pascal Case IDs.
Default value: lower.
string null no
labels_as_tags Set of labels (ID elements) to include as tags in the tags output.
Default is to include all labels.
Tags with empty values will not be included in the tags output.
Set to [] to suppress all generated tags.
Notes:
The value of the name tag, if included, will be the id, not the name.
Unlike other null-label inputs, the initial setting of labels_as_tags cannot be
changed in later chained modules. Attempts to change it will be silently ignored.
set(string)
[
"default"
]
no
loadbalancer_certificate_arn Load Balancer SSL certificate ARN. The certificate must be present in AWS Certificate Manager string "" no
loadbalancer_connection_idle_timeout Classic 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. number 60 no
loadbalancer_crosszone Configure the classic load balancer to route traffic evenly across all instances in all Availability Zones rather than only within each zone. bool true no
loadbalancer_is_shared Flag to create a shared application loadbalancer. Only when loadbalancer_type = "application" https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-alb-shared.html bool false no
loadbalancer_managed_security_group Load balancer managed security group string "" no
loadbalancer_redirect_http_to_https Redirect HTTP traffic to HTTPS listener bool false no
loadbalancer_redirect_http_to_https_host Defines the host for the HTTP to HTTPS redirection rule string "#{host}" no
loadbalancer_redirect_http_to_https_path_pattern Defines the path pattern for the HTTP to HTTPS redirection rule list(string)
[
"*"
]
no
loadbalancer_redirect_http_to_https_port Defines the port for the HTTP to HTTPS redirection rule string "443" no
loadbalancer_redirect_http_to_https_priority Defines the priority for the HTTP to HTTPS redirection rule number 1 no
loadbalancer_redirect_http_to_https_status_code The redirect status code string "HTTP_301" no
loadbalancer_security_groups Load balancer security groups list(string) [] no
loadbalancer_ssl_policy Specify a security policy to apply to the listener. This option is only applicable to environments with an application load balancer string "" no
loadbalancer_subnets List of subnets to place Elastic Load Balancer list(string) [] no
loadbalancer_type Load Balancer type, e.g. 'application' or 'classic' string "classic" no
logs_delete_on_terminate Whether to delete the log groups when the environment is terminated. If false, the logs are kept RetentionInDays days bool false no
logs_retention_in_days The number of days to keep log events before they expire. number 7 no
managed_actions_enabled Enable managed platform updates. When you set this to true, you must also specify a PreferredStartTime and UpdateLevel bool true no
name ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
This is the only ID element not also included as a tag.
The "name" tag is set to the full id string. There is no tag with the value of the name input.
string null no
namespace ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique string null no
prefer_legacy_service_policy Whether to use AWSElasticBeanstalkService (deprecated) or AWSElasticBeanstalkManagedUpdatesCustomerRolePolicy policy bool true no
prefer_legacy_ssm_policy Whether to use AmazonEC2RoleforSSM (will soon be deprecated) or AmazonSSMManagedInstanceCore policy bool true no
preferred_start_time Configure a maintenance window for managed actions in UTC string "Sun:10:00" no
regex_replace_chars Terraform 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.
string null no
region AWS region string n/a yes
rolling_update_enabled Whether to enable rolling update bool true no
rolling_update_type Health or Immutable. Set it to Immutable to apply the configuration change to a fresh group of instances string "Health" no
root_volume_iops The IOPS of the EBS root volume (only applies for gp3 and io1 types) number null no
root_volume_size The size of the EBS root volume number 8 no
root_volume_throughput The type of the EBS root volume (only applies for gp3 type) number null no
root_volume_type The type of the EBS root volume string "gp2" no
s3_bucket_access_log_bucket_name Name of the S3 bucket where s3 access log will be sent to string "" no
s3_bucket_versioning_enabled When set to 'true' the s3 origin bucket will have versioning enabled bool true no
scheduled_actions Define a list of scheduled actions
list(object({
name = string
minsize = string
maxsize = string
desiredcapacity = string
starttime = string
endtime = string
recurrence = string
suspend = bool
}))
[] no
security_group_create_before_destroy Set true to enable Terraform create_before_destroy behavior on the created security group.
We recommend setting this true on new security groups, but default it to false because true
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.
bool false no
security_group_create_timeout How long to wait for the security group to be created. string "10m" no
security_group_delete_timeout How long to retry on DependencyViolation errors during security group deletion from
lingering ENIs left by certain AWS services such as Elastic Load Balancing.
string "15m" no
security_group_description The description to assign to the created Security Group.
Warning: Changing the description causes the security group to be replaced.
string "Security Group for the EB environment" no
security_group_name The name to assign to the created security group. Must be unique within the VPC.
If not provided, will be derived from the null-label.context passed in.
If create_before_destroy is true, will be used as a name prefix.
list(string) [] no
shared_loadbalancer_arn ARN of the shared application load balancer. Only when loadbalancer_type = "application". string "" no
solution_stack_name Elastic Beanstalk stack, e.g. Docker, Go, Node, Java, IIS. For more info, see https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html string n/a yes
spot_fleet_on_demand_above_base_percentage The 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. number -1 no
spot_fleet_on_demand_base The 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. number 0 no
spot_max_price The 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 number -1 no
ssh_listener_enabled Enable SSH port bool false no
ssh_listener_port SSH port number 22 no
stage ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' string null no
tags Additional tags (e.g. {'BusinessUnit': 'XYZ'}).
Neither the tag keys nor the tag values will be modified by this module.
map(string) {} no
tenant ID element _(Rarely used, not included by default)_. A customer identifier, indicating who this instance of a resource is for string null no
tier Elastic Beanstalk Environment tier, 'WebServer' or 'Worker' string "WebServer" no
update_level The highest level of update to apply with managed platform updates string "minor" no
updating_max_batch Maximum number of instances to update at once number 1 no
updating_min_in_service Minimum number of instances in service during update number 1 no
version_label Elastic Beanstalk Application version to deploy string "" no
vpc_id ID of the VPC in which to provision the AWS resources string n/a yes
wait_for_ready_timeout The maximum duration to wait for the Elastic Beanstalk Environment to be in a ready state before timing out string "20m" no

Outputs

Name Description
all_settings List of all option settings configured in the environment. These are a combination of default settings and their overrides from setting in the configuration
application The Elastic Beanstalk Application for this environment
autoscaling_groups The autoscaling groups used by this environment
ec2_instance_profile_role_name Instance IAM role name
elb_zone_id ELB zone ID
endpoint Fully qualified DNS name for the environment
hostname DNS hostname
id ID of the Elastic Beanstalk environment
instances Instances used by this environment
launch_configurations Launch configurations in use by this environment
load_balancer_log_bucket Name of bucket where Load Balancer logs are stored (if enabled)
load_balancers Elastic Load Balancers in use by this environment
name Name of the Elastic Beanstalk environment
queues SQS queues in use by this environment
security_group_arn Elastic Beanstalk environment Security Group ARN
security_group_id Elastic Beanstalk environment Security Group ID
security_group_name Elastic Beanstalk environment Security Group name
setting Settings specifically set for this environment
tier The environment tier
triggers Autoscaling triggers in use by this environment

Related Projects

Check out these related projects.

Tip

Use Terraform Reference Architectures for AWS

Use Cloud Posse's ready-to-go terraform architecture blueprints for AWS to get up and running quickly.

✅ We build it together with your team.
✅ Your team owns everything.
✅ 100% Open Source and backed by fanatical support.

Request Quote

📚 Learn More

Cloud Posse is the leading DevOps Accelerator for funded startups and enterprises.

Your team can operate like a pro today.

Ensure that your team succeeds by using Cloud Posse's proven process and turnkey blueprints. Plus, we stick around until you succeed.

Day-0: Your Foundation for Success

  • Reference Architecture. You'll get everything you need from the ground up built using 100% infrastructure as code.
  • Deployment Strategy. Adopt a proven deployment strategy with GitHub Actions, enabling automated, repeatable, and reliable software releases.
  • Site Reliability Engineering. Gain total visibility into your applications and services with Datadog, ensuring high availability and performance.
  • Security Baseline. Establish a secure environment from the start, with built-in governance, accountability, and comprehensive audit logs, safeguarding your operations.
  • GitOps. Empower your team to manage infrastructure changes confidently and efficiently through Pull Requests, leveraging the full power of GitHub Actions.

Request Quote

Day-2: Your Operational Mastery

  • Training. Equip your team with the knowledge and skills to confidently manage the infrastructure, ensuring long-term success and self-sufficiency.
  • Support. Benefit from a seamless communication over Slack with our experts, ensuring you have the support you need, whenever you need it.
  • Troubleshooting. Access expert assistance to quickly resolve any operational challenges, minimizing downtime and maintaining business continuity.
  • Code Reviews. Enhance your team’s code quality with our expert feedback, fostering continuous improvement and collaboration.
  • Bug Fixes. Rely on our team to troubleshoot and resolve any issues, ensuring your systems run smoothly.
  • Migration Assistance. Accelerate your migration process with our dedicated support, minimizing disruption and speeding up time-to-value.
  • Customer Workshops. Engage with our team in weekly workshops, gaining insights and strategies to continuously improve and innovate.

Request Quote

✨ Contributing

This project is under active development, and we encourage contributions from our community.

Many thanks to our outstanding contributors:

For 🐛 bug reports & feature requests, please use the issue tracker.

In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

  1. Review our Code of Conduct and Contributor Guidelines.
  2. Fork the repo on GitHub
  3. Clone the project to your own machine
  4. Commit changes to your own branch
  5. Push your work back up to your fork
  6. Submit a Pull Request so that we can review your changes

NOTE: Be sure to merge the latest changes from "upstream" before making a pull request!

🌎 Slack Community

Join our Open Source Community on Slack. It's FREE for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally sweet infrastructure.

📰 Newsletter

Sign up for our newsletter and join 3,000+ DevOps engineers, CTOs, and founders who get insider access to the latest DevOps trends, so you can always stay in the know. Dropped straight into your Inbox every week — and usually a 5-minute read.

📆 Office Hours

Join us every Wednesday via Zoom for your weekly dose of insider DevOps trends, AWS news and Terraform insights, all sourced from our SweetOps community, plus a live Q&A that you can’t find anywhere else. It's FREE for everyone!

License

License

Preamble to the Apache License, Version 2.0

Complete license is available in the LICENSE file.

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.

Trademarks

All other trademarks referenced herein are the property of their respective owners.


Copyright © 2017-2024 Cloud Posse, LLC

README footer

Beacon

terraform-aws-elastic-beanstalk-environment's People

Contributors

actions-user avatar aknysh avatar anton-kachurin avatar bober2000 avatar bronhy avatar cereme avatar cloudpossebot avatar comrumino avatar florian0410 avatar goruha avatar gowiem avatar guikcd avatar helvalius avatar jamengual avatar johncblandii avatar max-lobur avatar maximmi avatar okgolove avatar osterman avatar pabardina avatar renovate[bot] avatar richardj-bsquare avatar romanness avatar samcrudge avatar sestrella avatar skolsuper avatar tbilou avatar vadim-hleif avatar velmoga avatar vmonrabal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-aws-elastic-beanstalk-environment's Issues

Module recreates all `settings` on each `terraform plan/apply`

terraform-aws-elastic-beanstalk-environment recreates all settings on each terraform plan/apply

    setting.1039973377.name:               "InstancePort" => "InstancePort"
    setting.1039973377.namespace:      "aws:elb:listener:22" => "aws:elb:listener:22"
    setting.1039973377.resource:           "" => ""
    setting.1039973377.value:                "22" => "22"
    setting.1119692372.name:               "" => "ListenerEnabled"
    setting.1119692372.namespace:      "" => "aws:elbv2:listener:443"
    setting.1119692372.resource:           "" => ""
    setting.1119692372.value:                "" => "false"
    setting.1136119684.name:               "RootVolumeSize" => "RootVolumeSize"
    setting.1136119684.namespace:     "aws:autoscaling:launchconfiguration" => "aws:autoscaling:launchconfiguration"
    setting.1136119684.resource:           "" => ""
    setting.1136119684.value:              "8" => "8"
    setting.1201312680.name:             "ListenerEnabled" => "ListenerEnabled"
    setting.1201312680.namespace:   "aws:elb:listener:443" => "aws:elb:listener:443"
    setting.1201312680.resource:         "" => ""
    setting.1201312680.value:             "false" => "false"

This feature/bug was present for years and is still not fixed:

hashicorp/terraform#6729
hashicorp/terraform-provider-aws#901
hashicorp/terraform#6257
hashicorp/terraform-provider-aws#280
hashicorp/terraform#11056
hashicorp/terraform-provider-aws#461

(tested some ideas from the links above, nothing worked 100%)

The only possible solution is to add this:

lifecycle {
    ignore_changes = ["setting"]
}

but it’s a hack since it will not update the env if you update any of the settings.

Regarding terraform-aws-elastic-beanstalk-environment recreating the settings all the time, here what’s probably happening:

  • Terraform sends all settings to AWS, but some of them are not relevant to the environment you are deploying
  • Elastic Beanstalk accepts all settings, applies the relevant ones, and throws away the rest
  • Next time Terraform asks about the settings, Elastic Beanstalk returns a subset of the values and probably in different order
  • Terraform can’t decide/calculate if the settings are the same - they sure look different (and would require an advanced algorithm to determine if they are the same)
  • Terraform assigns new ID to the entire array of settings and tries to recreate all of them
  • Elastic Beanstalk accepts the settings, applies the relevant ones, and throws away the rest - the cycle repeats

What’s a possible solution?
Introduce var.settings (list of maps) to be able to provide all the required settings from outside of the module.
It might work, but in practice would be very difficult to know all the needed settings and tedious to implement.

http_listener_enabled not working for me

Hello !

In my beanstalk env, my load balancer listens on https. I would like to listen on http too, to redirect http -> https. I know, there is already a patch on it, and I'm using the http_listener_enabled parameter.

But... It doesn't work for me.

Here a screenshot of AWS console 👍
screenshot 2019-02-01 at 10 22 42

And terraform :

module "elastic_beanstalk_environment" {
  source                              = "git::https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment.git?ref=tags/0.4.8"

...

  healthcheck_url                      = "${var.healthcheck_url}"
  http_listener_enabled	               = true 
  loadbalancer_type                             = "application"
  loadbalancer_certificate_arn        = "${aws_acm_certificate.cert.arn}"

  loadbalancer_security_groups      = ["${module.metabase_sg.this_security_group_id}"]
  loadbalancer_managed_security_group = "${module.metabase_sg.this_security_group_id}"

}

tfsate :

"all_settings.232565.namespace": "aws:elbv2:listener:default",
"all_settings.232565.resource": "",
 "all_settings.232565.value": "false",

What am I doing wrong?

Thanks

Attach ECS permissions to EC2 instance

64bit Amazon Linux 2018.03 v2.11.9 running Multi-container Docker 18.06.1-ce (Generic) solution stack needs at least ecs:RegisterContainerInstance on ec2 instance to work properly.

Validation error: Environment tag cannot be empty

As part of recent commit 93860ad , the version of module terraform-null-label has been updated from 0.3.1 to 0.5.0.

This seems to have introduced a breaking change in the way the environment tag is handled.

Following that change, TF plan indicates that the following tags will be created:

  tags.%: "" => "4"
  tags.Environment: "" => ""
  tags.Name: "" => "xxx"
  tags.Namespace:  "" => "yyy"
  tags.Stage: "" => "demo"

The only empty tag value is for tags.Environment.
It then fails when applying with the error:

* aws_elastic_beanstalk_environment.default: InvalidParameter: 1 validation error(s) found.
- minimum field size of 1, CreateEnvironmentInput.Tags[1].Value.

This is due to the fact that the label resource of module terraform-aws-elastic-beanstalk-environment does not specify an environment variable.

I tried adding the environment variable to the resource (https://github.com/vlaurin/terraform-aws-elastic-beanstalk-environment/commit/edd54e1416e9ee120a10cdad900e0bc9d74884b7#diff-7a370d8342e7203b805911c92454f0f4R6) and it does resolve the issue.

Should *not* be passing the 'Name' tag to elastic beanstalk environment creation

As per this issue, the 'Name' tag is reserved for use by AWS elastic beanstalk:

hashicorp/terraform-provider-aws#3963

This results in failures to deploy and non-idempotency issues.

The null label provider is taking the provided tags and 'sanitising' them... But for this module the 'Name' tag needs stripping out.

 tags.%:                                        "3" => "5"
      tags.Name:                                     "" => "mine-staging-jenkins2build-eb-env"
      tags.Namespace:                                "" => "mine"

How to Reproduce:
This I believe happens in an already provisioned environment, using terraform-aws-jenkins and...
when using version 1.10 and 1.11 of the terraform AWS provider:

  • 2018-07-24 14:09:16.652 +0000 UTC (e-mip7mrnszq) : Service:AmazonCloudFormation, Message:No updates are to be performed.
  • 2018-07-24 14:09:17.325 +0000 UTC (e-mip7mrnszq) : Environment tag update failed.

allow to use custom AMI Imageid

this is an feature suggestion

it would be nice if the module would expose an option to customize the AMI ImageId used by beanstalk:

setting {
    name      = "ImageId"
    namespace = "aws:autoscaling:launchconfiguration"
    value     = var.custom_ami_imageid
  }

`enhanced` health not supported by some platforms, but cannot be changed

Some platforms (i.e. .NET) do not support the enhanced health system, yet there is no option to change this to basic. Causes the error

ConfigurationValidationException: Configuration validation exception: Enhanced health reporting system is not supported by current solution stack

Solution would be to add a variable for this.

Do not downgrade solution stack if managed actions are enabled

Currently we do not have solution stack attribute ignored. Beanstalk automatically updates environment due to managed actions being allowed, when we run terraform again, it downgrades it back to the version specified in the solution stack attribute.

I tried dynamic block approach, apparently lifecycle block isn't allowed to be dynamic.

some unset env vars are making their way into the envrionment

Hi there,
Fantastic module. I've managed to get an EB env up and running with this with around 13 environment variables and all looks good. Except I seem to be getting 3 "rogue" environment variables being set:

DEFAULT_ENV_13
DEFAULT_ENV_27
DEFAULT_ENV_41

and only these 3. I think the way you've handled the environment variables is pretty nice as all the uglyness of EB variables is hidden nicely in the module. I can't see how I'm only getting properties for these 3 variables though because my env-vars map looks like:

   env_vars = "${
      map(
        "AWS_REGION", "${local.aws_region}",
        "BUNDLE_WITHOUT", "test:development",
        "REDIS_PORT", "6379",
        "REDIS_URL", "${local.redis_url}",
        "APPLICATION_NAME", "foo",
        "LOAD_DB", "none",
        "RACK_ENV", "staging",
        "RAILS_SKIP_ASSET_COMPILATION", "false",
        "RAILS_SKIP_MIGRATIONS", "false",
        "RDS_DB_NAME", "mydb",
        "RDS_PORT", "5432",
        "RDS_USERNAME", "myuser",
        "API_URL", "https://api.foo.com"
      )
    }"

Any thoughts why I might get the 3 rogues?

LoadBalancer coming blank in beanstalk UI

screen shot 2019-02-11 at 12 01 37 pm

LoadBalancer coming blank in ElasticBeanstalk UI. Cannot see/list/edit options such as instanceport, https, routing, ssl certificates s3 log enabled etc. attached is the screenshot.

AWSElasticBeanstalkService AWS IAM policy soon to be deprecated

Hi,
Got an email from AWS that says that AWSElasticBeanstalkService which is the managed IAM policy used in main.tf will be deprecated soon and should be switched to AWSElasticBeanstalkManagedUpdatesCustomerRolePolicy
Was wondering if you plan to switch that.

Thank you

elastic beanstalk connecting with rds

Hello. I am new with terraform. Can you provide an example creating a elb env with a rds? I am using your modules for do that.
I create a vpc, an mysql database and then create the application and environment, adding the security group to the allowed_security_groups field in the env.
I have to add attributes, because the rds and elb env was creating the same security group.
The code create all the resources, but I having problem that ec2 Instance can not connect to the DB.

Here is the code:

provider "aws" {
profile = "classlolaws"
region = var.region
}

module "vpc" {
source = "git::https://github.com/cloudposse/terraform-aws-vpc.git?ref=tags/0.7.0"
namespace = var.namespace
stage = var.stage
name = var.name
cidr_block = "172.16.0.0/16"
}

module "subnets" {
source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.16.0"
availability_zones = var.availability_zones
namespace = var.namespace
stage = var.stage
name = var.name
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
}

module "rds_instance" {
source = "git::https://github.com/cloudposse/terraform-aws-rds.git?ref=tags/0.19.0"
namespace = var.namespace
stage = var.stage
name = var.name
database_name = var.database_name
database_user = var.database_user
database_password = var.database_password
database_port = var.database_port
multi_az = var.multi_az
attributes = var.rds_attributes
storage_type = var.storage_type
allocated_storage = var.allocated_storage
storage_encrypted = var.storage_encrypted
engine = var.engine
engine_version = var.engine_version
instance_class = var.instance_class
db_parameter_group = var.db_parameter_group
publicly_accessible = var.publicly_accessible
vpc_id = module.vpc.vpc_id
subnet_ids = module.subnets.private_subnet_ids
security_group_ids = [module.vpc.vpc_default_security_group_id]
apply_immediately = var.apply_immediately
dns_zone_id = var.dns_zone_id
db_parameter = [
{
name = "myisam_sort_buffer_size"
value = "1048576"
apply_method = "immediate"
},
{
name = "sort_buffer_size"
value = "2097152"
apply_method = "immediate"
}
]
}

module "elastic_beanstalk_application" {
source = "git::https://github.com/cloudposse/terraform-aws-elastic-beanstalk-application.git?ref=tags/0.5.0"
namespace = var.namespace
stage = var.stage
name = var.name
attributes = var.elb_attributes
tags = var.tags
delimiter = var.delimiter
description = "Test elastic_beanstalk_application"
}

module "elastic_beanstalk_environment" {
source = "git::https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment.git?ref=tags/0.19.0"
namespace = var.namespace
stage = var.stage
name = var.name
attributes = var.elb_attributes
tags = var.tags
delimiter = var.delimiter
description = var.description
region = var.region
availability_zone_selector = var.availability_zone_selector
dns_zone_id = var.dns_zone_id
dns_subdomain = var.dns_subdomain

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
allowed_security_groups = [module.vpc.vpc_default_security_group_id, module.rds_instance.security_group_id]

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 = {
"DB_CREATE" = "update"
"HOST_BACKEND" = "http://localhost:8000"
"HOST_FRONTEND" = "http://localhost:3000"
"JDBC_CONNECTION_STRING" = ""
"RDS_DATABASE" = var.database_name
"RDS_HOST" = module.rds_instance.instance_address
"RDS_ENDPOINT" = module.rds_instance.instance_endpoint
"RDS_PORT" = var.database_port
"RDS_USER" = var.database_user
"RDS_PASS" = var.database_password
"RDS_HOST_DNS" = module.rds_instance.hostname
}
}

Beanstalk created resources naming should be configurable independently

Describe the Feature

When creating a new beanstalk environment, some resources naming should be configurable independently from each other with a custom name.

Expected Behavior

For created EC2 instances, S3 Bucket, instance_profile, iam_roles, there should be a configuration that let us custom their name.
Like the s3_bucket_access_log_bucket_name variable.

We could use these to customize our resources naming.

Use Case

We are currently starting to use this module to deploy Beanstalk but we have specifics constraints on naming for our resources :

For EC2 : Product-Component-Environment-Blue_Green
For IAM Roles: Product-Component-Environment-AWS::Region
For S3: Product-Component-Environment-AWS::AccountId-AWS::Region

Since we are doing multi-regions deployments, there are main patterns standards we need to respect to ensure consistent naming of our resources. As you can see they are similar and could be implemented using context module mechanics but not the exact same.

Problem the module use the same naming pattern for these ressources.

name = "${module.this.id}-eb-service"

name = "${module.this.id}-eb-ec2"

name = "${module.this.id}-eb-default"

name = "${module.this.id}-eb-ec2"

bucket = "${module.this.id}-eb-loadbalancer-logs"

For S3 we clearly need account ID in name to avoid conflicts since it's a global resource, same goes for IAM roles but not EC2 name which is specifics to the account.

Describe Ideal Solution

Being able to specify an alternative name to these resources as variable.
For example we could have these variables to specify explicit name:

  • iam_role_service_name
  • iam_role_ec2_name
  • iam_role_policy_default_name
  • iam_instance_profile_ec2_name
  • s3_bucket_elb_logs_bucket_name

Or maybe being able to specify a prefix or a global naming convention for each type of resource.

Alternatives Considered

Before opening this feature request I tried to use attributes option and label_order from context module.

var.tfvars

...
product = "product"
component = "component"
environment = "env"
label_order = ["namespace", "name", "environment", "attributes"]
...

main.tf

module "elastic_beanstalk_environment" {
  ...
  label_order = var.label_order
  attributes   = [data.aws_caller_identity.current.account_id,var.region]
  ...

Plan give me

Beanstalk env name: product-comp-env-862853942159-eu-west-1
ec2 name: product-comp-env-862853942159-eu-west-1-eb-ec2
ec2 iam instance: product-comp-env-862853942159-eu-west-1-eb-ec2
iam role service: product-comp-env-862853942159-eu-west-1-eb-service
s3 bucket for logs: product-comp-env-862853942159-eu-west-1-eb-loadbalancer-logs

Which allow us at least to respect widely our convention but flood some resources naming with useless information.

Additional Context

S3 limitation to 63 chars for bucket name make it hard to name our Bucket since the module append the -eb-loadbalancer-logs field consuming 21 chars of the 63 available.

This would require another issue I think but since we could replace it with this features it's good information.

I was thinking about using multiple context module to solve this but it's not possible in the end since there is a single one referenced.

module fail with worker tier

Running the example code with the additional tier = "Worker" option fail with:


Error: Error applying plan:

1 error(s) occurred:

* module.elastic_beanstalk_environment.aws_elastic_beanstalk_environment.default: 1 error(s) occurred:

* aws_elastic_beanstalk_environment.default: ConfigurationValidationException: Configuration validation exception: Load Balancer ListenerEnabled setting cannot be applied because AWSEBLoadBalancer doesn't exist.
	status code: 400, request id: bd7a5475-7390-4fe9-a213-a728bf9c3895

Manually commenting out all the eb settings that starts with aws:elb worked. If I can come up with some better solution I'll propose a PR.

when beanstalk setting is blank

for example like SSLPolicy

the error returns:
Creating Load Balancer listener failed Reason: An SSL policy must be specified for HTTPS listeners

manage ebextentions from terraform

hello people
is there any possibility to manage ebextentions using terraform because my needs is :

  • create resources with names for the elastic load balancer and autoscaling group and launch configuration, otherwise, they will get names using cloudformation stack name

Warnings

I use cloudposse modules. There are these warnings. Do you plan to address that?


Warning: Quoted references are deprecated

  on .terraform/modules/subnets/private.tf line 45, in resource "aws_subnet" "private":
  45:     ignore_changes = ["tags.kubernetes", "tags.SubnetType"]

In this context, references are expected literally rather than in quotes.
Terraform 0.11 and earlier required quotes, but quoted references are now
deprecated and will be removed in a future version of Terraform. Remove the
quotes surrounding this reference to silence this warning.
module "vpc" {
  source = "git::https://github.com/cloudposse/terraform-aws-vpc.git?ref=0.8.0"
  namespace = var.namespace
  stage = var.stage
  name = var.name
  tags = var.tags
  cidr_block = "172.32.0.0/16"
}

module "subnets" {
  source               = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.16.0"
  availability_zones   = var.availability_zones
  namespace            = var.namespace
  stage                = var.stage
  name                 = var.name
  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
  tags = var.tags
}

TF0.14: Expressions used in outputs can only refer to sensitive values if the sensitive attribute is true.

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

When adding a S3 User with key and secret, TF 0.14 errors with this error:

Error: Output refers to sensitive values

  on .terraform/modules/elastic_beanstalk_environment/outputs.tf line 41:
  41: output "setting" {

Expressions used in outputs can only refer to sensitive values if the
sensitive attribute is true.

Terraform code:

module "s3_user_assets" {
  source    = "git::https://github.com/cloudposse/terraform-aws-iam-s3-user.git?ref=master"
  namespace = local.name
  stage     = local.stage
  name      = "assets"
  s3_actions = ["s3:ListBucket",
    "s3:ListBucketMultipartUploads",
    "s3:ListBucketVersions",
    "s3:GetBucketVersioning",
    "s3:PutObject",
    "s3:GetObject",
    "s3:DeleteObject",
    "s3:DeleteObjectVersion",
    "s3:ListMultipartUploadParts",
    "s3:GetObjectVersion",
  "s3:AbortMultipartUpload"]
  s3_resources = [module.s3_assets.this_s3_bucket_arn, "${module.s3_assets.this_s3_bucket_arn}/*"]
}

Elastic Beanstalk module:

module "elastic_beanstalk_environment" {
  source = "cloudposse/elastic-beanstalk-environment/aws"

  # Cloud Posse recommends pinning every module to a specific version
  version                            = "0.37.0"
...

  additional_settings = [
    {
      namespace = "aws:elasticbeanstalk:application:environment"
      name      = "EFS_NAME"
      value     = aws_efs_file_system.files.dns_name
    },
    {
      namespace = "aws:elasticbeanstalk:application:environment"
      name      = "S3_ACCESS_KEY_ID"
      value     = module.s3_user_assets.access_key_id
    },
    {
      namespace = "aws:elasticbeanstalk:application:environment"
      name      = "S3_SECRET_ACCESS_KEY"
      value     = module.s3_user_assets.secret_access_key
    },
  ]
...

I worked around by manually adding the requested sensitive = true to the outputs.tf in the module's cache folder.

Expected Behavior

The variables should be added without error.

Steps to Reproduce

Steps to reproduce the behavior:

See source code above.

Screenshots

If applicable, add screenshots or logs to help explain your problem.

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

  • OS: Mac
  • Version Terraform 0.14.6

Additional Context

Add any other context about the problem here.

Add variable to disable S3 eb-loadbalancer-logs

Describe the Feature

At the moment any load balanced web environment is automatically created with a eb-loadbalancer-logs bucket along with logging enabled.

Expected Behavior

It would be nice to have an option to disable this behavior.

Use Case

We don't actually need or want logs on a couple internal environments.

Feature Request - Add variable for environment tier

Hello @osterman @goruha @aknysh

Currently, your module for elastic beanstalk environment doesn't have a way to set the tier for the application to be "Worker" because it is hardcoded to "WebServer". I am asking that a variable is created for the tier with it defaulting to "WebServer" so it disrupts as little as possible. I will put in a PR shortly this Issue number.

Thanks,

Lucas Pearson

Redirect http to https

If I set http_listener_enabled="true" and loadbalancer_certificate_arn=someArn and loadbalancer_ssl_policy=whatever, then I can get the load balancer to add a HTTPS listener and a HTTP listener.

But how can I make the HTTP listener create a forwarding rule to HTTPS?

DeploymentPolicy is not fully configurable

Have a question? Please checkout our Slack Community or visit our Slack Archive.

Slack Community

Describe the Feature

DeploymentPolicy can currently only be Immutable or Rolling, but I would like to use others like RollingWithAdditionalBatch.

Expected Behavior

There would be a deployment_policy parameter that can be used to specify required deployment policy and it would support all policies: All at once, Rolling, Rolling with additional batch, Immutable,Traffic splitting

Alternatives Considered

Tried to use additional_settings to define the unsupported policy but the original one applies instead.

Wrong Descriptions of additional_security_groups and allowed_security_groups

Describe the Bug

In the README, under the Inputs table, the descriptions of additional_security_groups and allowed_security_groups input fields are switched. This is merely an issue in the README documentation - the module behaves according to the expected descriptions below.

Current

The description in the README currently shows

additional_security_groups: List of security groups to be allowed to connect to the EC2 instances
allowed_security_groups: List of security groups to add to the EC2 instances

Expected

additional_security_groups: List of security groups to add to the EC2 instances
allowed_security_groups: List of security groups to be allowed to connect to the EC2 instances

Option to provide instance profile role or role policy

Hello,

Thanks a great module like all other modules you have!

Currently we can specify the ec2_instance_profile_role_name, and the module will create the instance profile role with the default policy that includes read permissions to a few different services.

This is a bit cumbersome since you would like to either specify other permissions to include the role policy or you would like to scope the read permission on parameter store to only access parameters for this specific environment.

It would be therefore great to either have the possibility to provide an existing role for the instances or provide the policy that should be used.

Thanks!

Allow configuring of Scheduled Actions

Hello guys and thank you for your work on this module.

Describe the Feature

I would like to have the possibility to configure multiple Scheduled actions in my environment using additional_settings or with a dedicated variable.

Use Case

I'm trying to configure my Beanstalk environment with some scheduled actions to handle my business daily load needs and ensure respect of some security compliance requirements.

Since we can do this using .ebextensions file we could use this method, but we want to be sure on the infrastructure team side that we can apply a mandatory Schedule action that could not be changed by application developments. (.ebextension being specific to this second)

Describe Ideal Solution

I have 2 solutions at the moment.

Solution 1: We could create a dedicated variable scheduled_actions as following:

variable "scheduled_actions" {
  type = list(object({
    name = string
    minsize = string
    maxsize = string
    desiredcapacity = string 
    starttime = string
    endtime = string
    recurrence = string
    suspend = string
  }))
  default     = []
  description = "Define a list of scheduled actions"
}

Advantage:

  • This variable allow us to declare as many scheduled actions as needed using a dedicated object for each one.
  • Easier to specify than declaring each setting (see second idea)

Drawback:

  • Some parameters in it are optional but will have to be filled anyway using a null value since we cannot yet specify default values in objects (see: hashicorp/terraform#19898)
  • Add another variable (not sure if it is a drawback here )

Solution 2: We could modify the additional_settings variable to handle the "resource" field for this specific case.

variable "additional_settings" {
type = list(object({
namespace = string
name = string
value = string
}))

become

variable "additional_settings" {
  type = list(object({
    namespace = string
    name      = string
    value     = string
    resource  = string
  }))

dynamic "setting" {
for_each = var.additional_settings
content {
namespace = setting.value.namespace
name = setting.value.name
value = setting.value.value
resource = ""
}
}
become

  dynamic "setting" {
    for_each = var.additional_settings
    content {
      namespace = setting.value.namespace
      name      = setting.value.name
      value     = setting.value.value
      resource  = setting.value.resource
    }
  }

Advantages:

  • No new variables
  • Allow us to declare as many scheduled actions as needed
  • Allow users to handle new settings that would require the specific setting resource field later

Drawbacks:

  • Sounds like a breaking change since we will change the object variable
  • Maybe too heavy in terms of readiness ?

Alternatives Considered

I'v tried to use additional_settings without parameter just to see what happen:

I specify additional_settings as following

additional_settings = [
  {
    namespace   = "aws:autoscaling:scheduledaction"
    name        = "MinSize"
    value       = "1"
  },
  {
    namespace   = "aws:autoscaling:scheduledaction"
    name        = "MaxSize"
    value       = "2"
  },
  {
    namespace   = "aws:autoscaling:scheduledaction"
    name        = "StartTime"
    value       = "2015-05-14T07:00:00Z"
  },
  {
    namespace   = "aws:autoscaling:scheduledaction"
    name        = "EndTime"
    value       = "2016-01-12T07:00:00Z"
  },
  {
    namespace   = "aws:autoscaling:scheduledaction"
    name        = "Recurrence"
    value       = "*/20 * * * *"
  },
  {
    namespace   = "aws:autoscaling:scheduledaction"
    name        = "DesiredCapacity"
    value       = "2"
  }
]

Launch plan wich mention these new settings:

      + setting {
          + name      = "DesiredCapacity"
          + namespace = "aws:autoscaling:scheduledaction"
          + value     = "2"
        }
      + setting {
          + name      = "EndTime"
          + namespace = "aws:autoscaling:scheduledaction"
          + value     = "2016-01-12T07:00:00Z"
        }
      + setting {
          + name      = "MaxSize"
          + namespace = "aws:autoscaling:scheduledaction"
          + value     = "2"
        }
      + setting {
          + name      = "MinSize"
          + namespace = "aws:autoscaling:scheduledaction"
          + value     = "1"
        }
      + setting {
          + name      = "Recurrence"
          + namespace = "aws:autoscaling:scheduledaction"
          + value     = "*/20 * * * *"
        }
      + setting {
          + name      = "StartTime"
          + namespace = "aws:autoscaling:scheduledaction"
          + value     = "2015-05-14T07:00:00Z"
        }

then apply and get the following error

Error: InvalidParameterValue: The scheduled action name cannot be blank.
        status code: 400, request id: f4003748-9393-4202-824c-312fbf77b7fc

Which is logic since the resource field is set to an empty string.

Additional Context

This need sounds like a bug and a feature request to me.

I'm open to discussion on this one and can propose a PR .

Doesn't support AWS provider v3.x

Describe the Bug

AWS provider version constraint ~> 2.0 doesn't support modules that use ~> 3.x versions. For example, my module supports AWS ~> 3.4.0 and I get:

Could not retrieve the list of available versions for provider hashicorp/aws:
no available releases match the given constraints ~> 3.4.0, ~> 2.0, ~> 2.0, ~>
3.4.0

Error: ConfigurationValidationException on a apply

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

Plan goes ok.
After trying to apply my config, a ConfigurationValidationException pops up

Expected Behavior

Clearer meaning of the problem. I think I used all the required vars documented... so no clue how to proceed

Steps to Reproduce

`
module "elastic_beanstalk_application" {
source = "git::https://github.com/cloudposse/terraform-aws-elastic-beanstalk-application.git?ref=tags/0.5.0"
name = "AppName"
}

module "elastic-beanstalk-environment" {
source = "cloudposse/elastic-beanstalk-environment/aws"
version = "0.22.0"
elastic_beanstalk_application_name = "AppName"
name = "dev-AppName"
vpc_id = aws_default_vpc.default.id
region = "eu-west-1"
solution_stack_name = "64bit Amazon Linux 2 v5.0.2 running Node.js 12"
application_subnets = [
aws_default_subnet.default_az1.id,
aws_default_subnet.default_az2.id,
aws_default_subnet.default_az3.id,
]
autoscale_max = 2
env_vars = {
API_URL = "https://my-api-url.net"
}
}
`

Screenshots

Captura de Pantalla 2020-06-04 a les 13 15 48
`
Error: ConfigurationValidationException: Configuration validation exception: Invalid option value: '' (Namespace: 'aws:ec2:vpc', OptionName: 'ELBSubnets'): Specify the subnets for the VPC.
status code: 400, request id: ac1268fc-77a0-479d-8a5d-37c6b024ce9b

on .terraform/modules/elastic-beanstalk-environment/terraform-aws-elastic-beanstalk-environment-0.22.0/main.tf line 505, in resource "aws_elastic_beanstalk_environment" "default":
505: resource "aws_elastic_beanstalk_environment" "default" {
`

Environment:

  • OS: OSX
  • Version Dockerized Terraform v0.12.21

list loadbalancer_certificate_arn

Hi Guys,

Thank you for the great work you made available. Currently I am bumped to this particularly use case:
Using Multi-Docker environments which are reachable through an Application Loadbalancer with HostHeaders enabled. Some of the applications are reachable through other HostHeaders: e.g. app.domain1.com and web.domain2.com.

Terraform recently presented a fix for the AWS provider which allows usage of multiple ACM certificates for an Application Loadbalancer (terraform-aws-modules/terraform-aws-alb#26)
capture
.

TL:DR is it possible to change loadbalancer_certificate_arn to type of List.

loadbalancer_certificate_arn = ["${module.acm-application.acm_certificate_arn}"]

S3 bucket invalid name

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

S3 bucket is not getting created - it returns 400 response with "Invalid name" error

Expected Behavior

elb log s3 bucket should be created

image

Add Example Usage

what

  • Add example invocation

why

  • We need this so we can soon enable automated continuous integration testing of module

Provide a way to specify visibility for Elastic Load Balancers to be internal

Hello,
I recently started using your module and was able to create a new Elastic Beanstalk environment successfully. However, I need my load balancers to be internal facing only. I could not find a way to specify this within the module. The module requires 'public_subnets', so I assume this is functionality is not currently available?

In AWS, you can specify the visibility as shown in the attached screenshot. Thanks!
image

Example fail if added HTTPS listeners

When running the example exactly as it is (with fixed stack solution name as I mentioned in the other issue) with the additional loadbalancer_certificate_arn = "arn:aws:acm:us-east-1:SOME_REAL_ARN_ID" it fails with:

Error: Error applying plan:

1 error(s) occurred:

* module.elastic_beanstalk_environment.aws_elastic_beanstalk_environment.default: 1 error(s) occurred:

* aws_elastic_beanstalk_environment.default: Error waiting for Elastic Beanstalk Environment (e-d3ep2ub5md) to become ready: 3 errors occurred:
	* 2019-04-14 01:35:27.327 +0000 UTC (e-d3ep2ub5md) : Stack named 'awseb-e-d3ep2ub5md-stack' aborted operation. Current state: 'CREATE_FAILED'  Reason: The following resource(s) failed to create: [AWSEBV2LoadBalancerListener443, AWSEBInstanceLaunchWaitCondition].
	* 2019-04-14 01:35:27.498 +0000 UTC (e-d3ep2ub5md) : Creating Load Balancer listener failed Reason: An SSL policy must be specified for HTTPS listeners (Service: AmazonElasticLoadBalancingV2; Status Code: 400; Error Code: ValidationError; Request ID: 8d9f505c-5e55-11e9-b45a-6b32a0fd16fd)
	* 2019-04-14 01:35:27.576 +0000 UTC (e-d3ep2ub5md) : The EC2 instances failed to communicate with AWS Elastic Beanstalk, either because of configuration problems with the VPC or a failed EC2 instance. Check your VPC configuration and try launching the environment again.

Any clues? Is it something wrong with the module or should I make some changes to other resources (VPC/subnets)?

Thanks!

The additional_settings & RDS does not work

Hello,

I'm trying to add the RDS settings to my EB environments configuration, and it seems that functionality does not work at all.

Based on your documentation & AWS:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-rdsdbinstance

I'm trying to do like that:

additional_settings = [
    {
      namespace = "aws:rds:dbinstance"
      name      = "DBEngine"
      value     = "mysql"
    },
    {
      namespace = "aws:rds:dbinstance"
      name      = "DBEngineVersion"
      value     = "8.0.21"
    },
    {
      namespace = "aws:rds:dbinstance"
      name      = "DBInstanceClass"
      value     = "db.t2.micro"
    },
    {
      namespace = "aws:rds:dbinstance"
      name      = "MultiAZDatabase"
      value     = "false"
    },
    {
      namespace = "aws:rds:dbinstance"
      name      = "DBUser"
      value     = local.database.user
    },
    {
      namespace = "aws:rds:dbinstance"
      name      = "DBPassword"
      value     = random_password.password.result
    },
    {
      namespace = "aws:rds:dbinstance"
      name      = "DBDeletionPolicy"
      value     = "Delete"
    },
    {
      namespace = "aws:rds:dbinstance"
      name      = "DBAllocatedStorage"
      value     = "5"
    }
  ]

And this configuration is not creating any RDS DB & not attaching to the EB.
Do you have any solution for that?

auth_token changes destroys Redis cluster

we have this

resource "aws_elasticache_replication_group" "redis" {
  at_rest_encryption_enabled = true
  auth_token = data.external.example.result.REDIS_AUTH
  automatic_failover_enabled = false
  engine = "redis"
  engine_version = "5.0.5"
  node_type = lookup(var.aws_elasticache_cluster_node_type, terraform.workspace)
  maintenance_window = "sun:01:01-sun:23:00"
  number_cache_clusters = lookup(var.aws_elasticache_cluster_nodes, terraform.workspace)
  parameter_group_name = aws_elasticache_parameter_group.default.name
  port = 6379
  replication_group_id = "service-${terraform.workspace}"
  replication_group_description = "Service ${terraform.workspace}"
  snapshot_window = "00:00-01:00"
  subnet_group_name = aws_elasticache_subnet_group.default.name
  transit_encryption_enabled = true
  lifecycle {
    prevent_destroy = true
  }
}

every time auth_token needs a change terraform is attempting to destroy and create new cluster.
in AWS GUI it's possible to set new token and chose either to rotate or set it.

Feels like we need to expose token update stategy option in TF (https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyCacheCluster.html)

Host not available despite having public IP

I was trying to access my EB host behind the ELB but I found out that when checking with nmap all ports were filtered.

I did have the following settings:

  • ssh_listener_port set to "22"
  • ssh_listener_enabled set to "true"
  • ssh_source_restriction set to "0.0.0.0/0"
  • associate_public_ip_address set to "true"

And yet I could not access any of the open ports on the instance.

I also had these set for the subnet module:

  • nat_gateway_enabled set to "true"
  • map_public_ip_on_launch set to "true"

What did work was setting the private_subnets setting to use module.subnets.public_subnet_ids rather than module.subnets.private_subnet_ids.

(I found this out by adding a host to the same VPC manually but in the public rather than private subnet, and it had access.)

I was wondering if this is Intended behavior?
And if so, maybe some additional documentation could help?

Invalid solution stack in example


Error: Error applying plan:

1 error(s) occurred:

Simply running the example gives this error on `us-east-1`:
module.elastic_beanstalk_environment.aws_elastic_beanstalk_environment.default: 1 error(s) occurred:
aws_elastic_beanstalk_environment.default: InvalidParameterValue: No Solution Stack named '64bit Amazon Linux 2018.03 v2.12.2 running Docker 18.03.1-ce' found.
	status code: 400, request id: 656e5969-7bb3-4313-9158-2515435f3522

Changing to 64bit Amazon Linux 2018.03 v2.12.10 running Docker 18.06.1-ce seems to work.

Missing alb_zone_id

I'm getting following error as using eu-north-1 region

Error: Invalid index

  on .terraform/modules/eu-north-1.foo.elastic_beanstalk_environment/outputs.tf line 22, in output "elb_zone_id":
  22:   value       = var.alb_zone_id[var.region]
    |----------------
    | var.alb_zone_id is map of string with 15 elements
    | var.region is "eu-north-1"

The given key does not identify an element in this collection value.

As I taking a look at the code, some regions are missing.

# From: http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region
# Via: https://github.com/hashicorp/terraform/issues/7071
variable "alb_zone_id" {
  type = map(string)

  default = {
    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-west-1      = "Z2NYPWQ7DFZAZH"
    eu-west-2      = "Z1GKAAAUGATPF1"
    sa-east-1      = "Z10X7K2B4QSOFV"
    us-east-1      = "Z117KPS5GTRQ2G"
    us-east-2      = "Z14LCN19Q5QHIC"
    us-west-1      = "Z1LQECGX5PH1X"
    us-west-2      = "Z38NKT9BP95V3O"
    eu-west-3      = "ZCMLWB8V5SYIT"
  }

  description = "ALB zone id"
}

https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment/blob/master/variables.tf#L440

So regions below are missing. Please update them.

Africa (Cape Town) | af-south-1
Asia Pacific (Hong Kong) | ap-east-1
Asia Pacific (Osaka-Local) | ap-northeast-3
Europe (Frankfurt) | eu-central-1
Europe (Milan) | eu-south-1
Europe (Stockholm) | eu-north-1
Middle East (Bahrain) | me-south-1
South America (São Paulo) | sa-east-1

resource "aws_security_group" "default" is always dirty

I have the following setting

allowed_security_groups = []

with or without that parameter, I get the output below every time I run terraform plan

  ~ resource "aws_security_group" "default" {
        arn                    = "arn:aws:ec2:us-east-2:xxxxxxxxxxx:security-group/sg-xxxxxxxxxxxxxx"
        description            = "Allow inbound traffic from provided Security Groups"
        egress                 = [
            {
                cidr_blocks      = [
                    "0.0.0.0/0",
                ]
                description      = ""
                from_port        = 0
                ipv6_cidr_blocks = []
                prefix_list_ids  = []
                protocol         = "-1"
                security_groups  = []
                self             = false
                to_port          = 0
            },
        ]
        id                     = "sg-xxxxxxxxxxxxxx"
      ~ ingress                = [
          + {
              + cidr_blocks      = []
              + description      = ""
              + from_port        = 0
              + ipv6_cidr_blocks = []
              + prefix_list_ids  = []
              + protocol         = "-1"
              + security_groups  = []
              + self             = false
              + to_port          = 0
            },
        ]
        name                   = "beanstalk-development"
        owner_id               = "xxxxxxxxxxxxxx"
        revoke_rules_on_delete = false
        tags                   = {
            "Name" = "beanstalk-development"
        }
        vpc_id                 = "vpc-xxxxxxxxxxxxxxxx"
    }

How that can be avoided?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.