Skip to content

Commit

Permalink
Merge pull request #9470 from terraform-providers/b-aws_cloudfront_di…
Browse files Browse the repository at this point in the history
…stribution-CallerReference

resource/aws_cloudfront_distribution: Switch CallerReference from time.Now() to resource.UniqueId()
  • Loading branch information
bflad authored Jul 24, 2019
2 parents d65226b + 15d5264 commit 92ac539
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws/cloudfront_distribution_configuration_structure.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"bytes"
"fmt"
"strconv"
"time"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/cloudfront"
"github.com/hashicorp/terraform/flatmap"
"github.com/hashicorp/terraform/helper/hashcode"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/helper/schema"
)

Expand All @@ -33,7 +33,7 @@ const cloudFrontRoute53ZoneID = "Z2FDTNDATAQYW2"
func expandDistributionConfig(d *schema.ResourceData) *cloudfront.DistributionConfig {
distributionConfig := &cloudfront.DistributionConfig{
CacheBehaviors: expandCacheBehaviors(d.Get("ordered_cache_behavior").([]interface{})),
CallerReference: aws.String(time.Now().Format(time.RFC3339Nano)),
CallerReference: aws.String(resource.UniqueId()),
Comment: aws.String(d.Get("comment").(string)),
CustomErrorResponses: expandCustomErrorResponses(d.Get("custom_error_response").(*schema.Set)),
DefaultCacheBehavior: expandCloudFrontDefaultCacheBehavior(d.Get("default_cache_behavior").([]interface{})[0].(map[string]interface{})),
Expand Down

0 comments on commit 92ac539

Please sign in to comment.