Skip to content
This repository was archived by the owner on Jun 5, 2020. It is now read-only.
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

Provider ec2_vpc and ec2_vpc_routetable - Issue managing route tables #137

Open
@pjfoley

Description

@pjfoley

Hi,

Using the vpc-example provided in the repository I have been testing the VPC provider. Although the puppet code works it does surprising things which I would not expect. If I run:

ec2_vpc { 'sample-vpc':
  ensure       => present,
  region       => 'sa-east-1',
  cidr_block   => '10.0.0.0/16',
}

This creates a VPC and a route table both named sample-vpc. Looking through the aws-sdk-core manual it does not explicitly say it will create a route table but I assume this is correct behavior.

If it is correct behavior I would like to use this route table (sample-vpc) and add an additional route to it instead of creating a separate route table. For example (does not work):

ec2_vpc { 'sample-vpc':
  ensure       => present,
  region       => 'sa-east-1',
  cidr_block   => '10.0.0.0/16',
}

ec2_vpc_internet_gateway { 'sample-igw':
  ensure => present,
  region => 'sa-east-1',
  vpc    => 'sample-vpc',
}

#################
# The below will fail as there is already a sample-vpc route table created as part of the ec2_vpc type
#################
ec2_vpc_routetable { 'sample-vpc':
  ensure => present,
  region => 'sa-east-1',
  vpc    => 'sample-vpc',
  routes => [
    {
      destination_cidr_block => '10.0.0.0/16',
      gateway                => 'local'
    },{
      destination_cidr_block => '0.0.0.0/0',
      gateway                => 'sample-igw'
    },
  ],
}

However the routes property for the ec2_vpc_routetable type is read only once created and I am unable to add an additional route to an existing route table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions