Skip to content

Commit

Permalink
Merge pull request #6 from osodevops/decouple_encryption_lambda
Browse files Browse the repository at this point in the history
Decouple encryption lambda
  • Loading branch information
sionsmith authored Sep 5, 2019
2 parents 4cea25d + e6e319c commit 4592036
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 255 deletions.
31 changes: 0 additions & 31 deletions aws_cloudwatch_event_rule_build_success.tf

This file was deleted.

Empty file modified aws_iam_role_policy_attachment.tf
100644 → 100755
Empty file.
23 changes: 0 additions & 23 deletions aws_lambda_function.tf

This file was deleted.

8 changes: 0 additions & 8 deletions aws_lambda_iam_policy.tf

This file was deleted.

6 changes: 0 additions & 6 deletions aws_lambda_iam_policy_attachment.tf

This file was deleted.

39 changes: 0 additions & 39 deletions aws_lambda_iam_policy_document.tf

This file was deleted.

6 changes: 0 additions & 6 deletions aws_lambda_iam_role.tf

This file was deleted.

7 changes: 0 additions & 7 deletions aws_lambda_permission_cloudwatch_event.tf

This file was deleted.

6 changes: 0 additions & 6 deletions data_archive_file_ami_backup.tf

This file was deleted.

6 changes: 0 additions & 6 deletions data_null_data_source_lambda_archive.tf

This file was deleted.

6 changes: 0 additions & 6 deletions data_null_data_source_lambda_file.tf

This file was deleted.

114 changes: 0 additions & 114 deletions functions/ami_encryption.py

This file was deleted.

4 changes: 1 addition & 3 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ locals {
"egrep \"${data.aws_region.current.name}\\:\\sami\\-\" build.log | cut -d' ' -f2 > ami_id.txt",
# Packer doesn't return non-zero status; we must do that if Packer build failed
"test -s ami_id.txt || exit 1",
"curl -qL -o ami_builder_event.json https://gist.githubusercontent.com/sionsmith/23b7dfcd3ab9c302dc1c172c871a589a/raw/cf96e3cde40f413afa1d3405f33d4163bdb8db0b/ami_builder_event.json",
"sed -i.bak \"s/<<AMI-ID>>/$(cat ami_id.txt)/g\" ami_builder_event.json",
"aws events put-events --entries file://ami_builder_event.json",
"if [ ${var.encrypt_ami} = 1 ] ; then curl -qL -o ami_builder_event.json https://gist.githubusercontent.com/sionsmith/23b7dfcd3ab9c302dc1c172c871a589a/raw/cf96e3cde40f413afa1d3405f33d4163bdb8db0b/ami_builder_event.json && sed -i.bak \"s/<<AMI-ID>>/$(cat ami_id.txt)/g\" ami_builder_event.json && aws events put-events --entries file://ami_builder_event.json; fi",
"echo build completed on `date`"
]
}

0 comments on commit 4592036

Please sign in to comment.