sparse-intern-71089
05/21/2023, 4:07 PMincalculable-parrot-23117
05/24/2023, 5:20 PM/
├─go.mod
├─main.go
└─Pulumi.yaml
Pulumi project as a subdirectory in an existing project.
/
├─go.mod
├─other.go
└─infrastructure/
├─main.go
└─Pulumi.yaml
If you have an existing Go project with its own go.mod, you can delete infrastructure/go.mod and run go mod tidy
. Go will inspect your code and update go.mod with any missing dependencies like the Pulumi SDK.
It's also allowed to keep the infrastructure/go.mod and treat it as a submodule. That requires some more knowledge of Go submodules. Typically, there shouldn't be any issues, but you have to make sure to run pulumi
inside the infrastructure directory, not outside. One advantage of doing this is that dependencies for your infrastructure (Pulumi and friends) do not become dependencies of your application.incalculable-parrot-23117
05/24/2023, 5:28 PMhundreds-judge-64203
05/25/2023, 5:13 PMinfrastructure/go.mod
for now as you suggestedhundreds-judge-64203
06/03/2023, 9:48 AMNo matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by