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 Fir generation validation for heroku_build resource
Validates that buildpacks cannot be specified for Fir generation apps, which use Cloud Native Buildpacks configured via project.toml instead.
- Add plan-time and apply-time validation for buildpack compatibility
- Add comprehensive unit and acceptance tests
- Update documentation with generation-specific examples
- Add build features to generation feature matrix
@@ -22,6 +22,15 @@ If the build fails, the build log will be output in the error message.
22
22
23
23
To start the app from a successful build, use a [Formation resource](formation.html) to specify the process, dyno size, and dyno quantity.
24
24
25
+
## Generation Compatibility
26
+
27
+
Build configuration varies between Cedar (traditional) and Fir (next-generation) apps:
28
+
29
+
-**Cedar apps**: Support traditional `buildpacks` configuration for specifying buildpack URLs or names
30
+
-**Fir apps**: Use [Cloud Native Buildpacks](https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app) configured via `project.toml` in the source code. The `buildpacks` argument cannot be used with Fir generation apps.
31
+
32
+
Apps inherit their generation from their space (Fir) or default to Cedar when not in a space.
33
+
25
34
## Source code layout
26
35
27
36
The code contained in the source directory or tarball must follow the layout required by the [buildpack](https://devcenter.heroku.com/articles/buildpacks)
@@ -46,6 +55,25 @@ A [`heroku.yml` manifest](https://devcenter.heroku.com/articles/build-docker-ima
46
55
file is required to declare which `Dockerfile` to build for each process. Be careful not to create conflicting configuration
47
56
between `heroku.yml` and Terraform, such as addons or config vars.
48
57
58
+
### Building with Cloud Native Buildpacks (Fir Generation)
59
+
60
+
Fir generation apps use [Cloud Native Buildpacks](https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app) instead of traditional buildpacks. Buildpack configuration must be specified in a `project.toml` file in the source code rather than the Terraform configuration.
61
+
62
+
The `buildpacks` argument cannot be used with Fir generation apps. Attempting to do so will result in an error during `terraform apply`.
63
+
64
+
Example `project.toml` for a Node.js app:
65
+
66
+
```toml
67
+
[build]
68
+
buildpacks = ["heroku/nodejs"]
69
+
70
+
[[build.env]]
71
+
name = "NODE_ENV"
72
+
value = "production"
73
+
```
74
+
75
+
For more information, see [Using Multiple Buildpacks for an App](https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app).
76
+
49
77
## Source URLs
50
78
A `source.url` may point to any `https://` URL that responds to a `GET` with a tarball source code. When running `terraform apply`,
51
79
the source code will only be fetched once for a successful build. Change the URL to force a new resource.
@@ -68,14 +96,16 @@ of the Terraform configuration.
returnfmt.Errorf("buildpacks cannot be specified for %s generation apps. Use project.toml to configure Cloud Native Buildpacks instead. See: https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app", appGeneration)
0 commit comments