This Terraform module was done using Terraform Plugin Framework starting from a fork of the Terraform example terraform-provider-scaffolding.
terraform {
required_providers {
beeswax = {
source = "martin-magakian/beeswax"
version = "1.0.5" # check latest version (https://registry.terraform.io/providers/martin-magakian/beeswax/latest)
}
}
}
provider "beeswax" {
host = "https://myorg.api.beeswax.com"
email = "myemail@myorg.com"
password = "myPasswd"
}
resource "beeswax_user" "example" {
super_user = false
email = "myemail@myorg.com"
first_name = "Martin"
last_name = "Magakian"
role_id = 1
account_id = 1
active = true
all_account_access = true
account_group_ids = []
}
During development it's faster to using a locally build provider.
Compile the plugin the the /bin
directory:
make build
Edit your ~/.terraformrc
:
provider_installation {
dev_overrides {
"registry.terraform.io/martin-magakian/beeswax" = "/<PAHT>/terraform-provider-beeswax/bin/"
}
direct {}
}
Use the provider in your Terraform project:
terraform {
required_providers {
beeswax = {
source = "registry.terraform.io/martin-magakian/beeswax"
}
}
}
Your terraform apply
will now use the locally build plugin.
make doc
When code is merge in main
simply tag the version and push. Github action will automatically release the provider to Terraform Registry.
Example:
git tag v1.0.5
git push origin v1.0.5
- Only user and role are supported. See Beeswax documentation for all resources available.
- data resource can only use ID.