Skip to content

Latest commit

 

History

History
83 lines (59 loc) · 2.59 KB

File metadata and controls

83 lines (59 loc) · 2.59 KB

PactFlow (PactBroker) Configuration with Terraform

Example Terraform project for configuring PactFlow.

The Terraform definitions automate configuration of:

  • Creation of user accounts and teams.
  • Creation of Pacticipants.
  • Configuration of Webhooks.

For more information about the Pact Broker Terraform Provider, check out the documentation on the Pact website or the Terraform Registry.

Configuring the PactFlow instance

brew install tfenv
tfenv install
export TF_VAR_pact_host=https://<your-account-name>.pactflow.io
 export TF_VAR_pact_access_token=<your-read-write-api-token>

export TF_VAR_default_user_name=<your-first-and-last-name>  # Name with which you registered on pactflow.io
export TF_VAR_default_user_email=<your-email>
  • Init Terraform modules
terraform init
terraform import pact_user.default <your-user-uuid>
terraform import pact_team.default <default-team-uuid>
  • Run Terraform apply to create the rest of the resources
terraform apply

Development

  • Lint
brew install tflint
brew install tfsec

tflint
tfsec