Add docs for new AWS ECS resources
This commit is contained in:
parent
ebaa9bde2a
commit
c3fcdfc6eb
|
@ -0,0 +1,32 @@
|
||||||
|
---
|
||||||
|
layout: "aws"
|
||||||
|
page_title: "AWS: aws_ecs_cluster"
|
||||||
|
sidebar_current: "docs-aws-resource-ecs-cluster"
|
||||||
|
description: |-
|
||||||
|
Provides an ECS cluster.
|
||||||
|
---
|
||||||
|
|
||||||
|
# aws\_ecs\_cluster
|
||||||
|
|
||||||
|
Provides an ECS cluster.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
resource "aws_ecs_cluster" "foo" {
|
||||||
|
name = "white-hart"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
The following arguments are supported:
|
||||||
|
|
||||||
|
* `name` - (Required) The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)
|
||||||
|
|
||||||
|
## Attributes Reference
|
||||||
|
|
||||||
|
The following attributes are exported:
|
||||||
|
|
||||||
|
* `name` - The name of the cluster
|
||||||
|
* `id` - The Amazon Resource Name (ARN) that identifies the cluster
|
|
@ -0,0 +1,59 @@
|
||||||
|
---
|
||||||
|
layout: "aws"
|
||||||
|
page_title: "AWS: aws_ecs_service"
|
||||||
|
sidebar_current: "docs-aws-resource-ecs-service"
|
||||||
|
description: |-
|
||||||
|
Provides an ECS service.
|
||||||
|
---
|
||||||
|
|
||||||
|
# aws\_ecs\_service
|
||||||
|
|
||||||
|
Provides an ECS service - effectively a task that is expected to run until an error occures or user terminates it (typically a webserver or a database).
|
||||||
|
|
||||||
|
See [ECS Services section in AWS developer guide](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html).
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
resource "aws_ecs_service" "mongo" {
|
||||||
|
name = "mongodb"
|
||||||
|
cluster = "${aws_ecs_cluster.foo.id}"
|
||||||
|
task_definition = "${aws_ecs_task_definition.mongo.arn}"
|
||||||
|
desired_count = 3
|
||||||
|
iam_role = "${aws_iam.foo.id}"
|
||||||
|
|
||||||
|
load_balancer {
|
||||||
|
elb_name = "${aws_elb.foo.id}"
|
||||||
|
container_name = "mongo"
|
||||||
|
container_port = 8080
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
The following arguments are supported:
|
||||||
|
|
||||||
|
* `name` - (Required) The name of the service (up to 255 letters, numbers, hyphens, and underscores)
|
||||||
|
* `task_definition` - (Required) The family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service.
|
||||||
|
* `desired_count` - (Required) The number of instances of the task definition to place and keep running
|
||||||
|
* `cluster` - (Optional) ARN of an ECS cluster
|
||||||
|
* `iam_role` - (Optional) IAM role that allows your Amazon ECS container agent to make calls to your load balancer on your behalf. This parameter is only required if you are using a load balancer with your service.
|
||||||
|
* `load_balancer` - (Optional) A load balancer block. Load balancers documented below.
|
||||||
|
|
||||||
|
Load balancers support the following:
|
||||||
|
|
||||||
|
* `elb_name` - (Required) The name of the load balancer.
|
||||||
|
* `container_name` - (Required) The name of the container to associate with the load balancer (as it appears in a container definition).
|
||||||
|
* `container_port` - (Required) The port on the container to associate with the load balancer.
|
||||||
|
|
||||||
|
|
||||||
|
## Attributes Reference
|
||||||
|
|
||||||
|
The following attributes are exported:
|
||||||
|
|
||||||
|
* `id` - The Amazon Resource Name (ARN) that identifies the service
|
||||||
|
* `name` - The name of the service
|
||||||
|
* `cluster` - The Amazon Resource Name (ARN) of cluster which the service runs on
|
||||||
|
* `iam_role` - The ARN of IAM role used for ELB
|
||||||
|
* `desired_count` - The number of instances of the task definition
|
|
@ -0,0 +1,50 @@
|
||||||
|
---
|
||||||
|
layout: "aws"
|
||||||
|
page_title: "AWS: aws_ecs_task_definition"
|
||||||
|
sidebar_current: "docs-aws-resource-ecs-task-definition"
|
||||||
|
description: |-
|
||||||
|
Provides an ECS task definition.
|
||||||
|
---
|
||||||
|
|
||||||
|
# aws\_ecs\_task\_definition
|
||||||
|
|
||||||
|
Provides an ECS task definition to be used in `aws_ecs_service`.
|
||||||
|
|
||||||
|
~> **NOTE:** There is currently no way to unregister
|
||||||
|
any previously registered task definition.
|
||||||
|
See related [thread in AWS forum](https://forums.aws.amazon.com/thread.jspa?threadID=170378&tstart=0).
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
resource "aws_ecs_task_definition" "jenkins" {
|
||||||
|
family = "jenkins"
|
||||||
|
container_definitions = "${file("task-definitions/jenkins.json")}"
|
||||||
|
|
||||||
|
volume {
|
||||||
|
name = "jenkins-home"
|
||||||
|
host_path = "/ecs/jenkins-home"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
The following arguments are supported:
|
||||||
|
|
||||||
|
* `family` - (Required) The family, unique name for your task definition.
|
||||||
|
* `container_definitions` - (Required) A list of container definitions in JSON format. See [AWS docs](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) for syntax.
|
||||||
|
* `volume` - (Optional) A volume block. Volumes documented below.
|
||||||
|
|
||||||
|
Volumes support the following:
|
||||||
|
|
||||||
|
* `name` - (Required) The name of the volume. This name is referenced in the `sourceVolume` parameter of container definition `mountPoints`.
|
||||||
|
* `host_path` - (Required) The path on the host container instance that is presented to the container.
|
||||||
|
|
||||||
|
## Attributes Reference
|
||||||
|
|
||||||
|
The following attributes are exported:
|
||||||
|
|
||||||
|
* `arn` - Full ARN of the task definition (including both `family` & `revision`)
|
||||||
|
* `family` - The family of the task definition.
|
||||||
|
* `revision` - The revision of the task in a particular family.
|
|
@ -41,6 +41,18 @@
|
||||||
<a href="/docs/providers/aws/r/ebs_volume.html">aws_ebs_volume</a>
|
<a href="/docs/providers/aws/r/ebs_volume.html">aws_ebs_volume</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-aws-resource-ecs-cluster") %>>
|
||||||
|
<a href="/docs/providers/aws/r/ecs_cluster.html">aws_ecs_cluster</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-aws-resource-ecs-service") %>>
|
||||||
|
<a href="/docs/providers/aws/r/ecs_service.html">aws_ecs_service</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-aws-resource-ecs-task-definition") %>>
|
||||||
|
<a href="/docs/providers/aws/r/ecs_task_definition.html">aws_ecs_task_definition</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-aws-resource-eip") %>>
|
<li<%= sidebar_current("docs-aws-resource-eip") %>>
|
||||||
<a href="/docs/providers/aws/r/eip.html">aws_eip</a>
|
<a href="/docs/providers/aws/r/eip.html">aws_eip</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in New Issue