github.com/adrian-bl/terraform@v0.7.0-rc2.0.20160705220747-de0a34fc3517/website/source/docs/providers/aws/r/opsworks_application.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_opsworks_aplication"
     4  sidebar_current: "docs-aws-resource-opsworks-application"
     5  description: |-
     6    Provides an OpsWorks application resource.
     7  ---
     8  
     9  # aws\_opsworks\_application
    10  
    11  Provides an OpsWorks application resource.
    12  
    13  ## Example Usage
    14  
    15  ```
    16  resource "aws_opsworks_application" "foo-app" {
    17    name = "foobar application"
    18    short_name = "foobar"
    19    stack_id = "${aws_opsworks_stack.stack.id}"
    20    type = "rails"
    21    description = "This is a Rails application"
    22    domains = [
    23      "example.com",
    24      "sub.example.com"
    25    ]
    26    environment = {
    27      key = "key"
    28      value = "value"
    29      secure = false
    30    }
    31    app_source = {
    32      type = "git"
    33      revision = "master"
    34      url = "https://github.com/example.git"
    35    }
    36    enable_ssl = true
    37    ssl_configuration = {
    38      private_key = "${file("./foobar.key")}"
    39      certificate = "${file("./foobar.crt")}"
    40    }
    41    document_root = "public"
    42    auto_bundle_on_deploy = true
    43    rails_env = "staging"
    44  }
    45  ```
    46  
    47  ## Argument Reference
    48  
    49  The following arguments are supported:
    50  
    51  * `name` - (Required) A human-readable name for the application.
    52  * `short_name` - (Required) A short, machine-readable name for the application. This can only be defined on resource creation and ignored on resource update.
    53  * `stack_id` - (Required) The id of the stack the application will belong to.
    54  * `type` - (Required) Opsworks application type. One of `aws-flow-ruby`, `java`, `rails`, `php`, `nodejs`, `static` or `other`.
    55  * `description` - (Optional) A description of the app.
    56  * `environment` - (Optional) Object to define environment variables.  Object is described below.
    57  * `enable_ssl` - (Optional) Whether to enable SSL for the app. This must be set in order to let `ssl_configuration.private_key`, `ssl_configuration.certificate` and `ssl_configuration.chain` take effect.
    58  * `ssl_configuration` - (Optional) The SSL configuration of the app. Object is described below.
    59  * `app_source` - (Optional) SCM configuration of the app as described below.
    60  * `data_source_arn` - (Optional) The data source's ARN.
    61  * `data_source_type` - (Optional) The data source's type one of `AutoSelectOpsworksMysqlInstance`, `OpsworksMysqlInstance`, or `RdsDbInstance`.
    62  * `data_source_database_name` - (Optional) The database name.
    63  * `domains` -  (Optional) A list of virtual host alias.
    64  * `document_root` - (Optional) Subfolder for the document root for application of type `rails`.
    65  * `auto_bundle_on_deploy` - (Optional) Run bundle install when deploying for application of type `rails`.
    66  * `rails_env` - (Required if `type` = `rails`) The name of the Rails environment for application of type `rails`.
    67  * `aws_flow_ruby_settings` - (Optional) Specify activity and workflow workers for your app using the aws-flow gem.
    68  
    69  An `app_source` block supports the following arguments (can only be defined once per resource):
    70  
    71  * `type` - (Required) The type of source to use. For example, "archive".
    72  * `url` - (Required) The URL where the app resource can be found.
    73  * `username` - (Optional) Username to use when authenticating to the source.
    74  * `password` - (Optional) Password to use when authenticating to the source.
    75  * `ssh_key` - (Optional) SSH key to use when authenticating to the source.
    76  * `revision` - (Optional) For sources that are version-aware, the revision to use.
    77  
    78  An `environment` block supports the following arguments:
    79  
    80  * `key` - (Required) Variable name.
    81  * `value` - (Required) Variable value.
    82  * `secret` - (Optional) Set visibility of the variable value to `true` or `false`.
    83  
    84  A `ssl_configuration` block supports the following arguments (can only be defined once per resource):
    85  
    86  * `private_key` - (Required) The private key; the contents of the certificate's domain.key file.
    87  * `certificate` - (Required) The contents of the certificate's domain.crt file.
    88  * `chain` - (Optional)  Can be used to specify an intermediate certificate authority key or client authentication.
    89  
    90  ## Attributes Reference
    91  
    92  The following attributes are exported:
    93  
    94  * `id` - The id of the application.