-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- custom object which can be enhanced for kms_key later - adapted documentation and added example - allow `ssm:GetParameter` for spring-media users, this fixes spring-media/terraform-aws-lambda#61 and spring-media/terraform-aws-lambda#59
- Loading branch information
1 parent
e0eaa9e
commit c7cc971
Showing
9 changed files
with
117 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Example without event | ||
|
||
Creates an AWS Lambda function with read permissions to SSM parameters. | ||
|
||
## requirements | ||
|
||
- [Terraform 0.12+](https://www.terraform.io/) | ||
- authentication configuration for the [aws provider](https://www.terraform.io/docs/providers/aws/) | ||
|
||
## usage | ||
|
||
``` | ||
terraform init | ||
terraform plan | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
provider "aws" { | ||
region = "eu-west-1" | ||
} | ||
|
||
module "source" { | ||
source = "../fixtures" | ||
} | ||
|
||
resource "aws_ssm_parameter" "string" { | ||
name = "/example/string" | ||
type = "String" | ||
value = "changeme" | ||
} | ||
|
||
resource "aws_ssm_parameter" "secure_string" { | ||
name = "/example/secure.string" | ||
type = "SecureString" | ||
value = "changeme" | ||
} | ||
|
||
module "lambda" { | ||
source = "../../" | ||
description = "Example usage for an AWS Lambda with read permissions to SSM parameters." | ||
filename = module.source.output_path | ||
function_name = "example-without-event" | ||
handler = "handler" | ||
runtime = "nodejs12.x" | ||
source_code_hash = module.source.output_base64sha256 | ||
|
||
ssm = { | ||
parameter_names = [aws_ssm_parameter.string.name, aws_ssm_parameter.secure_string.name] | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
terraform { | ||
required_version = ">= 0.12" | ||
} |
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