-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from zoitech/add_variables
Updated to terraform 0.12
- Loading branch information
Showing
7 changed files
with
68 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## 1.0.1 | ||
|
||
BUG FIXES: | ||
|
||
* added variables ([#2](https://github.com/zoitech/terraform-aws-config/issues/2)) | ||
|
||
BACKWARDS INCOMPATIBILITIES / NOTES: | ||
|
||
* Terraform version 0.12.x ([#3](https://github.com/zoitech/terraform-aws-config/issues/3)) | ||
|
||
ENHANCEMENTS: | ||
|
||
* Added readme | ||
|
||
## 1.0.0 | ||
|
||
* Initial commit |
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 |
---|---|---|
@@ -1,26 +1,27 @@ | ||
resource "aws_lambda_function" "s3_webserver_buckets" { | ||
filename = "lambda/s3_webserver_buckets.zip" | ||
function_name = "s3_webserver_buckets" | ||
role = "${aws_iam_role.s3_webserver_buckets_role.arn}" | ||
role = aws_iam_role.s3_webserver_buckets_role.arn | ||
handler = "s3_webserver_buckets.lambda_handler" | ||
timeout = "${var.lambda_timeout}" | ||
timeout = var.lambda_timeout | ||
|
||
runtime = "python3.7" | ||
} | ||
|
||
resource "aws_lambda_permission" "s3_webserver_buckets_config_permissions" { | ||
action = "lambda:InvokeFunction" | ||
function_name = "${aws_lambda_function.s3_webserver_buckets.arn}" | ||
function_name = aws_lambda_function.s3_webserver_buckets.arn | ||
principal = "config.amazonaws.com" | ||
statement_id = "AllowExecutionFromConfig" | ||
} | ||
|
||
resource "aws_lambda_function" "iam_console_login" { | ||
filename = "lambda/iam_console_login.zip" | ||
function_name = "iam_console_login" | ||
role = "${aws_iam_role.iam_console_login_role.arn}" | ||
role = aws_iam_role.iam_console_login_role.arn | ||
handler = "iam_console_login.lambda_handler" | ||
timeout = "${var.lambda_timeout}" | ||
timeout = var.lambda_timeout | ||
|
||
runtime = "python3.7" | ||
} | ||
|
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,43 +1,44 @@ | ||
# aws_config_organization_managed_rule - resourcesTagged | ||
variable required_tags { | ||
variable "required_tags" { | ||
# https://docs.aws.amazon.com/config/latest/developerguide/required-tags.html | ||
description = "A map of the required tag keys and/or values to evaluate" | ||
type = map(string) | ||
default = { | ||
"tag1Key" : "owner" | ||
"tag1Key" = "owner" | ||
} | ||
} | ||
|
||
# aws_config_organization_managed_rule - accessKeyRotated | ||
variable accessKeyRotated_maxAccessKeyAge { | ||
variable "accessKeyRotated_maxAccessKeyAge" { | ||
description = "Every Access Key will be defined as Non-Compliant after exceeding the number of days defined in this variable" | ||
default = 30 | ||
} | ||
|
||
# aws_config_organization_managed_rule - dbInstanceBackupEnabled | ||
variable dbInstanceBackupEnabled_RetentionPeriod { | ||
variable "dbInstanceBackupEnabled_RetentionPeriod" { | ||
description = "The retention period in days for the RDS Databases to check" | ||
default = 30 | ||
} | ||
|
||
variable dbInstanceBackupEnabled_PreferredBackupWindow { | ||
variable "dbInstanceBackupEnabled_PreferredBackupWindow" { | ||
description = "The format is hh24:min-hh24:min. Example: 23:00-02:00" | ||
default = "22:00-24:00" | ||
} | ||
|
||
variable dbInstanceBackupEnabled_CheckReadReplicas { | ||
variable "dbInstanceBackupEnabled_CheckReadReplicas" { | ||
description = "Defines if AWS Config should Check if the RDS instance has backups enabled for the ReadReplicas" | ||
default = true | ||
} | ||
|
||
# aws_config_organization_managed_rule - elbLoggingEnabled | ||
variable elbLoggingEnabled_s3BucketNames { | ||
variable "elbLoggingEnabled_s3BucketNames" { | ||
description = "Comma separated list of S3 bucket names for ELB to deliver the log files" | ||
default = "backup" | ||
} | ||
|
||
# aws_lambda_function - s3_webserver_buckets | ||
variable lambda_timeout { | ||
variable "lambda_timeout" { | ||
description = "The timeout for the custom lambda scripts which define more custom AWS Config rules" | ||
default = 30 | ||
} | ||
|
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" | ||
} |