Skip to content
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

Update S3 Account details #82

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 modules/aws/EKS-Cluster/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ resource "aws_eks_cluster" "eks_cluster" {
endpoint_private_access = var.endpoint_private_access
endpoint_public_access = var.endpoint_public_access
public_access_cidrs = var.public_access_cidrs
subnet_ids = len(var.cluster_subnet_ids) == 0 ? aws_subnet.eks_subnet[*].id : var.cluster_subnet_ids
subnet_ids = length(var.cluster_subnet_ids) == 0 ? aws_subnet.eks_subnet[*].id : var.cluster_subnet_ids
}

dynamic "encryption_config" {
Expand Down
1 change: 1 addition & 0 deletions modules/aws/EKS-Cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ variable "enable_cloudwatch_agent" {
variable "cluster_iam_role_arn" {
type = string
description = "IAM Role ARN for the EKS Cluster"
default = null
}
variable "cluster_subnet_ids" {
type = list(string)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@

resource "aws_iam_user_policy_attachment" "iam_user_policy_attachment" {
policy_arn = var.iam_policy_arn
role = var.iam_user_name
user = var.iam_user_name
}
6 changes: 4 additions & 2 deletions modules/aws/S3-Account/s3_account.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ resource "aws_s3_bucket_acl" "bucket_acl" {
# trivy:ignore:AVD-AWS-0090
resource "aws_s3_bucket_versioning" "s3_bucket_versioning" {
bucket = aws_s3_bucket.s3_bucket.id
enabled = var.versioning_enabled
versioning_configuration {
status = var.versioning_enabled ? "Enabled" : "Suspended"
}
}

# Ignore: AVD-AWS-0087 (https://avd.aquasec.com/misconfig/avd-aws-0087)
Expand All @@ -50,7 +52,7 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "s3_bucket_server_

rule {
apply_server_side_encryption_by_default {
kms_master_key_id = var.server_side_encryption.key_id
kms_master_key_id = var.server_side_encryption.kms_key_id
sse_algorithm = var.server_side_encryption.algorithm
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/aws/S3-Account/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ variable "restrict_public_buckets" {
variable "server_side_encryption" {
type = object({
algorithm = string
kms_key_id = optional(string)
kms_key_id = optional(string, null)
})
description = "Server side encryption to be applied to the bucket"
default = {
Expand Down
Loading