The public Abbey API. Used for integrating with Abbey and building interfaces to extend the Abbey platform. See https://docs.abbey.io for more information. This repository contains a Terraform provider that allows you to manage resources through the abbey API.
- Clone the repository:
git clone https://github.com/liblaber/terraform-provider-abbey.git
- Navigate to the directory:
cd terraform-provider-abbey
- Update module references:
go mod tidy
- Build the provider:
go build -o terraform-provider-abbey
- Move the provider to your plugins directory:
mkdir -p ~/.terraform.d/plugins/example.com/user/abbey/0.2.9/<distribution>
mv terraform-provider-abbey ~/.terraform.d/plugins/example.com/user/abbey/0.2.9/<distribution>
Note: The directory structure is important. The provider must be located at ~/.terraform.d/plugins/example.com/user/abbey/0.2.9/<distribution>/terraform-provider-abbey
Also please change example.com/user
and <distribution>
to match your real values.
To get the run terraform version
, possible values: linux_amd64
, darwin_arm64
, windows_amd64
, etc.
- Configure the provider:
In your Terraform configuration, reference the provider and supply the necessary credentials:
provider "abbey" {
host = "https://localhost/"
api_token = "YOUR_API_TOKEN"
}
To plan and apply your Terraform configuration:
- Initialize your configuration:
terraform init -plugin-dir=~/.terraform.d/plugins
- Plan your changes:
terraform plan
- Apply your configuration:
terraform apply
If you encounter any issues or unexpected behaviors, enable debug mode by setting the environment variable:
export TF_PROVIDER_DEBUG=true
Then, run your Terraform commands.
- Generate the docs:
go generate ./...
- To execute the provider's tests, follow these steps:
a. Run Unit Tests:
make unit-test
b. Run Acceptance Tests:
make acceptance-test
- Tag your release:
git tag v0.2.9
git push --tags
- Build a release binary for your platform:
GOOS=linux GOARCH=amd64 go build -o terraform-provider-abbey
- Upload the binary to the GitHub release or any other distribution method you prefer.
Note: For wide-reaching utility, consider registering your provider with the official Terraform provider registry once it becomes popular within the community.