This allows users to wrap a Terraform Provider plugin and inject custom logging and auditing on operations at per Resource level.
Make sure you project is under $GOPATH
.
$ go build -o <target> ./cmd/aws
The <target>
here should follow Terraform plugin naming convention.
In other word, it should be terraform-provider-aws_vX.Y.Z
.
Then, put the built plugin to the third party plugins directory (i.e., .terraform/plugins/
).
$ mkdir -p ~/.terraform/plugins/
$ cp <target> ~/.terraform/plugins/
Then, run terraform init
to pick up the new plugin.
$ cd <config_dir>
$ terraform init -upgrade