Skip to content

Commit

Permalink
Merge pull request #35 from sourcefuse/fix/sonarcloud
Browse files Browse the repository at this point in the history
Fix/sonarcloud
  • Loading branch information
mayank0202 authored Feb 22, 2024
2 parents a796f55 + 330fa71 commit 063784a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ module "tags" {
}
module "cloudfront" {
source = "sourcefuse/arc-cloudfront/aws"
version = "4.0.1"
source = "sourcefuse/arc-cloudfront/aws"
#version = "4.0.6" --> Pin the right version
providers = {
aws.acm = aws.acm // Certificate has to be created in us-east-1 region
}
origins = [{
origin_type = "custom",
Expand All @@ -45,7 +48,6 @@ module "cloudfront" {
}
]
//source = "git::https://github.com/sourcefuse/terraform-aws-refarch-cloudfront?ref=2.0.2"
namespace = "test"
description = "This is a test Cloudfront distribution"
Expand Down
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

| Name | Source | Version |
|------|--------|---------|
| <a name="module_cloudfront"></a> [cloudfront](#module\_cloudfront) | ../ | n/a |
| <a name="module_cloudfront"></a> [cloudfront](#module\_cloudfront) | sourcefuse/arc-cloudfront/aws | 4.0.6 |
| <a name="module_tags"></a> [tags](#module\_tags) | sourcefuse/arc-tags/aws | 1.2.3 |

## Resources
Expand Down
6 changes: 3 additions & 3 deletions example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ module "tags" {
}

module "cloudfront" {
source = "../"

source = "sourcefuse/arc-cloudfront/aws"
version = "4.0.6"
providers = {
aws.acm = aws.acm
aws.acm = aws.acm // Certificate has to be created in us-east-1 region
}

origins = [{
Expand Down
4 changes: 2 additions & 2 deletions example/src/cloudfront-function/cloudfrontFunction.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function handler(event) {
var response = event.response;
var headers = response.headers;
let response = event.response;
let headers = response.headers;

// Set the cache-control header
headers['cache-control'] = {value: 'public, max-age=63072000'};
Expand Down
Binary file removed example/src/edge-function.zip
Binary file not shown.

0 comments on commit 063784a

Please sign in to comment.