@@ -33,7 +33,7 @@ func adaptDistribution(resource *terraform.Block) cloudfront.Distribution {
33
33
},
34
34
DefaultCacheBehaviour : cloudfront.CacheBehaviour {
35
35
Metadata : resource .GetMetadata (),
36
- ViewerProtocolPolicy : types .String ( "allow-all " , resource .GetMetadata ()),
36
+ ViewerProtocolPolicy : types .StringDefault ( " " , resource .GetMetadata ()),
37
37
},
38
38
OrdererCacheBehaviours : nil ,
39
39
ViewerCertificate : cloudfront.ViewerCertificate {
@@ -53,13 +53,13 @@ func adaptDistribution(resource *terraform.Block) cloudfront.Distribution {
53
53
if defaultCacheBlock := resource .GetBlock ("default_cache_behavior" ); defaultCacheBlock .IsNotNil () {
54
54
distribution .DefaultCacheBehaviour .Metadata = defaultCacheBlock .GetMetadata ()
55
55
viewerProtocolPolicyAttr := defaultCacheBlock .GetAttribute ("viewer_protocol_policy" )
56
- distribution .DefaultCacheBehaviour .ViewerProtocolPolicy = viewerProtocolPolicyAttr .AsStringValueOrDefault ("allow-all " , defaultCacheBlock )
56
+ distribution .DefaultCacheBehaviour .ViewerProtocolPolicy = viewerProtocolPolicyAttr .AsStringValueOrDefault ("" , defaultCacheBlock )
57
57
}
58
58
59
59
orderedCacheBlocks := resource .GetBlocks ("ordered_cache_behavior" )
60
60
for _ , orderedCacheBlock := range orderedCacheBlocks {
61
61
viewerProtocolPolicyAttr := orderedCacheBlock .GetAttribute ("viewer_protocol_policy" )
62
- viewerProtocolPolicyVal := viewerProtocolPolicyAttr .AsStringValueOrDefault ("allow-all " , orderedCacheBlock )
62
+ viewerProtocolPolicyVal := viewerProtocolPolicyAttr .AsStringValueOrDefault ("" , orderedCacheBlock )
63
63
distribution .OrdererCacheBehaviours = append (distribution .OrdererCacheBehaviours , cloudfront.CacheBehaviour {
64
64
Metadata : orderedCacheBlock .GetMetadata (),
65
65
ViewerProtocolPolicy : viewerProtocolPolicyVal ,
0 commit comments