formatting
This commit is contained in:
parent
df7ac2d51b
commit
73064bcb87
|
@ -95,8 +95,9 @@ func testAccCheckAwsLambdaAttributes(mapping *lambda.AliasConfiguration) resourc
|
|||
|
||||
const testAccAwsLambdaAliasConfig = `
|
||||
resource "aws_iam_role" "iam_for_lambda" {
|
||||
name = "iam_for_lambda"
|
||||
assume_role_policy = <<EOF
|
||||
name = "iam_for_lambda"
|
||||
|
||||
assume_role_policy = <<EOF
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
|
@ -112,11 +113,13 @@ resource "aws_iam_role" "iam_for_lambda" {
|
|||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
resource "aws_iam_policy" "policy_for_role" {
|
||||
name = "policy_for_role"
|
||||
path = "/"
|
||||
description = "IAM policy for for Lamda alias testing"
|
||||
policy = <<EOF
|
||||
name = "policy_for_role"
|
||||
path = "/"
|
||||
description = "IAM policy for for Lamda alias testing"
|
||||
|
||||
policy = <<EOF
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
|
@ -131,21 +134,24 @@ resource "aws_iam_policy" "policy_for_role" {
|
|||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
resource "aws_iam_policy_attachment" "policy_attachment_for_role" {
|
||||
name = "policy_attachment_for_role"
|
||||
roles = ["${aws_iam_role.iam_for_lambda.name}"]
|
||||
policy_arn = "${aws_iam_policy.policy_for_role.arn}"
|
||||
name = "policy_attachment_for_role"
|
||||
roles = ["${aws_iam_role.iam_for_lambda.name}"]
|
||||
policy_arn = "${aws_iam_policy.policy_for_role.arn}"
|
||||
}
|
||||
|
||||
resource "aws_lambda_function" "lambda_function_test_create" {
|
||||
filename = "test-fixtures/lambdatest.zip"
|
||||
function_name = "example_lambda_name_create"
|
||||
role = "${aws_iam_role.iam_for_lambda.arn}"
|
||||
handler = "exports.example"
|
||||
filename = "test-fixtures/lambdatest.zip"
|
||||
function_name = "example_lambda_name_create"
|
||||
role = "${aws_iam_role.iam_for_lambda.arn}"
|
||||
handler = "exports.example"
|
||||
}
|
||||
|
||||
resource "aws_lambda_alias" "lambda_alias_test" {
|
||||
name = "testalias"
|
||||
description = "a sample description"
|
||||
function_name = "${aws_lambda_function.lambda_function_test_create.arn}"
|
||||
function_version = "$LATEST"
|
||||
name = "testalias"
|
||||
description = "a sample description"
|
||||
function_name = "${aws_lambda_function.lambda_function_test_create.arn}"
|
||||
function_version = "$LATEST"
|
||||
}
|
||||
`
|
||||
|
|
Loading…
Reference in New Issue