Skip to content

Comments

feat: Add privileged_mode variable to CodeBuild project configuration#102

Merged
baolsen merged 2 commits intocloudandthings:mainfrom
david-graesser:add_privileged_mode
Feb 12, 2026
Merged

feat: Add privileged_mode variable to CodeBuild project configuration#102
baolsen merged 2 commits intocloudandthings:mainfrom
david-graesser:add_privileged_mode

Conversation

@david-graesser
Copy link
Contributor

@david-graesser david-graesser commented Feb 10, 2026

Description

We use Localstack with Testcontainers in our workflows. Due to this we need to run Docker containers inside the CodeBuild-Docker container. To do this, we must be able to activate the privileged_mode https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/codebuild_project#privileged_mode-1

Related Issues

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔧 Configuration change
  • ♻️ Code refactoring
  • ⚡ Performance improvement
  • ✅ Test addition or update
  • 🔒 Security improvement

Changes Made

  • Introduced a new variable privileged_mode to control Docker daemon access within the build container.
  • Updated the main.tf to utilize the new variable for the CodeBuild project.
  • Enhanced documentation to include the new variable in copilot instructions.

Testing

module "playground_runner" {
  source = "source = "github.com/david-graesser/terraform-aws-github-runners?ref=main"

  name            = "workflows-playground-github-runner"
  source_location = "https://github.com/my-org/my-repo.git"

  github_codeconnection_arn = local.github_codeconnection_arn
  environment_compute_type  = "BUILD_GENERAL1_MEDIUM"
  privileged_mode = true
}

Breaking Changes

Screenshots / Examples

Checklist

  • Updated README.md (or documentation auto-generated via terraform-docs)
  • Updated relevant or added new example configurations
  • Added/updated comments in code where necessary
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • My commit messages follow the Conventional Commits specification

Additional Notes


By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.

- Introduced a new variable `privileged_mode` to control Docker daemon access within the build container.
- Updated the main.tf to utilize the new variable for the CodeBuild project.
- Enhanced documentation to include the new variable in copilot instructions.
@baolsen
Copy link
Contributor

baolsen commented Feb 11, 2026

Thanks for the contribution @david-graesser

The change looks good to me.
Please run "pre-commit run -a" on your branch and it will update the docs so the CI will pass.

@baolsen baolsen merged commit b1ea6ac into cloudandthings:main Feb 12, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants