AWS::ElasticBeanstalk::ConfigurationTemplate - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::ElasticBeanstalk::ConfigurationTemplate

The AWS::ElasticBeanstalk::ConfigurationTemplate resource is an Amazon 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 Amazon Elastic Beanstalk Developer Guide.

Syntax

To declare this entity in your Amazon CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::ElasticBeanstalk::ConfigurationTemplate", "Properties" : { "ApplicationName" : String, "Description" : String, "EnvironmentId" : String, "OptionSettings" : [ ConfigurationOptionSetting, ... ], "PlatformArn" : String, "SolutionStackName" : String, "SourceConfiguration" : SourceConfiguration } }

YAML

Type: AWS::ElasticBeanstalk::ConfigurationTemplate Properties: ApplicationName: String Description: String EnvironmentId: String OptionSettings: - ConfigurationOptionSetting PlatformArn: String SolutionStackName: String SourceConfiguration: SourceConfiguration

Properties

ApplicationName

The name of the Elastic Beanstalk application to associate with this configuration template.

Required: Yes

Type: String

Minimum: 1

Maximum: 100

Update requires: Replacement

Description

An optional description for this configuration.

Required: No

Type: String

Maximum: 200

Update requires: No interruption

EnvironmentId

The ID of an environment whose settings you want to use to create the configuration template. You must specify EnvironmentId if you don't specify PlatformArn, SolutionStackName, or SourceConfiguration.

Required: Conditional

Type: String

Update requires: Replacement

OptionSettings

Option values for the Elastic Beanstalk configuration, such as the instance type. If specified, these values override the values obtained from the solution stack or the source configuration template. For a complete list of Elastic Beanstalk configuration options, see Option Values in the Amazon Elastic Beanstalk Developer Guide.

Required: No

Type: Array of ConfigurationOptionSetting

Update requires: No interruption

PlatformArn

The Amazon Resource Name (ARN) of the custom platform. For more information, see Custom Platforms in the Amazon Elastic Beanstalk Developer Guide.

Note

If you specify PlatformArn, then don't specify SolutionStackName.

Required: No

Type: String

Update requires: Replacement

SolutionStackName

The name of an Elastic Beanstalk solution stack (platform version) that this configuration uses. For example, 64bit Amazon Linux 2013.09 running Tomcat 7 Java 7. A solution stack specifies the operating system, runtime, and application server for a configuration template. It also determines the set of configuration options as well as the possible and default values. For more information, see Supported Platforms in the Amazon Elastic Beanstalk Developer Guide.

You must specify SolutionStackName if you don't specify PlatformArn, EnvironmentId, or SourceConfiguration.

Use the ListAvailableSolutionStacks API to obtain a list of available solution stacks.

Required: Conditional

Type: String

Update requires: Replacement

SourceConfiguration

An Elastic Beanstalk configuration template to base this one on. If specified, Elastic Beanstalk uses the configuration values from the specified configuration template to create a new configuration.

Values specified in OptionSettings override any values obtained from the SourceConfiguration.

You must specify SourceConfiguration if you don't specify PlatformArn, EnvironmentId, or SolutionStackName.

Constraint: If both solution stack name and source configuration are specified, the solution stack of the source configuration template must match the specified solution stack name.

Required: Conditional

Type: SourceConfiguration

Update requires: Replacement

Return values

Ref

When the logical ID of this resource is provided to the Ref intrinsic function, Ref returns the resource name.

For more information about using the Ref function, see Ref.

Fn::GetAtt

TemplateName

The name of the configuration template.

Constraint: This name must be unique per application.

Examples

JSON

"myConfigTemplate" : { "Type" : "AWS::ElasticBeanstalk::ConfigurationTemplate", "Properties" : { "ApplicationName" :{"Ref" : "myApp"}, "Description" : "my sample configuration template", "EnvironmentId" : "", "SourceConfiguration" : { "ApplicationName" : {"Ref" : "mySecondApp"}, "TemplateName" : {"Ref" : "mySourceTemplate"} }, "SolutionStackName" : "64bit Amazon Linux running PHP 5.3", "OptionSettings" : [ { "Namespace" : "aws:autoscaling:launchconfiguration", "OptionName" : "EC2KeyName", "Value" : { "Ref" : "KeyName" } } ] } }

YAML

myConfigTemplate: Type: AWS::ElasticBeanstalk::ConfigurationTemplate Properties: ApplicationName: Ref: "myApp" Description: "my sample configuration template" EnvironmentId: "" SourceConfiguration: ApplicationName: Ref: "mySecondApp" TemplateName: Ref: "mySourceTemplate" SolutionStackName: "64bit Amazon Linux running PHP 5.3" OptionSettings: - Namespace: "aws:autoscaling:launchconfiguration" OptionName: "EC2KeyName" Value: Ref: "KeyName"

See also