Skip to content

Commit

Permalink
Made the necessary changes to ensure the variable name represents rig…
Browse files Browse the repository at this point in the history
…ht value.
  • Loading branch information
Srikalyan Swayampakula committed Feb 13, 2016
1 parent f21dc99 commit 345dbce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builtin/providers/aws/resource_aws_sns_topic_subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"log"
"strings"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/helper/schema"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/sns"
"github.com/hashicorp/terraform/helper/resource"
"time"
)

Expand Down Expand Up @@ -188,7 +188,7 @@ func subscribeToSNSTopic(d *schema.ResourceData, snsconn *sns.SNS) (output *sns.
endpoint := d.Get("endpoint").(string)
topic_arn := d.Get("topic_arn").(string)
endpoint_auto_confirms := d.Get("endpoint_auto_confirms").(bool)
confirmation_timeout_in_minutes := time.Duration(d.Get("confirmation_timeout_in_minutes").(int))
confirmation_timeout_in_minutes := d.Get("confirmation_timeout_in_minutes").(int)

if strings.Contains(protocol, "http") && !endpoint_auto_confirms {
return nil, fmt.Errorf("Protocol http/https is only supported for endpoints which auto confirms!")
Expand All @@ -213,7 +213,7 @@ func subscribeToSNSTopic(d *schema.ResourceData, snsconn *sns.SNS) (output *sns.

log.Printf("[DEBUG] SNS create topic subscription is pending so fetching the subscription list for topic : %s (%s) @ '%s'", endpoint, protocol, topic_arn)

err = resource.Retry(time.Minute*confirmation_timeout_in_minutes, func() error {
err = resource.Retry(time.Duration(int(time.Minute)*confirmation_timeout_in_minutes), func() error {

subscription, err := findSubscriptionByNonID(d, snsconn)

Expand Down

0 comments on commit 345dbce

Please sign in to comment.