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

gcp.certificatemanager.CertificateMap docs golang example does not match implementation #2349

Open
smithrobs opened this issue Aug 27, 2024 · 2 comments
Labels
area/api-docs awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec

Comments

@smithrobs
Copy link

smithrobs commented Aug 27, 2024

Describe what happened

gcp.certificatemanager.CertificateMap golang examples do not match the underlying code.

Example:

_, err := certificatemanager.NewCertificateMap(ctx, "default", &certificatemanager.CertificateMapArgs{

should be

_, err := certificatemanager.NewCertificateMapResource(ctx, "certificate_map", &certificatemanager.CertificateMapResourceArgs{

Other langs seem unaffected? (I checked dotnet only)

This PR seems to be when it deviated.

Sample program

Non-working example from docs:

_, err := certificatemanager.NewCertificateMap(ctx, "default", &certificatemanager.CertificateMapArgs{
    Name:        pulumi.String("cert-map"),
     Description: pulumi.String("My acceptance test certificate map"),
     Labels: pulumi.StringMap{
        "terraform": pulumi.String("true"),
        "acc-test":  pulumi.String("true"),
    },
})

This works:

rsrc, _ := certificatemanager.NewCertificateMapResource(ctx, "certificate_map", &certificatemanager.CertificateMapResourceArgs{
    Name:        pulumi.String("cert-map-entry"),
    Description: pulumi.String("My acceptance test certificate map"),
    Labels: pulumi.StringMap{
        "terraform": pulumi.String("true"),
        "acc-test":  pulumi.String("true"),
    },
})

Log output

No response

Affected Resource(s)

No response

Output of pulumi about

CLI          
Version      3.130.0
Go Version   go1.22.6
Go Compiler  gc

Plugins
KIND      NAME  VERSION
resource  gcp   7.23.0
language  go    unknown

Host     
OS       darwin
Version  14.6.1
Arch     arm64

This project is written in go: executable='/usr/local/go/bin/go' version='go version go1.22.5 darwin/arm64'

TYPE                  URN
pulumi:pulumi:Stack   urn:pulumi:dev::gcp-go-scratch::pulumi:pulumi:Stack::gcp-go-scratch-dev
pulumi:providers:gcp  urn:pulumi:dev::gcp-go-scratch::pulumi:providers:gcp::default_7_23_0

Found no pending operations associated with dev

Backend        
Name           pulumi.com
Token type     personal

Dependencies:
NAME                                 VERSION
github.com/pulumi/pulumi-gcp/sdk/v7  v7.23.0
github.com/pulumi/pulumi/sdk/v3      v3.117.0

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@smithrobs smithrobs added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Aug 27, 2024
@iwahbe iwahbe added area/api-docs needs-triage Needs attention from the triage team awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). and removed needs-triage Needs attention from the triage team area/api-docs labels Aug 28, 2024
@iwahbe
Copy link
Member

iwahbe commented Aug 28, 2024

Hi @smithrobs. Thanks for reporting this. The underlying issue is in pulumi/pulumi's code generation. I'll open an issue upstream.

@iwahbe
Copy link
Member

iwahbe commented Aug 28, 2024

Upstream issue is pulumi/pulumi#17085.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api-docs awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants