Skip to content

fixed-tf-depreciation-and-added-benchmark-3 #295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aws_sra_examples/terraform/common/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ resource "local_file" "config_file_creation" {
# Security Hub Settings
########################################################################
disable_security_hub = false
cis_standard_version = "1.4.0"
cis_standard_version = "3.0.0"
compliance_frequency = "7"
securityhub_control_tower_regions_only = true
enable_cis_standard = false
Expand Down
11 changes: 6 additions & 5 deletions aws_sra_examples/terraform/common/sra_execution_role/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ resource "aws_iam_role" "sra_execution_role" {
Action = "sts:AssumeRole",
Effect = "Allow",
Principal = {
AWS = "arn:${var.aws_partition}:iam::${var.management_account_id}:root"
AWS = format("arn:%s:iam::%s:root", var.aws_partition, var.management_account_id)
}
}]
})

managed_policy_arns = [
"arn:${var.aws_partition}:iam::aws:policy/AdministratorAccess"
]

tags = {
"sra-solution" = var.solution_name
}
}

resource "aws_iam_role_policy_attachment" "sra_execution_role_admin_policy" {
role = aws_iam_role.sra_execution_role.name
policy_arn = format("arn:%s:iam::aws:policy/AdministratorAccess", var.aws_partition)
}
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Please navigate to the [installing the AWS SRA Solutions](./../../README.md#inst
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_audit_account_id"></a> [audit\_account\_id](#input\_audit\_account\_id) | AWS Account ID of the Control Tower Audit account. | `string` | n/a | yes |
| <a name="input_cis_standard_version"></a> [cis\_standard\_version](#input\_cis\_standard\_version) | CIS Standard Version | `string` | `"1.4.0"` | no |
| <a name="input_cis_standard_version"></a> [cis\_standard\_version](#input\_cis\_standard\_version) | CIS Standard Version | `string` | `"3.0.0"` | no |
| <a name="input_compliance_frequency"></a> [compliance\_frequency](#input\_compliance\_frequency) | Frequency to Check for Organizational Compliance (in days between 1 and 30, default is 7) | `number` | `7` | no |
| <a name="input_control_tower_lifecycle_rule_name"></a> [control\_tower\_lifecycle\_rule\_name](#input\_control\_tower\_lifecycle\_rule\_name) | The name of the AWS Control Tower Life Cycle Rule | `string` | `"sra-securityhub-org-trigger"` | no |
| <a name="input_create_lambda_log_group"></a> [create\_lambda\_log\_group](#input\_create\_lambda\_log\_group) | Indicates whether a CloudWatch Log Group should be explicitly created for the Lambda function | `bool` | `false` | no |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ variable "sra_solution_name" {
variable "cis_standard_version" {
description = "CIS Standard Version"
type = string
default = "1.4.0"
default = "3.0.0"
validation {
condition = contains(["NONE", "1.2.0", "1.4.0", "3.0.0"], var.cis_standard_version) # Changed to var.cis_standard_version
error_message = "Valid values for cis_standard_version are NONE, 1.2.0, 1.4.0, or 3.0.0."
}
}

variable "compliance_frequency" {
Expand Down