Terraform/Pulumi - Add relation resource
C
Calum Dee
In port it is possible to have cyclic relations - e.g. issue belong to service, service has relation for most recent issue - these can't be properly defined in the pulumi provider as there is no way to properly set the depends on and in a clean org / pulumi up it can't add either blueprint first because the related blueprint doesn't exist
This issue was identified with aggregation properties and countered by separating them out into their own resource despite in port being defined on the blueprint so it would be helpful to have a similar resource for relations to allow this cyclical relations to be made
M
Mark Tarry
I've just hit this issue. What I'd intended to set up (via Terraform):
- Blueprint: deployment
- Relationship:
latest_attempt
relationship to deployment_attempt
- Mirror
$createdAt
, status
and link
properties from latest_attempt
- Blueprint: deployment_attempt
- Properties;
status
, link
- Relationship: to
deployment
(mandatory)But I cannot do this, as Terraform cannot provision resources with a cyclic dependency:
Error: Cycle: module.data-model.module.blueprint__deployment.output.identifier (expand), module.data-model.module.blueprint__deployment_attempt.var.relations (expand), module.data-model.module.blueprint__deployment_attempt.port_blueprint.blueprint, module.data-model.module.blueprint__deployment_attempt.output.identifier (expand), module.data-model.module.blueprint__deployment.var.relations (expand), module.data-model.module.blueprint__deployment.port_blueprint.blueprint
Note: that we have wrapped
port_blueprint
resources inside a Terraform module (blueprint
).I also realise that https://roadmap.port.io/ideas/p/new-aggregation-property-type-latest would be of use in my specific use-case.