Skip to content

Latest commit

 

History

History
61 lines (43 loc) · 1.5 KB

File metadata and controls

61 lines (43 loc) · 1.5 KB

Terraform Provider petstore

This Terraform provider was generated using OpenAPI Generator.

Requirements

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the Go install command:
go install

Using the provider

terraform {
  required_providers {
    petstore = {
      source = "registry.terraform.io/example/petstore-server"
    }
  }
}

provider "petstore" {
  endpoint = "http://petstore.swagger.io/v2"
}

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).

To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.

For local development and testing, add a dev_overrides block to your ~/.terraformrc so that Terraform uses the locally built binary instead of fetching from the registry:

provider_installation {
  dev_overrides {
    "registry.terraform.io/example/petstore-server" = "${GOPATH}/bin"
  }
  direct {}
}

With dev_overrides configured, you do not need to run terraform init for the provider.

To generate or update documentation, run go generate.

In order to run the full suite of Acceptance tests, run make testacc.

make testacc