DbtBuildKit Module¶
This module manages the ECR repository and GitHub connections via AWS CodeConnections.
Resources¶
The module creates the following AWS resources:
aws_ecr_repository.this: ECR repository to store Docker images
aws_ecr_lifecycle_policy.delete: ECR lifecycle policy
aws_codeconnections_connection.github: GitHub connection via CodeConnections (optional)
Inputs¶
Name |
Description |
Type |
Default |
Required |
|---|---|---|---|---|
aws_region |
AWS region where resources will be created |
string |
n/a |
yes |
connection_check_interval_seconds |
Interval (in seconds) between GitHub connection status checks |
number |
10 |
no |
connection_wait_timeout_minutes |
Maximum time (in minutes) to wait for GitHub connection approval |
number |
30 |
no |
create_github_connection |
If true, creates a new GitHub connection. If false, uses existing connection (via existing_github_connection_arn) |
bool |
true |
no |
ecr_days_lifecycle_policy |
Number of images to retain in lifecycle policy |
number |
5 |
no |
ecr_image_tag |
Docker image tag in ECR repository |
string |
“latest” |
no |
ecr_image_tag_mutability |
Image tag mutability in ECR |
string |
“MUTABLE” |
no |
ecr_repository_name |
ECR repository name. If not provided, uses default: {env}-dbtbuildkit |
string |
null |
no |
ecr_repository_name_exact |
If true, uses exact repository name. If false, adds prefix {env}-{project}- |
bool |
true |
no |
ecr_scan_on_push |
Enables image scan on push |
bool |
true |
no |
env |
Deployment environment (accepted values: dev, stg, prd) |
string |
n/a |
yes |
existing_github_connection_arn |
ARN of an existing GitHub connection to use. If provided, does not create new connection |
string |
null |
no |
github_organization |
GitHub organization (required). Will be used in CodeConnections connection name: {env}-{org}-github-connection. Required for dbt to extract organization name. |
string |
n/a |
yes |
project |
Project name for identification and organization of AWS resources |
string |
n/a |
yes |
tags |
Map of common tags applied to all module resources |
map(string) |
n/a |
yes |
use_github_native |
If true, uses native GitHub integration via CodeConnections. If false, uses SSH |
bool |
true |
no |
wait_for_connection_approval |
If true, waits for manual GitHub connection approval in AWS console before continuing |
bool |
true |
no |
Outputs¶
Name |
Description |
|---|---|
ecr_repository_arn |
ARN of created ECR repository |
ecr_repository_name |
Name of created ECR repository |
ecr_repository_url |
ECR repository URL for Docker image push/pull |
github_connection_arn |
GitHub connection ARN (created or existing) |
github_connection_id |
GitHub connection ID (last part of ARN) |
github_connection_name |
GitHub connection name |
github_connection_status |
Connection status (PENDING, AVAILABLE, ERROR) |
github_connection_url |
URL to complete connection authorization (if status PENDING) |
Examples¶
See the Usage Examples section for practical usage examples.
Navigation¶
DbtBuildKit Documentation - Home
Quick Start Guide - Quick Start Guide
Usage Examples - Usage Examples
DBT Module - DBT Module
CI/CD Setup - CI/CD Setup Guide