AWS Elastic Beanstalk Configuration Template

This page shows how to write Terraform and CloudFormation for Elastic Beanstalk Configuration Template and write them securely.

aws_elastic_beanstalk_configuration_template (Terraform)

The Configuration Template in Elastic Beanstalk can be configured in Terraform with the resource name aws_elastic_beanstalk_configuration_template. The following sections describe 4 examples of how to use the resource and its parameters.

Example Usage from GitHub

beanstalk_application.tf#L8
resource "aws_elastic_beanstalk_configuration_template" "tf_template" {
  name                = "tf-test-template-config"
  application         = aws_elastic_beanstalk_application.tf_app_test.name
  solution_stack_name = "64bit Amazon Linux 2 v3.3.0 running Docker"
main.tf#L1
resource "aws_elastic_beanstalk_configuration_template" "configuration_template" {
  count = length(var.configuration_template)
  application         = element(var.application, lookup(var.configuration_template[count.index], "application_id"))
  name                = lookup(var.configuration_template[count.index], "name")
  description         = lookup(var.configuration_template[count.index], "description", null)
  environment_id      = lookup(var.configuration_template[count.index], "environment_id", null)
main.tf#L5
resource "aws_elastic_beanstalk_configuration_template" "mytemplate" {
  for_each            = toset(["app1", "app2"])
  name                = "app-type1-base"
  application         = each.value
  solution_stack_name = "64bit Amazon Linux 2015.09 v2.0.8"

main.tf#L7
resource "aws_elastic_beanstalk_configuration_template" "this" {
  application         = var.application
  description         = var.description
  environment_id      = var.environment_id
  name                = var.name
  solution_stack_name = var.solution_stack_name

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides an Elastic Beanstalk Configuration Template, which are associated with a specific application and are used to deploy different versions of the application with the same configuration settings.

AWS::ElasticBeanstalk::ConfigurationTemplate (CloudFormation)

The ConfigurationTemplate in ElasticBeanstalk can be configured in CloudFormation with the resource name AWS::ElasticBeanstalk::ConfigurationTemplate. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

Explanation in CloudFormation Registry

The AWS::ElasticBeanstalk::ConfigurationTemplate resource is an AWS Elastic Beanstalk resource type that specifies an Elastic Beanstalk configuration template, associated with a specific Elastic Beanstalk application. You define application configuration settings in a configuration template. You can then use the configuration template to deploy different versions of the application with the same configuration settings.

Note The Elastic Beanstalk console and documentation often refer to configuration templates as saved configurations. When you set configuration options in a saved configuration (configuration template), Elastic Beanstalk applies them with a particular precedence as part of applying options from multiple sources. For more information, see Configuration Options in the AWS Elastic Beanstalk Developer Guide.

Frequently asked questions

What is AWS Elastic Beanstalk Configuration Template?

AWS Elastic Beanstalk Configuration Template is a resource for Elastic Beanstalk of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Elastic Beanstalk Configuration Template?

For Terraform, the fredsilvas/terraform-aws-beanstalk, mikamakusa/terraform and heldersepu/hs-scripts source code examples are useful. See the Terraform Example section for further details.