terraform-provider-powerdns

command module
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2020 License: MPL-2.0 Imports: 2 Imported by: 0

README

Terraform Provider

Requirements

  • Terraform 0.12.x
  • Go 1.11 (to build the provider plugin)

Building The Provider

Clone the provider repository:

$ git clone git@github.com:terraform-providers/terraform-provider-powerdns

Navigate to repository directory:

$ cd terraform-provider-powerdns

Build repository:

$ go build

This will compile and place the provider binary, terraform-provider-powerdns, in the current directory.

Using the provider

For detailed usage see provider's documentation page

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.11+ is recommended). You'll also need to have $GOPATH/bin in your $PATH.

Make sure the changes you performed pass linting:

$ make lint

To install the provider, run make build. This will build the provider and put the provider binary in the current working directory.

$ make build

In order to run local provider tests, you can simply run make test.

$ make test

For running acceptance tests locally, you'll need to use docker-compose to prepare the test environment:

docker-compose run --rm setup

After setup is done, run the acceptance tests with make testacc (note the env variables needed to interact with the PowerDNS container)

  • HTTP
~$  PDNS_SERVER_URL=http://localhost:8081 \
    PDNS_API_KEY=secret \
    make testacc
  • HTTPS
~$  PDNS_SERVER_URL=localhost:4443 \
    PDNS_API_KEY=secret \
    PDNS_CACERT=$(cat ./tests/files/ssl/rootCA/rootCA.crt) \
    make testacc

And finally cleanup containers spun up by docker-compose:

~$ docker-compose down

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL