Kubernetes get-started create-component.md: Go and C# silently default isMinikube instead of requiring it, unlike TS/Python/Java/HCL
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 94/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- documentation
Research direction
Open content/docs/iac/get-started/kubernetes/create-component.md and inspect the Go and C# snippets in the mid-page example and full assembled program. Replace the four documented get-with-fallback calls with the specified require calls, then compare all six language tracks to confirm missing isMinikube configuration produces an error consistently.
Written by the indexing model from the issue text.
Description
Page: content/docs/iac/get-started/kubernetes/create-component.md
The page walks readers through building a KubernetesNginxService component whose behavior branches on a stack config value isMinikube (bool): when true, the Service is ClusterIP; when false, it's LoadBalancer. Six language tracks show the same step, and four of them read this config value with "require" semantics (error if the reader hasn't run pulumi config set isMinikube true), while Go and C# use "get" semantics with an implicit false fallback, so a reader who skips or mistypes the config-set step gets a silently wrong deployment (LoadBalancer) instead of an actionable error.
This occurs in two places on the page: the illustrative mid-page snippet, and the full assembled program later on.
Correct (require semantics), for comparison:
- TypeScript, line 30:
config.requireBoolean("isMinikube") - Python, line 40 / 897:
config.require_bool("isMinikube") - Java, line 80 / 980:
config.requireBoolean("isMinikube") - HCL, line 302 / 1005:
variable "isMinikube" { type = bool }with no default (Pulumi HCL treats an undefaulted variable as mandatory)
Incorrect (get semantics with silent fallback):
- Go, line 50:
IsMinikube: config.GetBool(ctx, "isMinikube"),— should beconfig.RequireBool(ctx, "isMinikube") - Go, line 918:
isMinikube := config.GetBool(ctx, "isMinikube")— should beconfig.RequireBool(ctx, "isMinikube") - C#, line 65:
IsMinikube = config.GetBoolean("isMinikube") ?? false— should beconfig.RequireBoolean("isMinikube") - C#, line 952:
IsMinikube = config.GetBoolean("isMinikube") ?? false— should beconfig.RequireBoolean("isMinikube")
Verification:
RequireBool(ctx *pulumi.Context, key string) boolconfirmed to exist in the current Go SDK (github.com/pulumi/pulumi/sdk/v3v3.263.0) viago doc github.com/pulumi/pulumi/sdk/v3/go/pulumi/configrun against a real scratch module resolving that exact SDK version.RequireBoolean(string key)confirmed onPulumi.Config(.NET) via the official reference page https://www.pulumi.com/docs/reference/pkg/dotnet/Pulumi/pulumi.config.html: "Loads a configuration value, as a boolean, by its given key. If it doesn't exist, ... an error is thrown" — versusGetBoolean's documented "or null if it doesn't exist" behavior, which the current snippet papers over with?? false.
Fix: swap GetBool/GetBoolean(...) ?? false for RequireBool/RequireBoolean in the four locations above so all six language tracks behave identically: erroring clearly if the reader forgets to set isMinikube, rather than two of six silently deploying the production (LoadBalancer) path.
- Dominant language
- HTML
- Stars
- 178
- Forks
- 271
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 546
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pulumi/docs
-
area/www-content Bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
area/www-content Bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
area/www-content Bug
Difficulty 1/5 Under an hour Newbie friendliness 94/100
-
area/docs-content Bug kind/bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
area/automation area/infrastructure awaiting-upstream
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Ecosystem: ClawMetry — the Qwen Code reader is now free and open source (follow-up to #9294 / #9338) Opencategory/integration priority/P3 scope/documentation status/ready-for-human type/feature-request
Difficulty 1/5 Under an hour Newbie friendliness 84/100