pactflow / terraform-provider-pact

Terraform provider for Pact Broker (and Pactflow)
https://pactflow.io
MIT License
24 stars 4 forks source link

Feature: support environments #17

Closed mefellows closed 2 years ago

mefellows commented 3 years ago

New environments resource:

resource "pact_environment" "production" {
  name = "prod"
  displayName = "Production"
  isProduction = true
  contacts = [
     {
        name = "Matt Fellows"
        details = { arbitrary map }
     }
  ] 
}

Update pact_team resource to support associating with environments:

resource "pact_team" "Simpsons" {
  name = "Simpsons${var.build_number}"
  administrators = [
    pact_user.blah.uuid
  ]
  ...

  # Order matters!
  environments = [
    pact_environment.dev.uuid,
    pact_environment.test.uuid,
    pact_environment.production.uuid,
    "in-built-uuid-1234" # dev
    "in-built-uuid" # prod
  ]
}