Addressing two issues I discovered while going through the GCP Golang Get Started guide:
1. On the Modify Program step of the guide, `bucketEndpoint` is assigned but never used and therefore cannot compile. If a User wanted to run this program before proceeding to the Deploy Changes step, they would get an error like this: `./main.go:47:3: bucketEndpoint declared and not used`.
2. At the Deploy Changes step, `bucketEndpoint` is assigned before error handling for the previous call, which means it may proceed to attempt to access attributes from a `nil` value during interpolation when it should be providing the error from the `NewBucketObject` call.
Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
Some of the examples pass options to Python APIs
via `__opts__` instead of `opts`.
The only time `__opts__` is supposed to be used is when
the resource has an existing `opts` parameter,
which is not the case for the resources in these examples.
This updates them to use `opts`.
Resolves#2471
Our documentation for how to use Pulumi with GitHub Actions
included GitHub Workflow files using setup-go@v2
referencing specific Go releases.
[actions/setup-go@v3](https://github.com/actions/setup-go#v3)
added support for a 'stable' (and 'oldstable') alias.
With this alias, the action will always use the latest stable Go release
instead of a specific version.
This updates our GitHub integration documentation
to recommend setup-go v3 and the 'stable' alias
over a specific pinned version.
That leaves this documentation and the sample workflow files
more future-proof as newer versions of Go are released.
Some of the documentation for secrets hard-codes
links to the Python APIs.
Replace these with shortcodes for those APIs
that change as different languages are selected.
Additionally, the following changes were made to the shortcodes:
- getsecret, requiresecret, secret-new: teach about Java
- secret-new: Fix Go API -- there's no "NewSecret", only "ToSecret"
Supersedes #2404
One of the snippets for `pulumi login s3://..` does not quote the URI.
This won't work if someone tries to copy and run it because the '&'
will be interpreted as a shell command to start a background process.
Fix by adding quotes around the login command.
In the Get Started documentation,
when we tell users to Create a New Project with `pulumi new`,
we include a handful of short paragraphs next to each other
with instructions.
This is not very skimmable:
- keywords like project name/description/stack name
are hidden in the text
- the actual instruction of what to do is also just hidden
in the text
For someone following along, it's better to have keywords
related to prompts they're seeing highlighted,
and to include a sample output they can follow along to.
This changes the create-project sections
of all four Get Started with Pulumi pages
in the following way:
- project name and project description are bold
- change "name of a stack" to "a stack name", and bold "stack name"
- add the output of `pulumi new` after each step;
I've altered the output slightly to not be language-specific
Before this change, only the k8s tutorial included a sample prompt,
but that was at the top of the text rather than interspersed with it.
These changes add a new set of guides that explain how to configure
Pulumi Deployments' OpenID Connect integration with AWS, Azure, and GCP.
These changes also add documentation for OpenID Connect in the Pulumi
Deployments API.
Co-authored-by: Komal <komal@pulumi.com>