App Data Bag (aws_opsworks_app) - AWS OpsWorks

App Data Bag (aws_opsworks_app)


AWS OpsWorks Stacks is no longer accepting new customers. Existing customers will be able to use the OpsWorks console, API, CLI, and CloudFormation resources as normal until May 26, 2024, at which time they will be discontinued. To prepare for this transition, we recommend you transition your stacks to AWS Systems Manager as soon as possible. For more information, see AWS OpsWorks Stacks End of Life FAQs and Migrating your AWS OpsWorks Stacks applications to AWS Systems Manager Application Manager.

For a Deploy event or an Execute Recipes stack command, represents an app's settings.

The following example shows how to use Chef search to search through a single data bag item and then multiple data bag items to write messages to the Chef log with the apps' short names and source URLs:

app = search("aws_opsworks_app").first"********** The app's short name is '#{app['shortname']}' **********")"********** The app's URL is '#{app['app_source']['url']}' **********") search("aws_opsworks_app").each do |app|"********** The app's short name is '#{app['shortname']}' **********")"********** The app's URL is '#{app['app_source']['url']}' **********") end

The app ID (string). A GUID that identifies the app.


A set of content that specifies the information that AWS OpsWorks Stacks uses to deploy the app from its source control repository. The content varies depending on the repository type.


The password for private repositories, and "null" for public repositories (string). For private S3 buckets, this content is set to the secret key.


If the repository has multiple branches, the content specifies the app's branch or version, such as "version1" (string). Otherwise, it is set to "null".


A deploy SSH key for accessing private Git repositories, and "null" for public repositories (string).


The app's source location (string). Valid values include:

  • "archive"

  • "git"

  • "other"

  • "s3"


Where the app source is located (string).


The user name for private repositories, and "null" for public repositories (string). For private S3 buckets, the content is set to the access key.


A set of content that describes the directory structure and content of the app.


The root directory of the document tree. Defines the path to the document root–or the location of the app's home page, such as home_html–that is relative to your deployment directory. Unless this attribute is specified, the document_root defaults to public. The value of document_root can start only with a-z, A-Z, 0-9, _ (underscore) or - (hyphen) characters.


The information required to connect to the app's database. If the app has an attached database layer, AWS OpsWorks Stacks automatically assigns the appropriate values to this content.

The value of data_sources is an array, and arrays are accessed by an integral offset, not by key. For example, to access the app's first data source, use app[:data_sources][0][:type].


The database name, which is typically the app's short name (string).


The database instance's type, typically "RdsDbInstance" (string).


The database instance's Amazon Resource Name (ARN) (string).


Whether the app should be deployed (Boolean). true for apps that should be deployed in a Deploy lifecycle event. In a Setup lifecycle event, this content will be true for all apps. To determine which apps should be deployed on an instance, check the layers to which the instance belongs.


A list of the app's domains (list of strings).


Whether SSL support is enabled (Boolean).


A collection of user-specified environment variables that have been defined for the app. For more information about how to define an app's environment variables, see Adding Apps. Each content name is set to an environment variable name and the corresponding value is set to the variable's value.


The app's name, which is used for display purposes (string).


The app's short name, which is generated by AWS OpsWorks Stacks from the name (string). The shortname is used internally and by recipes; it is used as the name of the directory where your app files are installed.


If you enabled SSL support, the app's SSL certificate; otherwise, "null" (string).


If SSL is enabled, content for specifying an intermediate certificate authority key or client authentication (string).


If you enabled SSL support, the app's SSL private key; otherwise, "null" (string).


The app's type, which is always set to "other" for Chef 12 Linux and Chef 12.2 Windows stacks (string).