App Data Bag (aws_opsworks_app) - AWS OpsWorks

App Data Bag (aws_opsworks_app)

Important

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 Chef::Log.info("********** The app's short name is '#{app['shortname']}' **********") Chef::Log.info("********** The app's URL is '#{app['app_source']['url']}' **********") search("aws_opsworks_app").each do |app| Chef::Log.info("********** The app's short name is '#{app['shortname']}' **********") Chef::Log.info("********** The app's URL is '#{app['app_source']['url']}' **********") end
app_id

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

app_source

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.

password

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

revision

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".

ssh_key

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

type

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

  • "archive"

  • "git"

  • "other"

  • "s3"

url

Where the app source is located (string).

user

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

attributes

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

document_root

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.

data_sources

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].

database_name

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

type

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

arn

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

deploy

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.

domains

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

enable_ssl

Whether SSL support is enabled (Boolean).

environment

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.

name

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

shortname

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.

ssl_configuration
certificate

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

chain

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

private_key

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

type

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