A few tweaks to terraform output building

This commit is contained in:
Justin Santa Barbara 2016-12-12 10:36:04 -05:00
parent a97ab00788
commit 196038fe02
4 changed files with 9 additions and 3 deletions

View File

@ -86,7 +86,7 @@ func (e *DNSZone) findExisting(cloud awsup.AWSCloud) (*route53.HostedZone, error
} }
// Otherwise continue ... maybe the name was not an id after all... // Otherwise continue ... maybe the name was not an id after all...
} else { } else {
return nil, fmt.Errorf("error fetching DNS HostedZone %q: %v", *e.ID, err) return nil, fmt.Errorf("error fetching DNS HostedZone %q: %v", findID, err)
} }
} else { } else {
return response.HostedZone, nil return response.HostedZone, nil

View File

@ -362,9 +362,10 @@ func (_ *LoadBalancer) RenderTerraform(t *terraform.TerraformTarget, a, e, chang
elbName = e.Name elbName = e.Name
} }
internal := fi.StringValue(e.Scheme) == "internal"
tf := &terraformLoadBalancer{ tf := &terraformLoadBalancer{
Name: elbName, Name: elbName,
Internal: *e.Scheme == "internal", Internal: internal,
} }
for _, subnet := range e.Subnets { for _, subnet := range e.Subnets {

View File

@ -100,7 +100,6 @@ func (s *LoadBalancerAttachment) CheckChanges(a, e, changes *LoadBalancerAttachm
} }
func (_ *LoadBalancerAttachment) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *LoadBalancerAttachment) error { func (_ *LoadBalancerAttachment) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *LoadBalancerAttachment) error {
if e.AutoscalingGroup != nil && e.Instance == nil { if e.AutoscalingGroup != nil && e.Instance == nil {
request := &autoscaling.AttachLoadBalancersInput{} request := &autoscaling.AttachLoadBalancersInput{}
request.AutoScalingGroupName = e.AutoscalingGroup.Name request.AutoScalingGroupName = e.AutoscalingGroup.Name

View File

@ -24,6 +24,7 @@ import (
"github.com/golang/glog" "github.com/golang/glog"
"k8s.io/kops/upup/pkg/fi" "k8s.io/kops/upup/pkg/fi"
"k8s.io/kops/upup/pkg/fi/cloudup/awsup" "k8s.io/kops/upup/pkg/fi/cloudup/awsup"
"k8s.io/kops/upup/pkg/fi/cloudup/terraform"
) )
type LoadBalancerAccessLog struct { type LoadBalancerAccessLog struct {
@ -250,3 +251,8 @@ func (_ *LoadBalancerAttributes) RenderAWS(t *awsup.AWSAPITarget, a, e, changes
return nil return nil
} }
func (_ *LoadBalancerAttributes) RenderTerraform(t *terraform.TerraformTarget, a, e, changes *LoadBalancerAttributes) error {
glog.Warning("LoadBalancerAttributes RenderTerraform not implemented")
return nil
}