Documentation ¶
Index ¶
- Constants
- Variables
- func BuildNLBTemplateFromIngressRule(cfg *TemplateConfig) *cfn.Template
- func DeleteComplete(status string) bool
- func DescribeStack(cfnSvc cloudformationiface.CloudFormationAPI, stackName string) (*cloudformation.Stack, error)
- func GetResourceID(cfnSvc cloudformationiface.CloudFormationAPI, stackName string, ...) (string, error)
- func IsComplete(status string) bool
- func IsDeleting(status string) bool
- func IsDoesNotExist(err error, stackName string) bool
- func IsFailed(status string) bool
- func IsPending(status string) bool
- func StackDoesNotExist(err error) bool
- func StackOutputMap(stack *cloudformation.Stack) map[string]string
- type APIKey
- type APIResource
- type AllPrinciplesPolicyDocument
- type AllPrinciplesStatement
- type MethodThrottlingParametersObject
- type Output
- type Param
- type PolicyDocument
- type Statement
- type TemplateConfig
- type UsagePlan
Constants ¶
const ( AWSStackName = "AWS::StackName" AWSRegion = "AWS::Region" LoadBalancerResourceName = "LoadBalancer" ListnerResourceName = "Listener" SecurityGroupIngressResourceName = "SecurityGroupIngress" TargetGroupResourceName = "TargetGroup" OutputKeyIngressRules = "IngressRules" OutputKeyNLBEndpoint = "NLBHostName" )
const is constance values for resource naming used to build cf templates
Variables ¶
var CompleteStatuses = []string{ cloudformation.StackStatusCreateComplete, cloudformation.StackStatusUpdateComplete, cloudformation.StackStatusDeleteComplete, cloudformation.StackStatusUpdateRollbackComplete, }
CompleteStatuses contains all CloudFormation status strings that we consider to be complete for a vpn
var FailedStatuses = []string{ cloudformation.StackStatusCreateFailed, cloudformation.StackStatusRollbackComplete, cloudformation.StackStatusRollbackFailed, cloudformation.StackStatusUpdateRollbackFailed, cloudformation.StackStatusDeleteFailed, }
FailedStatuses contains all CloudFormation status strings that we consider to be failed for a vpn
var PendingStatuses = []string{ cloudformation.StackStatusCreateInProgress, cloudformation.StackStatusDeleteInProgress, cloudformation.StackStatusRollbackInProgress, cloudformation.StackStatusUpdateCompleteCleanupInProgress, cloudformation.StackStatusUpdateInProgress, cloudformation.StackStatusUpdateRollbackCompleteCleanupInProgress, cloudformation.StackStatusUpdateRollbackInProgress, cloudformation.StackStatusReviewInProgress, }
PendingStatuses contains all CloudFormation status strings that we consider to be pending for a vpn
Functions ¶
func BuildNLBTemplateFromIngressRule ¶
func BuildNLBTemplateFromIngressRule(cfg *TemplateConfig) *cfn.Template
BuildNLBTemplateFromIngressRule generates the cloudformation template according to the config provided
func DeleteComplete ¶
func DescribeStack ¶
func DescribeStack(cfnSvc cloudformationiface.CloudFormationAPI, stackName string) (*cloudformation.Stack, error)
func GetResourceID ¶
func GetResourceID(cfnSvc cloudformationiface.CloudFormationAPI, stackName string, logicalID string) (string, error)
func IsComplete ¶
IsComplete tests if the specified string is considered a completed cloudformation stack state
func IsDeleting ¶
IsDeleting tests if the stack status is DELETE_IN_PROGRESS
func IsDoesNotExist ¶
func IsFailed ¶
IsFailed tests if the specified string is considered a failed cloudformation stack state
func IsPending ¶
IsPending tests if the specified string is considered a pending cloudformation stack state
func StackDoesNotExist ¶
StackDoesNotExist Checks if the error recieved for DescribeStacks denotes if the stack is non exsistent
func StackOutputMap ¶
func StackOutputMap(stack *cloudformation.Stack) map[string]string
Types ¶
type APIResource ¶
type AllPrinciplesPolicyDocument ¶
type AllPrinciplesPolicyDocument struct { Version string `json:"Version"` Statement []AllPrinciplesStatement `json:"Statement"` }
type AllPrinciplesStatement ¶
type PolicyDocument ¶
type TemplateConfig ¶
type TemplateConfig struct { Network *network.Network Rule extensionsv1beta1.IngressRule NodePort int }
TemplateConfig is the structure of configuration used to provide data to build the cf template
type UsagePlan ¶
type UsagePlan struct { PlanName string `json:"plan_name"` Description string `json:"description"` APIKeys []APIKey `json:"api_keys"` QuotaLimit int `json:"quota_limit"` QuotaOffset int `json:"quota_offset"` QuotaPeriod string `json:"quota_period"` ThrottleBurstLimit int `json:"throttle_burst_limit"` ThrottleRateLimit float64 `json:"throttle_rate_limit"` MethodThrottlingParameters []MethodThrottlingParametersObject `json:"method_throttling_parameters"` }