Skip to content

Commit f716018

Browse files
authored
[Internal] Generate models with correctly computed annotations (#4316)
## Changes <!-- Summary of your changes that are easy to understand --> In this PR, we've tackled an issue with our plugin framework models. Previously, fields that were meant to be computed were mistakenly generated with "computed,optional" annotations instead of just "computed." Also, if any fields were indicated as having effective values, the effective fields also ended up with the wrong "computed,optional" tag rather than the correct "computed." We've regenerated the models to correct these annotations. ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [ ] `make test` run locally - [ ] relevant change in `docs/` folder - [ ] covered with integration tests in `internal/acceptance` - [ ] relevant acceptance tests are passing - [ ] using Go SDK --------- Co-authored-by: Omer Lachish <[email protected]>
1 parent 3318833 commit f716018

File tree

9 files changed

+109
-127
lines changed

9 files changed

+109
-127
lines changed

internal/providers/pluginfw/products/app/resource_app.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,6 @@ func (a resourceApp) Metadata(ctx context.Context, req resource.MetadataRequest,
3737
func (a resourceApp) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
3838
resp.Schema = tfschema.ResourceStructToSchema(ctx, apps_tf.App{}, func(cs tfschema.CustomizableSchema) tfschema.CustomizableSchema {
3939
cs.AddPlanModifier(stringplanmodifier.RequiresReplace(), "name")
40-
// Computed fields
41-
for _, p := range []string{
42-
"active_deployment",
43-
"app_status",
44-
"compute_status",
45-
"create_time",
46-
"creator",
47-
"default_source_code_path",
48-
"pending_deployment",
49-
"service_principal_client_id",
50-
"service_principal_id",
51-
"service_principal_name",
52-
"update_time",
53-
"updater",
54-
"url",
55-
} {
56-
cs.SetReadOnly(p)
57-
}
5840
exclusiveFields := []string{"job", "secret", "serving_endpoint", "sql_warehouse"}
5941
paths := path.Expressions{}
6042
for _, field := range exclusiveFields[1:] {

internal/service/apps_tf/model.go

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/service/catalog_tf/model.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/service/cleanrooms_tf/model.go

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)