github.com/recobe182/terraform@v0.8.5-0.20170117231232-49ab22a935b7/website/source/docs/providers/rancher/r/stack.html.markdown (about)

     1  ---
     2  layout: "rancher"
     3  page_title: "Rancher: rancher_stack"
     4  sidebar_current: "docs-rancher-resource-stack"
     5  description: |-
     6    Provides a Rancher Stack resource. This can be used to create and manage stacks on rancher.
     7  ---
     8  
     9  # rancher\_stack
    10  
    11  Provides a Rancher Stack resource. This can be used to create and manage stacks on rancher.
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  # Create a new empty Rancher stack
    17  resource "rancher_stack" "external-dns" {
    18    name = "route53"
    19    description = "Route53 stack"
    20    environment_id = "${rancher_environment.default.id}"
    21    catalog_id = "library:route53:7"
    22    scope = "system"
    23    environment {
    24      AWS_ACCESS_KEY = "MYKEY"
    25      AWS_SECRET_KEY = "MYSECRET"
    26      AWS_REGION = "eu-central-1"
    27      TTL = "60"
    28      ROOT_DOMAIN = "example.com"
    29      ROUTE53_ZONE_ID = ""
    30      HEALTH_CHECK_INTERVAL = "15"
    31    }
    32  }
    33  ```
    34  
    35  ## Argument Reference
    36  
    37  The following arguments are supported:
    38  
    39  * `name` - (Required) The name of the stack.
    40  * `description` - (Optional) A stack description.
    41  * `environment_id` - (Required) The ID of the environment to create the stack for.
    42  * `docker_compose` - (Optional) The `docker-compose.yml` content to apply for the stack.
    43  * `rancher_compose` - (Optional) The `rancher-compose.yml` content to apply for the stack.
    44  * `environment` - (Optional) The environment to apply to interpret the docker-compose and rancher-compose files.
    45  * `catalog_id` - (Optional) The catalog ID to link this stack to. When provided, `docker_compose` and `rancher_compose` will be retrieved from the catalog unless they are overridden.
    46  * `scope` - (Optional) The scope to attach the stack to. Must be one of **user** or **system**. Defaults to **user**.
    47  * `start_on_create` - (Optional) Whether to start the stack automatically.
    48  * `finish_upgrade` - (Optional) Whether to automatically finish upgrades to this stack.
    49  
    50  ## Attributes Reference
    51  
    52  The following attributes are exported:
    53  
    54  * `rendered_docker_compose` - The interpolated `docker_compose` applied to the stack.
    55  * `rendered_rancher_compose` - The interpolated `rancher_compose` applied to the stack.
    56  
    57  
    58  ## Import
    59  
    60  Stacks can be imported using their Rancher API ID, e.g.
    61  
    62  ```
    63  $ terraform import rancher_stack.foo 1e149
    64  ```