Skip to content

JamesWoolfenden/terraform-aws-elasticbeanstalk

Repository files navigation

terraform-aws-elasticbeanstalk

Build Status Latest Release GitHub tag (latest SemVer) Terraform Version Infrastructure Tests pre-commit checkov Infrastructure Tests

A Terraform module organise and deploy AWS Elasticbeanstalk.


It's 100% Open Source and licensed under the APACHE2.

Usage

Include this repository as a module in your existing terraform code: Amazon rotate their available stacks so you will need to update your project check stacks with:

aws elasticbeanstalk list-available-solution-stacks

It also requires that your resources have tags. At a minimum VPC and subnet- to add.

aws ec2 create-tags --resources vpc-510efa34 --tags Key=Name,Value=Default
aws ec2 create-tags --resources subnet-ebd9cead --tags Key=Name,Value=Default
module "elasticbeanstalk" {
  source          = "github.com/jameswoolfenden/terraform-aws-elasticbeanstalk"
  version         = "0.1.8"
}

Requirements

No requirements.

Providers

Name Version
aws 4.34.0

Modules

No modules.

Resources

Name Type
aws_elastic_beanstalk_application.application resource
aws_elastic_beanstalk_application_version.latest resource
aws_elastic_beanstalk_environment.beanstalk resource
aws_caller_identity.current data source
aws_elastic_beanstalk_solution_stack.stack data source

Inputs

Name Description Type Default Required
CrossZone n/a string n/a yes
DeploymentPolicy n/a string "Rolling" no
LogPublicationControl n/a string n/a yes
ManagedActions n/a string n/a yes
PreferredStartTime For setting Preferred Start Time string n/a yes
RetentionInDays n/a string n/a yes
StreamLogs n/a string n/a yes
UpdateLevel n/a string n/a yes
application_key n/a string n/a yes
application_name n/a string n/a yes
asg n/a map(any) n/a yes
healthcheck n/a string n/a yes
launchconfiguration n/a map(any) n/a yes
name n/a string n/a yes
rollingupdate n/a map(any) n/a yes
stack_reg_ex n/a string n/a yes
subnet_ids n/a any n/a yes
vpc n/a map(any) n/a yes
vpc_id n/a string n/a yes

Outputs

Name Description
beanstalk n/a
cname n/a

Policy

This is the policy required to build this project:

The Terraform resource required is:

resource "aws_iam_policy" "terraform_pike" {
  name_prefix = "terraform_pike"
  path        = "/"
  description = "Pike Autogenerated policy from IAC"

  policy = jsonencode({
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "ec2:DescribeAccountAttributes"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": [
                "elasticbeanstalk:CreateApplication",
                "elasticbeanstalk:DeleteApplication",
                "elasticbeanstalk:DescribeApplications",
                "elasticbeanstalk:ListAvailableSolutionStacks",
                "elasticbeanstalk:ListTagsForResource",
                "elasticbeanstalk:UpdateApplicationResourceLifecycle"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor2",
            "Effect": "Allow",
            "Action": [
                "s3:GetBucketLocation",
                "s3:ListBucket"
            ],
            "Resource": "*"
        }
    ]
})
}

Related Projects

Check out these related projects.

Help

Got a question?

File a GitHub issue.

Contribute

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or file feature requests.

Copyrights

Copyright © 2019-2022 James Woolfenden

License

License

See LICENSE for full details.

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.

Contributors

James Woolfenden
James Woolfenden