Jonatan Jaworski
03/18/2022, 2:42 AMterraform plan
always displays this change, and apparently nothing happens after doing terraform apply
, so the only way of fixing it is manually changing the order in the tf files to match it, which is not practical when using references instead of the plain uuids (i.e, going: pact_user.john_doe.uuid
)
# pact_team.myTeam will be updated in-place
~ resource "pact_team" "myTeam" {
id = "b3a82ec1-a34e-4f82-845f-e41f9de3da78"
name = "MyTeam"
~ users = [
"967155a1-29a7-4aa3-8520-7bad949abad8",
- "1e8c0d39-7937-4647-8886-9e40690e6886",
"4e161b2b-b07a-4979-a69e-f5ed2727bfa4",
- "50011c55-2fa0-4e70-b5e5-9592fc38e36a",
"781a1bf2-9723-40c8-9cee-69ff9515c7f6",
+ "50011c55-2fa0-4e70-b5e5-9592fc38e36a",
+ "1e8c0d39-7937-4647-8886-9e40690e6886",
]
# (2 unchanged attributes hidden)
}
Rupam Saha
03/21/2022, 9:43 AMcontract_requiring_verification_published
is not supported yet.
Error: "events.0" must be one of the allowed events [contract_content_changed contract_published provider_verification_failed provider_verification_published provider_verification_succeeded], got contract_requiring_verification_published
I am using version = "0.4.3"
of the TF provider for Pact.
Is there any plan in your roadmap to support it or any workaround?
Thanks in advance 🙂Rupam Saha
03/21/2022, 12:22 PMquery parameters
and not request body
. However, I could not find the relevant information in the documentation and seems body
is a required field. Therefore, this is how my tried to write the request:
request {
url = "https://<jenkins-url>/generic-webhook-trigger/invoke?token=<token>&consumerName=CustomerWeb&monolithEnv=DOCKER&consumerPactUrl=$${pactbroker.pactUrl}&providerVersion=$${pactbroker.providerVersionNumber}&providerBranch=$${pactbroker.providerVersionBranch}"
method = "GET"
headers = {
"X-Content-Type" = "application/json"
}
body = <<EOF
{
"pact": "$${pactbroker.pactUrl}"
}
With the above configuration, I am getting the following error:
│ Error: "request.0.url" must be a valid URL, got: parse " \"https://********/generic-webhook-trigger/invoke?token=**********&consumerName=CustomerWeb&monolithEnv=DOCKER&consumerPactUrl=${pactbroker.pactUrl}&providerVersion=${pactbroker.providerVersionNumber}&providerBranch=${pactbroker.providerVersionBranch}\"\n": net/url: invalid control character in URL
Is there a way to pass query params instead of request body?Jonatan Jaworski
04/08/2022, 3:00 AMvariable "pactflow_roles" {
type = map(any)
description = "Roles defined by Pactflow"
default = {
administrator = "cf75d7c2-416b-11ea-af5e-53c3b1a4efd8",
ci_cd = "c1878b8e-d09e-11ea-8fde-af02c4677eb7",
guest = "d6938de2-e37c-11eb-b80e-3f68328092ca",
team_administrator = "d635f960-88f2-4f13-8043-4641a02dffa0",
user = "e9282e22-416b-11ea-a16e-57ee1bb61d18",
viewer = "9fa50562-a42b-4771-aa8e-4bb3d623ae60"
}
}
So that then I can go:
resource "pact_user" "john_doe" {
name = "John Doe"
email = "<mailto:jon@doe.com|jon@doe.com>"
active = true
type = "user"
roles = [
var.pactflow_roles["team_administrator"],
var.pactflow_roles["user"]
]
}
But only the user
role gets persisted, no the team administrator one.Jonatan Jaworski
04/27/2022, 10:53 PMuser
resource supports "user" and "system" as values for the type
property (which by the way should probably be included in the docs), but the email
is still required and the result is the creation of a regular user, not a system account.Matt (pactflow.io / pact-js / pact-go)
v0.0.8
of the terraform provider is out. It should now support system user, and hopefully address the ordering issues from beforeRupam Saha
06/14/2022, 11:26 AMdisplay_name
property which is available as a part of pact docker cli. We are auto generating the consumer names and in some case we would like to update the display name, and in order to make it maintainable, we would like to use this Terraform to do that.
Is it possible to add support for the display-name
as well as a part of this resource?
Thanks 🙂