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
Major UX improvement: generation is now automatically determined
from the space the app is deployed to, rather than user-configured.
Changes:
- App 'generation' field is now computed-only (was optional)
- Apps in Fir spaces automatically get generation = 'fir'
- Apps in Cedar spaces (or no space) get generation = 'cedar'
Core Improvements:
- Fix CNB buildpack errors by conditionally querying based on generation
- Smart buildpack handling: skip traditional queries for Fir apps
- Automatic space generation detection via SpaceInfo API
- Better error prevention and more intuitive configuration
Test Improvements:
- Consolidate acceptance tests with single space approach
- Remove invalid validation tests (no longer user-configurable)
- Update test expectations for computed generation behavior
- Maintain comprehensive coverage for both generations
Documentation Updates:
- Update examples to show space-based generation approach
- Clarify that generation is computed from space deployment
- Improve migration guide with proper space-first workflow
- Update argument/attribute references for computed field
# Apps deployed to Fir spaces automatically use Fir generation
42
51
resource "heroku_app" "fir_app" {
43
-
name = "my-fir-app"
44
-
region = "us"
45
-
generation = "fir"
52
+
name = "my-fir-app"
53
+
region = "virginia"
54
+
space = heroku_space.fir_space.name
55
+
56
+
organization {
57
+
name = "my-org"
58
+
}
46
59
47
60
config_vars = {
48
61
FOOBAR = "baz"
@@ -75,7 +88,7 @@ The following arguments are supported:
75
88
*`name` - (Required) The name of the application. In Heroku, this is also the
76
89
unique ID, so it must be unique and have a minimum of 3 characters.
77
90
*`region` - (Required) The region that the app should be deployed in.
78
-
*`generation` - (Optional) Generation of the app platform. Valid values are `cedar` and `fir`. Defaults to `cedar` for backward compatibility. **ForceNew**.
91
+
*`generation` - (Computed) Generation of the app platform. Automatically determined based on the space the app is deployed to. Apps in Fir generation spaces will be `fir`, all other apps will be `cedar`.
79
92
-**Cedar**: Traditional platform supporting buildpacks, stack configuration, and internal routing
80
93
-**Fir**: Next-generation platform with Cloud Native Buildpacks (CNB). Does not support `buildpacks`, `stack`, or `internal_routing` fields
81
94
*`stack` - (Optional) The application stack is what platform to run the application in. **Note**: Not supported for `fir` generation apps.
@@ -122,7 +135,7 @@ The following attributes are exported:
122
135
123
136
*`id` - The ID (UUID) of the app.
124
137
*`name` - The name of the app.
125
-
*`generation` - Generation of the app platform (cedar or fir). Defaults to cedar.
138
+
*`generation` - Generation of the app platform (cedar or fir). Automatically determined from the space the app is deployed to.
126
139
*`stack` - The application stack is what platform to run the application in.
127
140
*`space` - The private space the app should run in.
128
141
*`internal_routing` - Whether internal routing is enabled the private space app.
@@ -142,7 +155,7 @@ The following attributes are exported:
142
155
143
156
## Cloud Native Buildpacks (Fir Generation)
144
157
145
-
When using the Fir generation (`generation = "fir"`), applications use Cloud Native Buildpacks (CNB) instead of traditional Heroku buildpacks. This requires different configuration approaches:
158
+
When apps are deployed to Fir generation spaces, they automatically use Cloud Native Buildpacks (CNB) instead of traditional Heroku buildpacks. This requires different configuration approaches:
146
159
147
160
### project.toml Configuration
148
161
@@ -164,28 +177,44 @@ BP_NODE_VERSION = "18.*"
164
177
165
178
When migrating from Cedar to Fir generation:
166
179
167
-
1.**Remove incompatible fields**: Remove `buildpacks`, `stack`, and `internal_routing` from your Terraform configuration
168
-
2.**Add project.toml**: Create a `project.toml` file in your application code with buildpack configuration
169
-
3.**Update generation**: Set `generation = "fir"` in your app resource
170
-
4.**Redeploy**: Deploy your application with the new configuration
180
+
1.**Create Fir space**: Create a new space with `generation = "fir"`
181
+
2.**Remove incompatible fields**: Remove `buildpacks`, `stack`, and `internal_routing` from your Terraform configuration
182
+
3.**Add project.toml**: Create a `project.toml` file in your application code with buildpack configuration
183
+
4.**Update app space**: Change your app's `space` to use the Fir space
184
+
5.**Redeploy**: Deploy your application with the new configuration
171
185
172
186
```hcl-terraform
173
187
# Before (Cedar)
188
+
resource "heroku_space" "cedar_space" {
189
+
name = "my-space"
190
+
organization = "my-org"
191
+
region = "virginia"
192
+
}
193
+
174
194
resource "heroku_app" "example" {
175
195
name = "my-app"
176
-
region = "us"
196
+
region = "virginia"
197
+
space = heroku_space.cedar_space.name
177
198
178
199
buildpacks = ["heroku/nodejs"]
179
200
stack = "heroku-22"
180
201
}
181
202
182
203
# After (Fir)
204
+
resource "heroku_space" "fir_space" {
205
+
name = "my-space-fir"
206
+
organization = "my-org"
207
+
region = "virginia"
208
+
generation = "fir"
209
+
}
210
+
183
211
resource "heroku_app" "example" {
184
-
name = "my-app"
185
-
region = "us"
186
-
generation = "fir"
212
+
name = "my-app"
213
+
region = "virginia"
214
+
space = heroku_space.fir_space.name
187
215
188
216
# buildpacks and stack removed - configured via project.toml
217
+
# generation is automatically "fir" from the space
returnfmt.Errorf("buildpacks are not supported for %s generation apps. Use Cloud Native Buildpacks and configure via project.toml instead", generationStr)
0 commit comments