pulumi/sdk/go
bors[bot] 5b021201d8
Merge #11788
11788: feat: Add ctx.RunningWithMocks() r=RobbieMcKinstry a=jen20

# Description

It is often desirable to detect running Pulumi programs under mocks in the same situations where it would be interesting to know if they were executing as a dry run. This commit adds a mechanism to find out (in Go).

## Checklist

- [x] I have added tests that prove my fix is effective or that my feature works

- [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change

- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version

Co-authored-by: James Nugent <jen20@apple.com>
Co-authored-by: Kyle Dixler <kdixle2@gmail.com>
2023-01-17 18:10:31 +00:00
..
auto Merge #11819 #11834 #11842 #11845 2023-01-12 20:11:42 +00:00
common Merge #11866 #11867 2023-01-14 00:22:54 +00:00
pulumi Merge #11788 2023-01-17 18:10:31 +00:00
pulumi-language-go Clean up pkg/errors in go language host 2023-01-14 20:56:53 +00:00
Makefile ci: Enable testing of language version sets 2022-09-21 09:48:38 -07:00
README.md `pulumi update` => `pulumi up` (#2702) 2019-05-06 14:00:18 -07:00

README.md

Pulumi Golang SDK

This directory contains support for writing Pulumi programs in the Go language. There are two aspects to this:

  • pulumi/ contains the client language bindings Pulumi program's code directly against;
  • pulumi-language-go/ contains the language host plugin that the Pulumi engine uses to orchestrate updates.

To author a Pulumi program in Go, simply say so in your Pulumi.yaml

name: <my-project>
runtime: go

and ensure you have pulumi-language-go on your path (it is distributed in the Pulumi download automatically).

By default, the language plugin will use your project's name, <my-project>, as the executable that it loads. This too must be on your path for the language provider to load it when you run pulumi preview or pulumi up.