Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: omit null defaultValue in bpmetadata #2048

Merged
merged 6 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading