Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::OpsWorks::App

Defines an AWS OpsWorks app for an AWS OpsWorks stack. The app specifies the code that you want to run on an application server.

Syntax

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

JSON

Copy
{ "Type": "AWS::OpsWorks::App", "Properties": { "AppSource" : Source, "Attributes" : { String:String, ... }, "DataSources" : [ DataSource, ... ], "Description" : String, "Domains" : [ String, ... ], "EnableSsl" : Boolean, "Environment" : [ Environment, ... ], "Name" : String, "Shortname" : String, "SslConfiguration" : { SslConfiguration }, "StackId" : String, "Type" : String } }

YAML

Copy
Type: "AWS::OpsWorks::App" Properties: AppSource: Source Attributes: String: String Description: String DataSources: - DataSource Domains: - String EnableSsl: Boolean Environment: - Environment Name: String Shortname: String SslConfiguration: SslConfiguration StackId: String Type: String

Properties

AppSource

The information required to retrieve an app from a repository.

Required: No

Type: AWS OpsWorks Source Type

Update requires: No interruption

Attributes

One or more user-defined key-value pairs to be added to the app attributes bag.

Required: No

Type: A list of key-value pairs

Update requires: No interruption

Description

A description of the app.

Required: No

Type: String

Update requires: No interruption

DataSources

A list of databases to associate with the AWS OpsWorks app.

Required: No

Type: List of AWS OpsWorks App DataSource

Update requires: No interruption

Domains

The app virtual host settings, with multiple domains separated by commas. For example, 'www.example.com, example.com'.

Required: No

Type: List of String values

Update requires: No interruption

EnableSsl

Whether to enable SSL for this app.

Required: No

Type: Boolean

Update requires: No interruption

Environment

The environment variables to associate with the AWS OpsWorks app.

Required: No

Type: List of AWS OpsWorks App Environment

Update requires: No interruption

Name

The name of the AWS OpsWorks app.

Required: Yes

Type: String

Update requires: No interruption

Shortname

The app short name, which is used internally by AWS OpsWorks and by Chef recipes.

Required: No

Type: String

Update requires: Replacement

SslConfiguration

The SSL configuration

Required: No

Type: AWS OpsWorks SslConfiguration Type

Update requires: No interruption

StackId

The ID of the AWS OpsWorks stack to associate this app with.

Required: Yes

Type: String

Update requires: Replacement

Type

The app type. Each supported type is associated with a particular layer. For more information, see CreateApp in the AWS OpsWorks Stacks API Reference.

Required: Yes

Type: String

Update requires: No interruption

Return Values

Ref

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

Copy
{ "Ref": "myApp" }

For the AWS OpsWorks stack myApp, Ref returns the ID of the AWS OpsWorks app.

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

Template Snippet

The following snippet creates an AWS OpsWorks app that uses a PHP application in a Git repository:

JSON

Copy
"myApp" : { "Type" : "AWS::OpsWorks::App", "Properties" : { "StackId" : {"Ref":"myStack"}, "Type" : "php", "Name" : "myPHPapp", "AppSource" : { "Type" : "git", "Url" : "git://github.com/amazonwebservices/opsworks-demo-php-simple-app.git", "Revision" : "version1" } } }

YAML

Copy
myApp: Type: "AWS::OpsWorks::App" Properties: StackId: Ref: "myStack" Type: "php" Name: "myPHPapp" AppSource: Type: "git" Url: "git://github.com/amazonwebservices/opsworks-demo-php-simple-app.git" Revision: "version1"

More Info