v2.0.0
What's Changed
Breaking changes
Changed the action resource to match the new action structure of Port's api
The change in the resource:
- There is a new
self_service_trigger
attribute which is an object detailing all the values the action needs to trigger. - The
trigger
is renamed to operation and it has moved into theself_service_trigger
object - The
blueprint
attribute is renamed toblueprint_identifier
and it has moved into the self_service_trigger object (and its no longer a requirement) - The
user_properties
,order_properties
andrequired_jq_query
attributes have all moved from the root into theself_service_trigger
object - The
*_method
attributes now support controlling the payload via jq. The new value should be the json from theinvocationMethod
variable as you can find it in the UI by editing an action's json. The specific attribute name would change between different invocation methods.
You can see the full specification for the new action resource the terraform docs.
Documentation for the new action structure can be found in Port docs.
For further help you can contact the Port team on our slack community.
For example, the following action as defined in version v1.x.x
:
resource "port_action" "myAction" {
title = "My Action"
blueprint = port_blueprint.my_blueprint.identifier
identifier = "myAction"
trigger = "CREATE"
required_approval = false
gitlab_method = {
group_name = "myGroup"
project_name = "myProj"
}
user_properties = {
string_props = {
myString = {
title = "Prop"
}
}
number_props = {
myNumber = {
"title" = "Prop"
}
}
}
}
Would be defined as follows in version v2.x.x
resource "port_action" "myAction" {
title = "My Action"
identifier = "myAction"
self_service_trigger = {
operation = "CREATE"
blueprint_identifier = port_blueprint.my_blueprint.identifier
required_approval = false
user_properties = {
string_props = {
myString = {
title = "Prop"
}
}
number_props = {
myNumber = {
"title" = "Prop"
}
}
}
}
gitlab_method = {
group_name = "myGroup"
project_name = "myProj"
workflowInputs = jsonencode({
runId : "{{ .run.id }}"
myString : "{{ .inputs.myString }}"
myNumber : "{{ .inputs.` }}"
})
}
}
Contributed by @talsabagport in #140
Full Changelog: v1.11.1...v2.0.0