@@ -15,19 +15,26 @@ A pipeline promotion allows you to deploy releases from one app to other apps wi
1515pipeline. This enables infrastructure-as-code workflow for promoting code between pipeline stages
1616such as staging to production.
1717
18- Currently promotes the latest release from the source app. Support for promoting specific releases
19- (` release_id ` parameter) requires additional API support from the Heroku platform team.
18+ You can promote either the latest release from the source app, or specify a particular release by ID.
2019
2120## Example Usage
2221
2322``` hcl
24- # Basic promotion from staging to production
23+ # Basic promotion from staging to production (latest release)
2524resource "heroku_pipeline_promotion" "staging_to_prod" {
2625 pipeline = heroku_pipeline.my_app.id
2726 source_app_id = heroku_app.staging.id
2827 targets = [heroku_app.production.id]
2928}
3029
30+ # Promotion of a specific release
31+ resource "heroku_pipeline_promotion" "specific_release" {
32+ pipeline = heroku_pipeline.my_app.id
33+ source_app_id = heroku_app.staging.id
34+ release_id = "01234567-89ab-cdef-0123-456789abcdef"
35+ targets = [heroku_app.production.id]
36+ }
37+
3138# Promotion to multiple target apps
3239resource "heroku_pipeline_promotion" "staging_to_multiple" {
3340 pipeline = heroku_pipeline.my_app.id
@@ -46,8 +53,7 @@ The following arguments are supported:
4653* ` pipeline ` - (Required) The UUID of the pipeline containing the apps.
4754* ` source_app_id ` - (Required) The UUID of the source app to promote from.
4855* ` targets ` - (Required) Set of UUIDs of target apps to promote to.
49- * ` release_id ` - (Optional) ** Not yet supported** . The UUID of a specific release to promote.
50- Currently returns an error as this requires additional Heroku platform API support.
56+ * ` release_id ` - (Optional) The UUID of a specific release to promote. If not specified, promotes the latest release from the source app.
5157
5258## Attributes Reference
5359
@@ -64,9 +70,5 @@ The following attributes are exported:
6470* All apps (source and targets) must be in the same pipeline.
6571* All apps must have the same generation (Cedar or Fir). See [ ` heroku_pipeline ` ] ( ./pipeline.html ) for generation compatibility requirements.
6672* The source app must have at least one release to promote.
67- * Promotions copy the latest release from the source app to all target apps.
68-
69- ## Future Enhancement
73+ * Promotions copy either the latest release (if no ` release_id ` specified) or the specified release to all target apps.
7074
71- The ` release_id ` parameter will be supported once the Heroku platform team adds the necessary API
72- functionality. This will enable promoting specific releases rather than just the latest release.
0 commit comments