From 285a88b6643b8832b049567f5c9050fc2e69cd91 Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Thu, 18 Jun 2015 08:28:38 -0500 Subject: [PATCH] code cleanups --- builtin/providers/aws/resource_aws_flow_log.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/builtin/providers/aws/resource_aws_flow_log.go b/builtin/providers/aws/resource_aws_flow_log.go index 43e1bb25c..e59ab8f27 100644 --- a/builtin/providers/aws/resource_aws_flow_log.go +++ b/builtin/providers/aws/resource_aws_flow_log.go @@ -5,8 +5,8 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -102,6 +102,9 @@ func resourceAwsLogFlowCreate(d *schema.ResourceData, meta interface{}) error { ResourceType: aws.String(resourceType), TrafficType: aws.String(d.Get("traffic_type").(string)), } + + log.Printf( + "[DEBUG] Flow Log Create configuration: %s", awsutil.StringValue(opts)) resp, err := conn.CreateFlowLogs(opts) if err != nil { return fmt.Errorf("Error creating Flow Log for (%s), error: %s", resourceId, err) @@ -149,6 +152,9 @@ func resourceAwsLogFlowRead(d *schema.ResourceData, meta interface{}) error { func resourceAwsLogFlowDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn + + log.Printf( + "[DEBUG] Flow Log Destroy: %s", d.Id()) _, err := conn.DeleteFlowLogs(&ec2.DeleteFlowLogsInput{ FlowLogIDs: []*string{aws.String(d.Id())}, }) @@ -159,9 +165,3 @@ func resourceAwsLogFlowDelete(d *schema.ResourceData, meta interface{}) error { return nil } - -func flowLogStateRefreshFunc(conn *ec2.EC2, sn string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - return nil, "ok", nil - } -}