cattle-ops / terraform-aws-gitlab-runner

Terraform module for AWS GitLab runners on ec2 (spot) instances
https://registry.terraform.io/modules/cattle-ops/gitlab-runner/aws
MIT License
586 stars 331 forks source link

feat: add field `create_aws_s3_bucket_public_access_block` to variable `runner_worker_cache` #1105

Closed KevinSnyderCodes closed 7 months ago

KevinSnyderCodes commented 7 months ago

Description

Some organizations may disallow configuring block public access settings on individual S3 buckets. For example, the organization may use account level configuration to block public access on all buckets.

To support this, we add the field create_aws_s3_bucket_public_access_block to the runner_worker_cache variable.

We add count to the aws_s3_bucket_public_access_block resource to control its creation and use the moved keyword to ensure that existing instances of this resource are not recreated due to this change.

Migrations required

No. Migrations are automatically handled by moved keyword.

Verification

Applied this module with the create_aws_s3_bucket_public_access_block field set to false. The aws_s3_bucket_public_access_block resource was not created. All other resources were created as expected.

github-actions[bot] commented 7 months ago

Hey @KevinSnyderCodes! 👋

Thank you for your contribution to the project. Please refer to the contribution rules for a quick overview of the process.

Make sure that this PR clearly explains:

With submitting this PR you confirm that you hold the rights of the code added and agree that it will published under this LICENSE.

The following ChatOps commands are supported:

Simply add a comment with the command in the first line. If you need to pass more information, separate it with a blank line from the command.

This message was generated automatically. You are welcome to improve it.

kayman-mk commented 7 months ago

Did some quick tests in my environment. Looks good to me.