drift
A Drift detection module around terraform/terragrunt which allow to send a report
Installation
dagger install github.com/Dudesons/daggerverse/drift@v0.2.1
Entrypoint
Return Type
Drift !
Arguments
Name | Type | Description |
---|---|---|
mountPoint | String | Define where the code is mounted, this could impact for absolute module path |
Example
dagger -m github.com/Dudesons/daggerverse/drift@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
func (m *myModule) example() *Drift {
return dag.
Drift()
}
@function
def example() -> dag.Drift:
return (
dag.drift()
)
@func()
example(): Drift {
return dag
.drift()
}
Types
Drift 🔗
reportToSlack() 🔗
Send the report formated to slack
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
token | Secret ! | - | The slack token to use |
channelId | String ! | - | The channel id where the report will be posted |
color | String | "#9512a6" | Define the sidebar color of the message in slack |
Example
dagger -m github.com/Dudesons/daggerverse/drift@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
report-to-slack --token env:MYSECRET --channel-id string
func (m *myModule) example(ctx context.Context, token *Secret, channelId string) {
return dag.
Drift().
ReportToSlack(ctx, token, channelId)
}
@function
async def example(token: dagger.Secret, channel_id: str) -> None:
return await (
dag.drift()
.report_to_slack(token, channel_id)
)
@func()
async example(token: Secret, channelId: string): Promise<void> {
return dag
.drift()
.reportToSlack(token, channelId)
}
detection() 🔗
Trigger the drift detection
Return Type
Drift !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | All the terraform/terragrunt code necessary in order to be able to run plan |
stackRootPath | String ! | - | The root path where stack are living |
maxParallelization | Integer ! | - | The number of execution in parallel we want to have, 0 mean no limit |
cacheBursterLevel | String | "hour" | Define if the cache burster level is done per day (daily), per hour (hour), per minute (minute), per second (default) |
Example
dagger -m github.com/Dudesons/daggerverse/drift@aa4374e0a17197ef1a0dfaaf77fbb50a66a7c0ec call \
detection --src DIR_PATH --stack-root-path string --max-parallelization integer
func (m *myModule) example(src *Directory, stackRootPath string, maxParallelization int) *Drift {
return dag.
Drift().
Detection(src, stackRootPath, maxParallelization)
}
@function
def example(src: dagger.Directory, stack_root_path: str, max_parallelization: int) -> dag.Drift:
return (
dag.drift()
.detection(src, stack_root_path, max_parallelization)
)
@func()
example(src: Directory, stackRootPath: string, maxParallelization: number): Drift {
return dag
.drift()
.detection(src, stackRootPath, maxParallelization)
}