Skip to content

Ansible role to delete an AWS VPC and it's dependencies.

Notifications You must be signed in to change notification settings

ansible-cloud/aws-vpc-delete

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delete AWS VPC

This role will delete an existing AWS VPC and it's components including:

  • Peering Connection(s)
  • Internet Gateway
  • NAT Gateway(s)
  • Route Table(s)
  • Subnet(s)

Requirements

pip install ansible boto3 boto

Variables

aws_vpc_delete:
  profile: "default"            # The aws credentials file profile name.
  name: "test-1"                # Name of the vpc you want to delete.
  region: "eu-central-1"        # AWS region.
  release_elastic_ip: "yes"     # Release elastic ip address(es) for any NAT gateway(s).

Example Usage

Add the following to a file like playbook.yaml:

- hosts: localhost
  roles:
    - role: "mateothegreat.aws_vpc_delete"
      vars:
        aws_vpc_delete:
          profile: "default"            # The aws credentials file profile name.
          name: "test-1"                # Name of the vpc you want to delete.
          region: "eu-central-1"        # AWS region.
          release_elastic_ip: "yes"     # Release elastic ip address(es) for any NAT gateway(s).

Run with ansible-playbook -i <your inventory file> playbook.yaml.

About

Ansible role to delete an AWS VPC and it's dependencies.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jinja 100.0%