Skip to content

Commit

Permalink
fix: omit null defaultValue in bpmetadata (#2048)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Peabody <[email protected]>
Co-authored-by: Awais Malik <[email protected]>
  • Loading branch information
3 people authored Jan 5, 2024
1 parent c49c5c5 commit 1b5665e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL := /bin/bash

# Changing this value will trigger a new release
VERSION=v1.2.13
VERSION=v1.2.14
BINARY=bin/cft
GITHUB_REPO=github.com/GoogleCloudPlatform/cloud-foundation-toolkit
PLATFORMS := linux windows darwin
Expand Down
2 changes: 0 additions & 2 deletions cli/bpmetadata/int-test/goldens/golden-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ spec:
- name: names
description: Bucket name suffixes.
varType: list(string)
defaultValue: null
required: true
- name: prefix
description: Prefix used to generate the bucket name.
Expand All @@ -160,7 +159,6 @@ spec:
- name: project_id
description: Bucket project id.
varType: string
defaultValue: null
required: true
- name: public_access_prevention
description: Prevents public access to a bucket. Acceptable values are inherited or enforced. If inherited, the bucket uses public access prevention, only if the bucket is subject to the public access prevention organization policy constraint.
Expand Down
3 changes: 3 additions & 0 deletions cli/bpmetadata/tfconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ func getBlueprintVariable(modVar *tfconfig.Variable) *BlueprintVariable {
Required: modVar.Required,
VarType: modVar.Type,
}
if modVar.Default == nil {
return v
}

vl, err := structpb.NewValue(modVar.Default)
if err == nil {
Expand Down

0 comments on commit 1b5665e

Please sign in to comment.