Skip to content

Commit

Permalink
Update CloudFormation client
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper committed Jun 5, 2018
1 parent 3fddae5 commit 5cae6a9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 25 deletions.
20 changes: 7 additions & 13 deletions pkg/eks/cfn.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ func (c *ClusterProvider) stackNameVPC() string {
return "EKS-" + c.cfg.ClusterName + "-VPC"
}

func (c *ClusterProvider) stackParamsVPC() map[string]string {
return map[string]string{
"ClusterName": c.cfg.ClusterName,
}
}

func (c *ClusterProvider) createStackVPC(errs chan error) error {
name := c.stackNameVPC()
logger.Info("creating VPC stack %q", name)
Expand All @@ -146,7 +140,7 @@ func (c *ClusterProvider) createStackVPC(errs chan error) error {
stackChan := make(chan Stack)
taskErrs := make(chan error)

if err := c.CreateStack(name, templateBody, c.stackParamsVPC(), false, stackChan, taskErrs); err != nil {
if err := c.CreateStack(name, templateBody, nil, false, stackChan, taskErrs); err != nil {
return err
}

Expand All @@ -163,23 +157,23 @@ func (c *ClusterProvider) createStackVPC(errs chan error) error {

logger.Debug("created VPC stack %q – processing outputs", name)

securityGroup := GetOutput(&s, "SecurityGroup")
securityGroup := GetOutput(&s, "SecurityGroups")
if securityGroup == nil {
errs <- fmt.Errorf("SecurityGroup is nil")
errs <- fmt.Errorf("SecurityGroups is nil")
return
}
c.cfg.securityGroup = *securityGroup

subnetsList := GetOutput(&s, "SubnetsList")
subnetsList := GetOutput(&s, "SubnetIds")
if subnetsList == nil {
errs <- fmt.Errorf("SubnetsList is nil")
errs <- fmt.Errorf("SubnetIds is nil")
return
}
c.cfg.subnetsList = *subnetsList

clusterVPC := GetOutput(&s, "ClusterVPC")
clusterVPC := GetOutput(&s, "VpcId")
if clusterVPC == nil {
errs <- fmt.Errorf("ClusterVPC is nil")
errs <- fmt.Errorf("VpcId is nil")
return
}
c.cfg.clusterVPC = *clusterVPC
Expand Down
Loading

0 comments on commit 5cae6a9

Please sign in to comment.