Skip to content

Commit

Permalink
Publish the version
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamgilbert committed Feb 17, 2019
1 parent 4ec2a5e commit 87e40f9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module "munki-repo" {
munki_s3_bucket = "my-munki-bucket"
username = "munki"
password = "ilovemunki"
prefix = "some_prefix_to_make_this_unique"
# price_class is one of PriceClass_All, PriceClass_200, PriceClass_100
price_class = "PriceClass_100"
}
Expand Down
7 changes: 4 additions & 3 deletions lambda.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "aws_iam_role" "iam_for_lambda" {
name = "iam_for_lambda"
name = "${var.prefix}_iam_for_lambda"

assume_role_policy = <<EOF
{
Expand Down Expand Up @@ -40,10 +40,11 @@ data "archive_file" "basic_auth_lambda_zip" {

resource "aws_lambda_function" "basic_auth_lambda" {
filename = "basic_auth_lambda.zip"
function_name = "munki_basic_auth"
function_name = "${var.prefix}_basic_auth"
role = "${aws_iam_role.iam_for_lambda.arn}"
handler = "basic_auth.handler"
source_code_hash = "${data.archive_file.basic_auth_lambda_zip.output_base64sha256}"
runtime = "nodejs8.10"
# publish = true

publish = true
}
2 changes: 1 addition & 1 deletion output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ output "cloudfront_id" {

output "cloudfront_url" {
value = "${aws_cloudfront_distribution.www_distribution.domain_name}"
}
}
18 changes: 13 additions & 5 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
variable "username" {
description = "Username clients use."
description = "Username clients use."
}

variable "password" {
description = "Password clients use."
description = "Password clients use."
}

variable "munki_s3_bucket" {
description = "The name of your s3 Bucket"
description = "The name of your s3 Bucket"
}

variable "prefix" {
description = "Prefix before lambda and IAM names to ensure uniqueness in your account."
default = "munki"
}

variable "price_class" {
default = "PriceClass_100"
description = "The price class your CloudFront Distribution should use."
default = "PriceClass_100"
description = "The price class your CloudFront Distribution should use."
}

0 comments on commit 87e40f9

Please sign in to comment.