-
-
Notifications
You must be signed in to change notification settings - Fork 693
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Disable creation of SAM metadata null-resources by default (#494)
- Loading branch information
1 parent
5b2eb57
commit 9c9603c
Showing
15 changed files
with
134 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,7 @@ terraform { | |
inputs = { | ||
defaults = { # Default values | ||
create = true | ||
handler = "index.lambda_handler" | ||
runtime = "python3.8" | ||
create = true | ||
tags = { | ||
Terraform = "true" | ||
Environment = "dev" | ||
|
@@ -47,9 +45,7 @@ module "wrapper" { | |
source = "terraform-aws-modules/lambda/aws//wrappers" | ||
defaults = { # Default values | ||
create = true | ||
handler = "index.lambda_handler" | ||
runtime = "python3.8" | ||
create = true | ||
tags = { | ||
Terraform = "true" | ||
Environment = "dev" | ||
|
@@ -68,38 +64,36 @@ module "wrapper" { | |
} | ||
``` | ||
|
||
## Example: Manage multiple Lambdas in one Terragrunt layer | ||
## Example: Manage multiple S3 buckets in one Terragrunt layer | ||
|
||
`eu-west-1/lambdas/terragrunt.hcl`: | ||
`eu-west-1/s3-buckets/terragrunt.hcl`: | ||
|
||
```hcl | ||
terraform { | ||
source = "tfr:///terraform-aws-modules/lambda/aws//wrappers" | ||
source = "tfr:///terraform-aws-modules/s3-bucket/aws//wrappers" | ||
# Alternative source: | ||
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda.git//wrappers?ref=master" | ||
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-s3-bucket.git//wrappers?ref=master" | ||
} | ||
inputs = { | ||
defaults = { | ||
create = true | ||
handler = "index.lambda_handler" | ||
runtime = "python3.8" | ||
tags = { | ||
Terraform = "true" | ||
Environment = "dev" | ||
} | ||
force_destroy = true | ||
attach_elb_log_delivery_policy = true | ||
attach_lb_log_delivery_policy = true | ||
attach_deny_insecure_transport_policy = true | ||
attach_require_latest_tls_policy = true | ||
} | ||
items = { | ||
lambda1 = { | ||
function_name = "my-lambda1" | ||
description = "My awesome lambda function"\ | ||
source_path = "../src/lambda-function1" | ||
bucket1 = { | ||
bucket = "my-random-bucket-1" | ||
} | ||
lambda2 = { | ||
function_name = "my-lambda2" | ||
description = "My second awesome lambda function" | ||
source_path = "../src/lambda-function2" | ||
bucket2 = { | ||
bucket = "my-random-bucket-2" | ||
tags = { | ||
Secure = "probably" | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,18 @@ This wrapper does not implement any extra functionality. | |
|
||
```hcl | ||
terraform { | ||
source = "tfr:///terraform-aws-modules/lambda/aws" | ||
source = "tfr:///terraform-aws-modules/lambda/aws//wrappers/alias" | ||
# Alternative source: | ||
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda.git//wrappers/alias?ref=master" | ||
} | ||
inputs = { | ||
defaults = { # Default values | ||
create = true | ||
refresh_alias = true | ||
create = true | ||
tags = { | ||
Terraform = "true" | ||
Environment = "dev" | ||
} | ||
} | ||
items = { | ||
|
@@ -42,8 +45,11 @@ module "wrapper" { | |
source = "terraform-aws-modules/lambda/aws//wrappers/alias" | ||
defaults = { # Default values | ||
create = true | ||
refresh_alias = true | ||
create = true | ||
tags = { | ||
Terraform = "true" | ||
Environment = "dev" | ||
} | ||
} | ||
items = { | ||
|
@@ -58,45 +64,36 @@ module "wrapper" { | |
} | ||
``` | ||
|
||
## Example: Manage multiple aliases in one Terragrunt layer | ||
## Example: Manage multiple S3 buckets in one Terragrunt layer | ||
|
||
`eu-west-1/lambda-aliases/terragrunt.hcl`: | ||
`eu-west-1/s3-buckets/terragrunt.hcl`: | ||
|
||
```hcl | ||
terraform { | ||
source = "tfr:///terraform-aws-modules/lambda/aws//wrappers/alias" | ||
source = "tfr:///terraform-aws-modules/s3-bucket/aws//wrappers" | ||
# Alternative source: | ||
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda.git//wrappers/alias?ref=master" | ||
} | ||
dependency "lambda1" { | ||
config_path = "../lambdas/lambda1" | ||
} | ||
dependency "lambda2" { | ||
config_path = "../lambdas/lambda2" | ||
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-s3-bucket.git//wrappers?ref=master" | ||
} | ||
inputs = { | ||
defaults = { | ||
refresh_alias = true | ||
allowed_triggers = { | ||
AnotherAPIGatewayAny = { | ||
service = "apigateway" | ||
source_arn = "arn:aws:execute-api:eu-west-1:135367859851:abcdedfgse/*/*/*" | ||
} | ||
} | ||
force_destroy = true | ||
attach_elb_log_delivery_policy = true | ||
attach_lb_log_delivery_policy = true | ||
attach_deny_insecure_transport_policy = true | ||
attach_require_latest_tls_policy = true | ||
} | ||
items = { | ||
alias1 = { | ||
name = "my-random-alias-1" | ||
function_name = dependency.lambda1.outputs.lambda_function_name | ||
function_version = dependency.lambda1.outputs.lambda_function_version | ||
bucket1 = { | ||
bucket = "my-random-bucket-1" | ||
} | ||
alias2 = { | ||
name = "my-random-alias-2" | ||
function_name = dependency.lambda2.outputs.lambda_function_name | ||
function_version = dependency.lambda2.outputs.lambda_function_version | ||
bucket2 = { | ||
bucket = "my-random-bucket-2" | ||
tags = { | ||
Secure = "probably" | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
terraform { | ||
required_version = ">= 0.13" | ||
required_version = ">= 0.13.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ terraform { | |
inputs = { | ||
defaults = { # Default values | ||
create_app = true | ||
create = true | ||
tags = { | ||
Terraform = "true" | ||
Environment = "dev" | ||
|
@@ -45,7 +45,7 @@ module "wrapper" { | |
source = "terraform-aws-modules/lambda/aws//wrappers/deploy" | ||
defaults = { # Default values | ||
create_app = true | ||
create = true | ||
tags = { | ||
Terraform = "true" | ||
Environment = "dev" | ||
|
@@ -64,70 +64,36 @@ module "wrapper" { | |
} | ||
``` | ||
|
||
## Example: Manage multiple deployment via AWS CodeDeploy in one Terragrunt layer | ||
## Example: Manage multiple S3 buckets in one Terragrunt layer | ||
|
||
`eu-west-1/lambda-deploys/terragrunt.hcl`: | ||
`eu-west-1/s3-buckets/terragrunt.hcl`: | ||
|
||
```hcl | ||
terraform { | ||
source = "tfr:///terraform-aws-modules/lambda/aws//wrappers/deploy" | ||
source = "tfr:///terraform-aws-modules/s3-bucket/aws//wrappers" | ||
# Alternative source: | ||
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-lambda.git//wrappers/deploy?ref=master" | ||
} | ||
dependency "aliases" { | ||
config_path = "../lambdas-aliases/" | ||
} | ||
dependency "lambda1" { | ||
config_path = "../lambdas/lambda1" | ||
} | ||
dependency "lambda2" { | ||
config_path = "../lambdas/lambda2" | ||
# source = "git::[email protected]:terraform-aws-modules/terraform-aws-s3-bucket.git//wrappers?ref=master" | ||
} | ||
inputs = { | ||
defaults = { | ||
create_app = true | ||
reate_deployment_group = true | ||
create_deployment = true | ||
run_deployment = true | ||
wait_deployment_completion = true | ||
triggers = { | ||
start = { | ||
events = ["DeploymentStart"] | ||
name = "DeploymentStart" | ||
target_arn = "arn:aws:sns:eu-west-1:135367859851:sns1" | ||
} | ||
success = { | ||
events = ["DeploymentSuccess"] | ||
name = "DeploymentSuccess" | ||
target_arn = "arn:aws:sns:eu-west-1:135367859851:sns2" | ||
} | ||
} | ||
force_destroy = true | ||
tags = { | ||
Terraform = "true" | ||
Environment = "dev" | ||
} | ||
attach_elb_log_delivery_policy = true | ||
attach_lb_log_delivery_policy = true | ||
attach_deny_insecure_transport_policy = true | ||
attach_require_latest_tls_policy = true | ||
} | ||
items = { | ||
deploy1 = { | ||
app_name = "my-random-app-1" | ||
deployment_group_name = "something1" | ||
alias_name = dependency.aliases.outputs.wrapper.alias1.lambda_alias_name | ||
function_name = dependency.lambda1.outputs.lambda_function_name | ||
target_version = dependency.lambda1.outputs.lambda_function_version | ||
bucket1 = { | ||
bucket = "my-random-bucket-1" | ||
} | ||
deploy2 = { | ||
app_name = "my-random-app-2" | ||
deployment_group_name = "something2" | ||
alias_name = dependency.aliases.outputs.wrapper.alias2.lambda_alias_name | ||
function_name = dependency.lambda2.outputs.lambda_function_name | ||
target_version = dependency.lambda2.outputs.lambda_function_version | ||
bucket2 = { | ||
bucket = "my-random-bucket-2" | ||
tags = { | ||
Secure = "probably" | ||
} | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.