2015-10-08 21:58:03 +02:00
|
|
|
---
|
|
|
|
layout: "aws"
|
|
|
|
page_title: "AWS: aws_placement_group"
|
|
|
|
sidebar_current: "docs-aws-resource-placement-group"
|
|
|
|
description: |-
|
|
|
|
Provides an EC2 placement group.
|
|
|
|
---
|
|
|
|
|
|
|
|
# aws\_placement\_group
|
|
|
|
|
|
|
|
Provides an EC2 placement group. Read more about placement groups
|
2016-01-14 21:55:39 +01:00
|
|
|
in [AWS Docs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html).
|
2015-10-08 21:58:03 +02:00
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
```
|
|
|
|
resource "aws_placement_group" "web" {
|
|
|
|
name = "hunky-dory-pg"
|
|
|
|
strategy = "cluster"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `name` - (Required) The name of the placement group.
|
|
|
|
* `strategy` - (Required) The placement strategy. The only supported value is `cluster`
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The name of the placement group.
|
2016-07-21 00:28:59 +02:00
|
|
|
|
|
|
|
## Import
|
|
|
|
|
|
|
|
Placement groups can be imported using the `name`, e.g.
|
|
|
|
|
|
|
|
```
|
|
|
|
$ terraform import aws_placement_group.prod_pg production-placement-group
|
|
|
|
```
|