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

Compound DefaultInfo.Value are not supported but this is not obvious #1325

Closed
t0yv0 opened this issue Aug 3, 2023 · 0 comments
Closed

Compound DefaultInfo.Value are not supported but this is not obvious #1325

t0yv0 opened this issue Aug 3, 2023 · 0 comments
Assignees
Labels
area/tfgen Issues in pkg/tgen, excluding docs generation - use area/docsgen for those impact/usability Something that impacts users' ability to use the product easily and intuitively kind/enhancement Improvements or new features resolution/fixed This issue was fixed

Comments

@t0yv0
Copy link
Member

t0yv0 commented Aug 3, 2023

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Edit the GCP provider to give a default value to scopes config property for example:

			"scopes": {
				Default: &tfbridge.DefaultInfo{
					Value: []string{"defscope"},
				},
			},

This makes make tfgen fail with a cryptic error message:

error: failed to create Pulumi schema: <nil>: #/provider: doesn't validate with '/$defs/resourceSpec'; , and 6 other diagnostic(s)
make: *** [tfgen] Error 255`

In our recent conversations it turns out that the system assumes DefaultInfo.Value can only be scalar value.

A quick change that would help here would be to:

  1. Annotate DefaultInfo.Value docstring with the limitations
  2. Validate DefaultInfo early in the process, at the entry point to working with the provider, so unsupported values are rejected with a clear message

Affected area/feature

@t0yv0 t0yv0 added needs-triage Needs attention from the triage team kind/enhancement Improvements or new features impact/usability Something that impacts users' ability to use the product easily and intuitively and removed needs-triage Needs attention from the triage team labels Aug 3, 2023
@t0yv0 t0yv0 added the area/tfgen Issues in pkg/tgen, excluding docs generation - use area/docsgen for those label Aug 3, 2023
@VenelinMartinov VenelinMartinov self-assigned this Oct 20, 2023
@t0yv0 t0yv0 closed this as completed in e0f1893 Oct 23, 2023
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tfgen Issues in pkg/tgen, excluding docs generation - use area/docsgen for those impact/usability Something that impacts users' ability to use the product easily and intuitively kind/enhancement Improvements or new features resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

3 participants