Resource: aws_opsworks_application

Provides an OpsWorks application resource.

Example Usage

resource "aws_opsworks_application" "foo-app" {
  name        = "foobar application"
  short_name  = "foobar"
  stack_id    = aws_opsworks_stack.main.id
  type        = "rails"
  description = "This is a Rails application"

  domains = [
    "example.com",
    "sub.example.com",
  ]

  environment {
    key    = "key"
    value  = "value"
    secure = false
  }

  app_source {
    type     = "git"
    revision = "master"
    url      = "https://github.com/example.git"
  }

  enable_ssl = true

  ssl_configuration {
    private_key = file("./foobar.key")
    certificate = file("./foobar.crt")
  }

  document_root         = "public"
  auto_bundle_on_deploy = true
  rails_env             = "staging"
}

Argument Reference

This resource supports the following arguments:

An app_source block supports the following arguments (can only be defined once per resource):

An environment block supports the following arguments:

A ssl_configuration block supports the following arguments (can only be defined once per resource):

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import Opsworks Application using the id. For example:

import {
  to = aws_opsworks_application.test
  id = "<id>"
}

Using terraform import, import Opsworks Application using the id. For example:

% terraform import aws_opsworks_application.test <id>