Giter Club home page Giter Club logo

Comments (4)

tgelpi-gmail avatar tgelpi-gmail commented on June 12, 2024 1

The issue potentially impacts the creation of 5 buckets

vault-unseal-bucket
logs_jenkins_x
reports_jenkins_x
repository_jenkins_x
backup_bucket

The files that need updating are:

modules/vault/main.tf
modules/cluster/storage.tf
modules/backup/main.tf

A new variable "enable_acl" is being considered for backward compatibility

from jx.

tgelpi avatar tgelpi commented on June 12, 2024

I have a configuration that resolves this issue of ACL not supported by setting object ownership controls instead of ACL for the five S3 buckets.

EKS Resources

A new variable "enable_acl" is created and defaults to false. 

Five S3 buckets are adjusted
  backup_bucket
  logs_jenkins_x
  report_jenkins_x
  repositor_jenkins_x
  vault-unseal-bucket

Terraform Bucket Resources

## Original setting using ACL  variable enable_acl=true
resource "aws_s3_bucket_acl" "<jx3-bucket>" {
bucket = aws_s3_bucket.<jx3-bucket>[0].bucket
  acl    = "private"
}
## Setting with ACL Disabled.  variable enable_acl=false  (default)
resource "aws_s3_bucket_ownership_controls" "<jx3-bucket>" {
  bucket = aws_s3_bucket.<jx3-bucket>[0].bucket
  rule {
      object_ownership = "BucketOwnerEnforced"
    }
}
## All buckets continue to be encrypted
resource "aws_s3_bucket_server_side_encryption_configuration" "<jx3-bucket>" {
  bucket = aws_s3_bucket.<jx3-bucket>[0].bucket
  rule {
    apply_server_side_encryption_by_default {
      sse_algorithm     = local.encryption_algo
      kms_master_key_id = var.s3_kms_arn
    }
  }
}

Changed Files

 README.md
 main.tf
 variables.tf
 modules/backup/main.tf
 modules/backup/variables.tf
 modules/cluster/storage.tf
 modules/cluster/variables.tf
 modules/vault/main.tf

Git Diff

The new Infrastructure was tested agains both the Vault and AWS Secret Manager cluster configs. The buckets get created and is viewable from the portal or s3cli. It appears that the vault cluster configuration was creating folders under the log bucket whereas the ASM version was not. I believe this limitation on the ASM version is currently an issue and is not caused by this recent update.

The code can be tested using the following branch:
source = "github.com/jx3rocks/terraform-aws-eks-jx?ref=enable_acl"

from jx.

tgelpi avatar tgelpi commented on June 12, 2024

This issue has been fixed with PR #362

from jx.

tgelpi-gmail avatar tgelpi-gmail commented on June 12, 2024

This issue has been fixed with PR jenkins-x/terraform-aws-eks-jx#362

from jx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.