package route

import "github.com/oslokommune/okctl/pkg/cfn/components/route"

Package route knows how to create cloud formation for an EC2 VPC route

Index

Types

type Route

type Route struct {
	Type              string
	Number            int
	StoredName        string
	RouteTable        cfn.Referencer
	GatewayAttachment cfn.Namer
	InternetGateway   cfn.Referencer
	NatGateway        cfn.NameReferencer
}

Route stores required state for creating a cloud formation Route

func NewPrivate

func NewPrivate(number int, gatewayAttachment cfn.Namer, routeTable cfn.Referencer, natGateway cfn.NameReferencer) *Route

NewPrivate creates a private EC2 route, routing traffic to the NATGW

Specifies a route in a route table within a VPC.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

func NewPublic

func NewPublic(gatewayAttachment cfn.Namer, routeTable cfn.Referencer, internetGateway cfn.Referencer) *Route

NewPublic creates a Route EC2 route, routing traffic to the IGW

Specifies a route in a route table within a VPC.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html

func (*Route) Name

func (r *Route) Name() string

Name returns the name of the resource

func (*Route) Ref

func (r *Route) Ref() string

Ref returns a cloud formation intrinsic ref to the resource

func (*Route) Resource

func (r *Route) Resource() cloudformation.Resource

Resource returns the cloud formation route resource

Source Files

route.go

Version
v0.0.106 (latest)
Published
Oct 21, 2022
Platform
linux/amd64
Imports
4 packages
Last checked
11 hours ago

Tools for package owners.