github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/r/opsworks_application.html.markdown (about)

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