terraform-provider-cmdexec

command module
v0.0.0-...-9bfa543 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2020 License: MIT Imports: 2 Imported by: 0

README

terraform-provider-cmdexec

What is this

terraform-provider-cmdexec provides command execution from Terraform Configuration.
Terraform has local-exec provisioner by default. but provisioner is executed when terraform apply. On the other hand, terraform-provider-cmdexec execute a command when terraform plan.
This provider was originally created for penetration testing of CI/CD pipeline.

Requirements

How to use

To install the provider, please run make install.

make install

To use the provider, please write datasource. value of command is executed.

data "cmdexec_execute" "sample" {
  command = "echo test"
}

To get output of the executed command when terraform plan, please write resource.

resource "cmdexec_output" "sample" {
  rc     = data.cmdexec_execute.sample.rc
  output = data.cmdexec_execute.sample.output
}

To build the provider for Linux(x64), please run make build-linux

make build-linux

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL