ec2_carrier_gateway
Manage an AWS VPC Carrier gateway
Collection: community.aws
Full Name: community.aws.ec2_carrier_gateway
Synopsis
Manage an AWS VPC Carrier gateway
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| access_key | str | |||
| aws_ca_bundle | path | |||
| aws_config | dict | |||
| carrier_gateway_id | str | |||
| debug_botocore_endpoint_logs | bool | false | ||
| endpoint_url | str | |||
| profile | str | |||
| purge_tags | bool | true | ||
| region | str | |||
| secret_key | str | |||
| session_token | str | |||
| state | str | present | ||
| tags | dict | |||
| validate_certs | bool | true | ||
| vpc_id | str | yes |
Example
yaml
# Ensure that the VPC has an Carrier Gateway.
# The Carrier Gateway ID can be accessed via {{cagw.carrier_gateway_id}} for use in setting up Route tables etc.
- name: Create Carrier gateway
community.aws.ec2_carrier_gateway:
vpc_id: vpc-abcdefgh
state: present
register: cagw
- name: Create Carrier gateway with tags
community.aws.ec2_carrier_gateway:
vpc_id: vpc-abcdefgh
state: present
tags:
Tag1: tag1
Tag2: tag2
register: cagw
- name: Delete Carrier gateway
community.aws.ec2_carrier_gateway:
vpc_id: vpc-abcdefgh
carrier_gateway_id: "cagw-123"
state: absent
register: vpc_cagw_delete