/terraform-provider-azureipam

Terraform provider to manage reservations in Azure IPAM solution through REST API

Primary LanguageGoApache License 2.0Apache-2.0

Terraform Provider AzureIPAM

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.

Build provider

Run the following command to build the provider

$ make build

Acceptance tests

To locally validate the implemented acceptance tests, simply run

$ make testacc

Local release build

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:

Test sample configuration

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