_Fork from mrcrilly/terraform-provider-awx for develop additional functions.
Coming soon.
A fresh AWX instance is required for automated tests, so they can ensure terraform provider is working by targetting a live AWX instance.
- Ensure GoReleaser is installed
- Run build command:
goreleaser build --snapshot --rm-dist
Copy the provider to user's ~/.terraform.d
folder.
Important: if building the provider in an operating system other than Linux x86_64, adjust the paths below replacing
linux_amd64
with the corresponding platform code. E.g.:darwin_amd64
for macOS.
mkdir -p ~/.terraform.d/plugins/github.com/robyt96/awx/0.1/linux_amd64/terraform-provider-awx
find ./dist/terraform-provider-awx_linux_amd64/* -name 'terraform-provider-awx*' -print0 | xargs -0 -I {} mv {} ~/.terraform.d/plugins/github.com/robyt96/awx/0.1/linux_amd64/terraform-provider-awx
go test ./test -count=1
For convenience, all the steps above can be achieved by a single command that combines all of them:
goreleaser build --snapshot --rm-dist \
&& mkdir -p ~/.terraform.d/plugins/github.com/robyt96/awx/0.1/linux_amd64/ \
&& find ./dist/terraform-provider-awx_linux_amd64/* -name 'terraform-provider-awx*' -print0 | xargs -0 -I {} mv {} ~/.terraform.d/plugins/github.com/robyt96/awx/0.1/linux_amd64/terraform-provider-awx \
&& go test ./test -count=1
The files in ./docs
folder are generated by executing the tfplugindocs generate
command (see https://github.com/hashicorp/terraform-plugin-docs)