pulumi / registry

The global index of everything you can do with Pulumi.
https://www.pulumi.com/registry
Apache License 2.0
27 stars 120 forks source link

Fix of a syntax error in a service account code example #758

Closed snamber closed 1 year ago

snamber commented 2 years ago

File: themes/default/content/registry/packages/gcp/api-docs/serviceAccount/account/_index.md

The imported module "serviceAccount" needs to be lowercase to work: "serviceaccount"

Now it is

package main

import (
    "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/serviceAccount"
    "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := serviceAccount.NewAccount(ctx, "serviceAccount", &serviceAccount.AccountArgs{
            AccountId:   pulumi.String("service-account-id"),
            DisplayName: pulumi.String("Service Account"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}

It should be

package main

import (
    "github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/serviceaccount"
    "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := serviceaccount.NewAccount(ctx, "serviceAccount", &serviceaccount.AccountArgs{
            AccountId:   pulumi.String("service-account-id"),
            DisplayName: pulumi.String("Service Account"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
susanev commented 2 years ago

thx for the report!

a few related issues

im going to close out the pulumi-hugo one as a dupe, since it doesn't make much sense for it to be in that repo anymore.

susanev commented 2 years ago

it was noted in community slack, that serviceAccount 404s, from the left nav of the gcp API docs; if you adjust the URL to serviceAccount it works

jkodroff commented 2 years ago

@susanev Removing from your board because the root issue is we have the namespace incorrect in the provider. This is a breaking change, so we will need to wait until the next major release of pulumi-gcp to fix.

susanev commented 2 years ago

thank you!

mnlumi commented 1 year ago

Duplicate of https://github.com/pulumi/pulumi-gcp/issues/722