You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add promoted_release_ids attribute to pipeline promotion resource
Add new promoted_release_ids computed attribute that returns the list of
release IDs created by a promotion (one for each target app).
The existing promoted_release_id attribute incorrectly returned the source
release ID instead of the promoted release IDs. This attribute is now
deprecated and returns the first value from promoted_release_ids for
backwards compatibility.
Changes:
- Add promoted_release_ids as computed list attribute
- Fetch promotion targets via PipelinePromotionTargetList API
- Extract release IDs from each target
- Deprecate promoted_release_id with clear messaging
- Set promoted_release_id to first value of promoted_release_ids
- Update documentation with examples
- Add schema tests for new attribute and deprecation
Testing:
- Schema test validates both attributes exist
- Schema test validates promoted_release_id is deprecated
- Schema test validates promoted_release_ids is a List
- All unit tests pass
- Manual test confirmed correct release IDs returned
value = heroku_pipeline_promotion.staging_to_multiple.promoted_release_ids
53
+
}
54
+
55
+
# Access a specific target's release ID
56
+
output "production_release_id" {
57
+
value = [
58
+
for release in heroku_pipeline_promotion.staging_to_multiple.promoted_release_ids :
59
+
release.release_id if release.app_id == heroku_app.production.id
60
+
][0]
61
+
}
49
62
```
50
63
51
64
## Argument Reference
@@ -65,4 +78,7 @@ The following attributes are exported:
65
78
*`id`: The UUID of the pipeline promotion.
66
79
*`status`: The status of the promotion (`pending`, `completed`).
67
80
*`created_at`: When the promotion was created.
68
-
*`promoted_release_id`: The UUID of the release that was promoted.
81
+
*`promoted_release_ids`: List of objects containing information about each promoted release. Each object has:
82
+
*`app_id`: The UUID of the target app that received the promotion.
83
+
*`release_id`: The UUID of the release created on that target app.
84
+
*`promoted_release_id`: **(Deprecated)** The UUID of the first promoted release. Use `promoted_release_ids` instead. This attribute is maintained for backwards compatibility and will be removed in a future major version.
0 commit comments