Commit 15853d5
Force recomputation of computed values for Grafana Cloud stacks on slug update (#1269)
* Force recomputation of computed values for Grafana Cloud stacks on slug update
Names of some attributes of the Grafana Cloud stack depend on the slug
of the stack. While the current state of the provider does update these
attributes on the resource in the state, if these attributes are
referenced in an output clause, the absence of a change in the generated
plan renders the change unnoticed and stale information is outputted on
a first apply. By using https://pkg.go.dev/github.com/hashicorp/terraform-plugin-sdk/helper/customdiff
it's possible to mark these values to be computed again if the slug
changes, thus being reflected as changes in the plan and generated an
up to date output.
Fixes #1191
* Adjust code formatting with go fmt
---------
Co-authored-by: Stefano Boriero <[email protected]>1 parent 06964e4 commit 15853d5
1 file changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
228 | 246 | | |
229 | 247 | | |
230 | 248 | | |
| |||
0 commit comments