steampunk.aws.ec2_internet_gateway_info (0.9.0) — module

List EC2 Internet Gateways

Authors: Manca Bizjak (@mancabizjak), Aljaz Kosir (@aljazkosir), Saso Stanovnik (@sstanovnik), Miha Dolinar (@mdolinar), Tadej Borovsak (@tadeboro)

preview | supported by XLAB Steampunk

Install collection

Install with ansible-galaxy collection install steampunk.aws:==0.9.0


Add to requirements.yml

  collections:
    - name: steampunk.aws
      version: 0.9.0

Description

Retrieve information about AWS EC2 Internet Gateways.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List all internet gateways in the region
  ec2_internet_gateway_info:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List only specific internet gateways
  ec2_internet_gateway_info:
    ids:
      - igw-13a244t23
      - igw-a862nf0sd
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List the internet gateway attached to a VPC
  ec2_internet_gateway_info:
    vpc: vpc-2jdb5kd83fs

Inputs

    
ids:
    description:
    - Perform the operation for the specified resources.
    elements: str
    type: list

vpc:
    description:
    - ID of the VPC to which the internet gateway is attached.
    type: str

auth:
    description:
    - Parameters for authenticating with the AWS service. Each of them may be defined
      via environment variables.
    suboptions:
      access_key:
        description:
        - The AWS access key ID. If not set, the value of the AWS_ACCESS_KEY environment
          variable will be checked.
        - Mutually exclusive with I(profile).
        required: false
        type: str
      profile:
        description:
        - The name of the AWS profile configured with C(aws configure).
        - Can be used instead of explicitly specifying your access credentials and region.
        - Use C(default) to use the default profile.
        - Mutually exclusive with I(access_key) and I(secret_key).
        required: false
        type: str
      region:
        description:
        - The name of the AWS region.
        - If not set, the value of the AWS_REGION environment variable will be checked.
        - If you set a I(profile) that specifies a default region, that region is used
          and you can omit this parameter. Use this parameter to override the profile's
          default region.
        type: str
      secret_key:
        description:
        - The AWS secret access key. If not set, the value of the AWS_SECRET_KEY environment
          variable will be checked.
        - Mutually exclusive with I(profile).
        required: false
        type: str
      url:
        description:
        - The URL to the AWS service related to the resource. By default, this is automatically
          determined through the region parameter.
        - If not set explicitly, the value of the AWS_<SERVICE>_URL environment variable
          will be used.
        - The services currently supported are EC2 and S3.
        required: false
        type: str
    type: dict

names:
    description:
    - Limit the results to the resources with specified names.
    elements: str
    type: list

filters:
    description:
    - Filters to use when querying AWS resources. They must be provided as key/value pairs.
    - Keys and values are case-sensitive and must be strings.
    - Each key can have multiple values, provided as a list. Within these values, I(any)
      value must match for the AWS resource to be included.
    - When multiple filters are provided, the result contains AWS resources matching I(all)
      of them.
    - If a filter is specified in C(filters) and also in another top-level parameter,
      the filter in the top-level parameter has precedence. The two are not merged.
    - If a module accepts a top-level parameter for querying the AWS resources, and you
      also specify the filter it corresponds to via C(filters), the top-level parameter
      has precedence.
    type: dict

Outputs

objects:
  contains:
    id:
      description: ID of the internet gateway
      returned: always
      sample: igw-841b9271gd
      type: str
    tags:
      description: Tags associated with the internet gateway.
      returned: always
      sample:
        Name: my-gateway
        environment: staging
      type: dict
    vpc:
      description: ID of the VPC the internet gateway is attached to, or None.
      returned: always
      sample: vpc-2w7hs924hs
      type: str
  description:
  - A list of objects representing EC2 Internet Gateways.
  returned: success
  type: list

See also