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

Missing constructor syntax examples for the Pulumi service provider #16191

Open
arunkumar611 opened this issue May 12, 2024 · 2 comments · May be fixed by #16223
Open

Missing constructor syntax examples for the Pulumi service provider #16191

arunkumar611 opened this issue May 12, 2024 · 2 comments · May be fixed by #16223
Assignees
Labels
area/codegen SDK-gen, program-gen, convert kind/bug Some behavior is incorrect or out of spec
Milestone

Comments

@arunkumar611
Copy link
Member

https://www.pulumi.com/registry/packages/pulumiservice/api-docs/teamstackpermission/

image
@arunkumar611 arunkumar611 added the needs-triage Needs attention from the triage team label May 12, 2024
@sean1588 sean1588 transferred this issue from pulumi/docs May 13, 2024
@justinvp justinvp added area/codegen SDK-gen, program-gen, convert kind/bug Some behavior is incorrect or out of spec and removed needs-triage Needs attention from the triage team labels May 14, 2024
@justinvp
Copy link
Member

@Zaid-Ajaj, any idea why some of the languages show "Coming soon!" for constructor syntax examples? TS, Python, Go, C# are "Coming soon", but Java and YAML are filled-in.

@justinvp justinvp added this to the 0.104 milestone May 14, 2024
@justinvp justinvp changed the title Update examples for Pulumi service provider Missing constructor syntax examples for the Pulumi service provider May 14, 2024
@Zaid-Ajaj
Copy link
Contributor

The intermediate PCL program generated for TeamStackPermission looks like this:

resource "teamStackPermissionResource" "pulumiservice:index:TeamStackPermission" {
  organization = "string"
  permission = "read"
  project = "string"
  stack = "string"
  team = "string"
}

Where permission is a numeric enum defined as follows{ "read" => 101, "edit" => 102, "admin" => 103 }.

Program-gen for C# fails here, generating a PANIC so this specific example is skipped:

    // Resource pulumiservice:index:TeamStackPermission
    var teamStackPermissionResource = new PulumiService.TeamStackPermission("teamStackPermissionResource", new()
    {
        Organization = "string",
        Permission = %!v(PANIC=Format method: Unsafe enum conversions from type string not implemented yet:  "read"
 => enum(pulumiservice:index:TeamStackPermissionScope(number): cty.NumberIntVal(101),cty.NumberIntVal(102),cty.NumberIntVal(103))),
        Project = "string",
        Stack = "string",
        Team = "string",
    });

TypeScript, Go and Python all fail to a similar error. Fix incoming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codegen SDK-gen, program-gen, convert kind/bug Some behavior is incorrect or out of spec
Projects
None yet
3 participants