PARALLAX

ecs_cluster

Create or terminate ECS clusters

Collection: community.aws

Full Name: community.aws.ecs_cluster

Synopsis

Create or terminate ECS clusters

Parameters

NameTypeRequiredDefaultDescription
access_keystr
aws_ca_bundlepath
aws_configdict
capacity_provider_strategylist
capacity_providerslist
debug_botocore_endpoint_logsboolfalse
delayint10
endpoint_urlstr
namestryes
profilestr
purge_capacity_providersbooltrue
regionstr
repeatint10
secret_keystr
session_tokenstr
statestryes
validate_certsbooltrue

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
Search
    ↑ ↓ move↵ openesc close