pulumi/sdk/go
Luke Hoban 4db5fe3520 Support `pulumi new <ai-url>`
This adds support for Pulumi AI URLs as sources for `pulumi new`.   This can support both conversations and answers URLs, such as https://www.pulumi.com/ai/answers/6c060c2d-e754-47d2-af8c-0d6a761634e3.

This implementation is likely not what we ultimately want to ship.  It builds out the fake "template" from the content of the HTML page from within the Pulumi CLI.  Instead, we almost certainly want to push this logic into the Pulumi AI service itself, and only generalize the CLI slightly beyond it's current support to allow pulling a ZIP or other simpler asset in place of a Git repo.

But the end result shows what is possible:

```
$ pulumi new https://www.pulumi.com/ai/answers/6c060c2d-e754-47d2-af8c-0d6a761634e3
```

A few challenges:
* This needs to support templating in all languages, and ideally without re-creating all the login in the existing language templates
* The code is scraped to infer the package.json dependencies needed (without knowing versions) and also to guess what required config should be specified (like `aws:region`). (TypeScript only currently)
* The code itself is scraped out of the HTML in a way that may not be guarnteed to work going forward.
2023-09-24 21:29:43 -07:00
..
auto deps: Upgrade google.golang.org/{genproto, grpc} 2023-07-27 16:24:33 -07:00
common Support `pulumi new <ai-url>` 2023-09-24 21:29:43 -07:00
internal sdk/go: Add pulumix subpackage (#13509) 2023-08-28 15:38:23 +00:00
pulumi [sdk/go] Fix issues with templates (#13872) 2023-09-04 19:51:13 +00:00
pulumi-language-go Changelog and go.mod updates for v3.85.0 (#14024) 2023-09-23 06:06:55 +00:00
pulumix Rename Output.Join to Flatten (#13882) 2023-09-06 15:05:24 +00:00
Makefile make(sdk/go): Use -C instead of cd for 'go' commands (#13853) 2023-08-31 21:12:03 +00: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.