A couple of weeks ago I see an email on the smartos emailing list mentioning that John had created a terraform smartos provider for terraform.
Installing the provider is pretty easy. I did the following steps in my smartos zone:
My current go version is:
go version go1.10 solaris/amd64
Make sure you have setup go correctly:
# mkdir ~/gopath # export GOPATH=~/gopath # go get github.com/john-terrell/terraform-provider-smartos
Lets go to the download directory and compile the source code:
# cd gopath/src/github.com/john-terrell/terraform-provider-smartos # make build # ls gopath/bin/terraform-provider-smartos
Now you can use it as a terraform provider. I copied the binary file into the terraform plugin dir:
# cp ~/gopath/bin/terraform-provider-smartos ~/.terraform.d/plugins
You are now good to go to follow the example in the github repo.
Kudos go to John for creating this awesome plugin!