Skip to content

Commit 8534991

Browse files
committed
prevent flattener from generating when writeOnly is set on root fields
1 parent 727b57d commit 8534991

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mmv1/api/resource.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ func (r Resource) InIdFormat(prop Type) bool {
12231223
// Functions used to create slices of resource properties that could not otherwise be called from within generating templates.
12241224
func (r Resource) ReadProperties() []*Type {
12251225
return google.Reject(r.GettableProperties(), func(p *Type) bool {
1226-
return p.IgnoreRead
1226+
return p.IgnoreRead || p.WriteOnly
12271227
})
12281228
}
12291229

0 commit comments

Comments
 (0)