ecs_cluster
Create or terminate ECS clusters
Collection: community.aws
Full Name: community.aws.ecs_cluster
Synopsis
Create or terminate ECS clusters
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| access_key | str | |||
| aws_ca_bundle | path | |||
| aws_config | dict | |||
| capacity_provider_strategy | list | |||
| capacity_providers | list | |||
| debug_botocore_endpoint_logs | bool | false | ||
| delay | int | 10 | ||
| endpoint_url | str | |||
| name | str | yes | ||
| profile | str | |||
| purge_capacity_providers | bool | true | ||
| region | str | |||
| repeat | int | 10 | ||
| secret_key | str | |||
| session_token | str | |||
| state | str | yes | ||
| validate_certs | bool | true |
Example
yaml
- name: Cluster creation
community.aws.ecs_cluster:
name: default
state: present
- name: Cluster creation with capacity providers and strategies.
community.aws.ecs_cluster:
name: default
state: present
capacity_providers:
- FARGATE
- FARGATE_SPOT
capacity_provider_strategy:
- capacity_provider: FARGATE
base: 1
weight: 1
- capacity_provider: FARGATE_SPOT
weight: 100
purge_capacity_providers: true
- name: Cluster deletion
community.aws.ecs_cluster:
name: default
state: absent
- name: Wait for register
community.aws.ecs_cluster:
name: "{{ new_cluster }}"
state: has_instances
delay: 10
repeat: 10
register: task_output