This provider is intended to manage the reservation of network ranges in the Azure IPAM solution. IPAM solution is a simple, straightforward way to manage IP address spaces in Azure, and it's's required to have a previous implementation of this solution.
The provider makes use of the IPAM REST API to manage CIDR range reservations in a space and block from those configured in the application.
Run the following command to build the provider
$ make build
To locally validate the implemented acceptance tests, simply run
$ make testacc
For the release creation process goreleaser v2 or later is used, so it has to be previously installed.
$ go install github.com/goreleaser/goreleaser/v2@latest
And to run the release process locally, simply run
$ make release
You will find the releases in the /dist
directory. Probably you will need to rename the provider binary to terraform-provider-azureipam
before use it.
To run locally you can proceed in one of the following ways:
-
Create a Terraform CLI Configuration File with Development Overrides that includes a
provider_installation
block with adev_overrides
block, specifiyng the path where your local binary is created. -
Copy the binary file into one of the implied configuration
filesystem_mirror
folder after each build.
First, build and install the provider.
$ make install
Then, navigate to a specific folder inside tests
directory.
$ cd tests/reservation_resource
Remember to configure the provider with your environment information
export AZUREIPAM_TOKEN="eyJ0eXAi......"
export AZUREIPAM_API_URL="https://myazureipam.azurewebsites.net"
And initialize the workspace and apply the sample configuration.
$ terraform init && terraform apply