skaff
is a Terraform AWS Provider scaffolding tool.
- Figure out what you're trying to do:
- Create a resource or a data source?
- AWS Go SDK v1 or v2 code?
- Name of the new resource or data source?
- Use
skaff
to generate provider code - Go through the generated code completing code and customizing for the AWS Go SDK API
- Run, test, refine
- Remove "TIP" comments
- Submit code in pull request
- Use Git to clone the GitHub https://github.com/hashicorp/terraform-provider-aws repository.
cd skaff
go install .
- Change directories to the service where your new resource will reside. E.g.,
cd ../internal/service/mq
. - To get help, enter
skaff
without arguments. - Generate a resource. E.g.,
skaff resource --name BrokerReboot
(or equivalentlyskaff resource -n BrokerReboot
).
$ skaff --help
Usage:
skaff [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
datasource Create scaffolding for a data source
help Help about any command
resource Create scaffolding for a resource
Flags:
-h, --help help for skaff
Generate the autocompletion script for skaff for the specified shell
$ skaff completion --help
Usage:
skaff completion [command]
Available Commands:
bash Generate the autocompletion script for bash
fish Generate the autocompletion script for fish
powershell Generate the autocompletion script for powershell
zsh Generate the autocompletion script for zsh
Flags:
-h, --help help for completion
Use "skaff completion [command] --help" for more information about a command
Create scaffolding for a data source
$ skaff datasource --help
Usage:
skaff datasource [flags]
Flags:
-c, --clear-comments Do not include instructional comments in source
-f, --force Force creation, overwriting existing files
-h, --help help for datasource
-n, --name string Name of the entity
-s, --snakename string If skaff doesn't get it right, explicitly give name in snake case (e.g., db_vpc_instance)
Create scaffolding for a resource
$ skaff resource --help
Usage:
skaff resource [flags]
Flags:
-c, --clear-comments Do not include instructional comments in source
-f, --force Force creation, overwriting existing files
-h, --help help for resource
-n, --name string Name of the entity
-s, --snakename string If skaff doesn't get it right, explicitly give name in snake case (e.g., db_vpc_instance)