Breaking changes due to Feature 2.0 work
* Make `async:true` the default for `invoke` calls (#3750) * Switch away from native grpc impl. (#3728) * Remove usage of the 'deasync' library from @pulumi/pulumi. (#3752) * Only retry as long as we get unavailable back. Anything else continues. (#3769) * Handle all errors for now. (#3781) * Do not assume --yes was present when using pulumi in non-interactive mode (#3793) * Upgrade all paths for sdk and pkg to v2 * Backport C# invoke classes and other recent gen changes (#4288) Adjust C# generation * Replace IDeployment with a sealed class (#4318) Replace IDeployment with a sealed class * .NET: default to args subtype rather than Args.Empty (#4320) * Adding system namespace for Dotnet code gen This is required for using Obsolute attributes for deprecations ``` Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'ObsoleteAttribute' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj] Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'Obsolete' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj] ``` * Fix the nullability of config type properties in C# codegen (#4379)
This commit is contained in:
parent
90ced9574d
commit
66bd3f4aa8
|
@ -6,6 +6,7 @@ clone_folder: '%USERPROFILE%\go\src\github.com\pulumi\pulumi'
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
- 'feature-2.0'
|
||||||
- /v\d*\.\d*\.\d*/
|
- /v\d*\.\d*\.\d*/
|
||||||
environment:
|
environment:
|
||||||
PULUMI_API: https://api.pulumi-staging.io
|
PULUMI_API: https://api.pulumi-staging.io
|
||||||
|
|
|
@ -27,7 +27,7 @@ before_script:
|
||||||
- "${PULUMI_SCRIPTS}/ci/ensure-dependencies"
|
- "${PULUMI_SCRIPTS}/ci/ensure-dependencies"
|
||||||
script:
|
script:
|
||||||
- make travis_${TRAVIS_EVENT_TYPE}
|
- make travis_${TRAVIS_EVENT_TYPE}
|
||||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./scripts/update_homebrew.sh; fi
|
#- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./scripts/update_homebrew.sh; fi
|
||||||
after_failure:
|
after_failure:
|
||||||
- "${PULUMI_SCRIPTS}/ci/upload-failed-tests"
|
- "${PULUMI_SCRIPTS}/ci/upload-failed-tests"
|
||||||
notifications:
|
notifications:
|
||||||
|
|
28
CHANGELOG.md
28
CHANGELOG.md
|
@ -1,7 +1,27 @@
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
=========
|
=========
|
||||||
|
|
||||||
## HEAD (unreleased)
|
## 2.0.0 (Unreleased)
|
||||||
|
=======
|
||||||
|
- CLI behavior change. Commands in non-interactive mode (i.e. when `pulumi` has its output piped to
|
||||||
|
another process or running on CI) will not default to assuming that `--yes` was passed in. `--yes` is now
|
||||||
|
explicitly required to proceed in non-interactive scenarios. This affects:
|
||||||
|
* `pulumi destroy`
|
||||||
|
* `pulumi new`
|
||||||
|
* `pulumi refresh`
|
||||||
|
* `pulumi up`
|
||||||
|
|
||||||
|
- Fixed [crashes and hangs](https://github.com/pulumi/pulumi/issues/3528) introduced by usage of
|
||||||
|
another library.
|
||||||
|
|
||||||
|
- @pulumi/pulumi Now requires Nodejs version 8.13.0 and upwards or 10.10.0 and upwards.
|
||||||
|
|
||||||
|
- All data-source invocations are now asynchronous (Promise-returning) by default.
|
||||||
|
|
||||||
|
- C# code generation switched to schema.
|
||||||
|
|
||||||
|
- .NET API: replace `IDeployment` interface with `DeploymentInstance` class.
|
||||||
|
|
||||||
- Fix Go SDK secret propagation for Resource inputs/outputs.
|
- Fix Go SDK secret propagation for Resource inputs/outputs.
|
||||||
[#4387](https://github.com/pulumi/pulumi/pull/4387)
|
[#4387](https://github.com/pulumi/pulumi/pull/4387)
|
||||||
|
|
||||||
|
@ -37,10 +57,10 @@ CHANGELOG
|
||||||
[#4321](https://github.com/pulumi/pulumi/pull/4321)
|
[#4321](https://github.com/pulumi/pulumi/pull/4321)
|
||||||
|
|
||||||
- Make prebuilt executables opt-in only for the Go SDK
|
- Make prebuilt executables opt-in only for the Go SDK
|
||||||
[#4338](https://github.com/pulumi/pulumi/pull/4338)
|
[#4338](https://github.com/pulumi/pulumi/pull/4338)
|
||||||
|
|
||||||
- Support the `binary` option (prebuilt executables) for the .NET SDK
|
- Support the `binary` option (prebuilt executables) for the .NET SDK
|
||||||
[#4355](https://github.com/pulumi/pulumi/pull/4355)
|
[#4355](https://github.com/pulumi/pulumi/pull/4355)
|
||||||
|
|
||||||
- Add helper methods for stack outputs in the Go SDK
|
- Add helper methods for stack outputs in the Go SDK
|
||||||
[#4341](https://github.com/pulumi/pulumi/pull/4341)
|
[#4341](https://github.com/pulumi/pulumi/pull/4341)
|
||||||
|
@ -75,7 +95,7 @@ CHANGELOG
|
||||||
## 1.14.0 (2020-04-01)
|
## 1.14.0 (2020-04-01)
|
||||||
- Fix error related to side-by-side versions of `@pulumi/pulumi`.
|
- Fix error related to side-by-side versions of `@pulumi/pulumi`.
|
||||||
[#4235](https://github.com/pulumi/pulumi/pull/4235)
|
[#4235](https://github.com/pulumi/pulumi/pull/4235)
|
||||||
|
|
||||||
- Allow users to specify an alternate backend URL when using the GitHub Actions container with the env var `PULUMI_BACKEND_URL`.
|
- Allow users to specify an alternate backend URL when using the GitHub Actions container with the env var `PULUMI_BACKEND_URL`.
|
||||||
[#4243](https://github.com/pulumi/pulumi/pull/4243)
|
[#4243](https://github.com/pulumi/pulumi/pull/4243)
|
||||||
|
|
||||||
|
|
12
Makefile
12
Makefile
|
@ -2,7 +2,7 @@ PROJECT_NAME := Pulumi SDK
|
||||||
SUB_PROJECTS := sdk/dotnet sdk/nodejs sdk/python sdk/go
|
SUB_PROJECTS := sdk/dotnet sdk/nodejs sdk/python sdk/go
|
||||||
include build/common.mk
|
include build/common.mk
|
||||||
|
|
||||||
PROJECT := github.com/pulumi/pulumi/pkg/cmd/pulumi
|
PROJECT := github.com/pulumi/pulumi/pkg/v2/cmd/pulumi
|
||||||
PROJECT_PKGS := $(shell cd ./pkg && go list ./... | grep -v /vendor/)
|
PROJECT_PKGS := $(shell cd ./pkg && go list ./... | grep -v /vendor/)
|
||||||
TESTS_PKGS := $(shell cd ./tests && go list ./... | grep -v tests/templates | grep -v /vendor/)
|
TESTS_PKGS := $(shell cd ./tests && go list ./... | grep -v tests/templates | grep -v /vendor/)
|
||||||
VERSION := $(shell scripts/get-version HEAD)
|
VERSION := $(shell scripts/get-version HEAD)
|
||||||
|
@ -16,6 +16,8 @@ ifeq ($(NOPROXY), true)
|
||||||
@echo "cd sdk && GO111MODULE=on go mod download"; cd sdk && GO111MODULE=on go mod download
|
@echo "cd sdk && GO111MODULE=on go mod download"; cd sdk && GO111MODULE=on go mod download
|
||||||
@echo "cd pkg && GO111MODULE=on go mod tidy"; cd pkg && GO111MODULE=on go mod tidy
|
@echo "cd pkg && GO111MODULE=on go mod tidy"; cd pkg && GO111MODULE=on go mod tidy
|
||||||
@echo "cd pkg && GO111MODULE=on go mod download"; cd pkg && GO111MODULE=on go mod download
|
@echo "cd pkg && GO111MODULE=on go mod download"; cd pkg && GO111MODULE=on go mod download
|
||||||
|
@echo "cd scripts && GO111MODULE=on go mod tidy"; cd scripts && GO111MODULE=on go mod tidy
|
||||||
|
@echo "cd scripts && GO111MODULE=on go mod download"; cd scripts && GO111MODULE=on go mod download
|
||||||
@echo "cd tests && GO111MODULE=on go mod tidy"; cd tests && GO111MODULE=on go mod tidy
|
@echo "cd tests && GO111MODULE=on go mod tidy"; cd tests && GO111MODULE=on go mod tidy
|
||||||
@echo "cd tests && GO111MODULE=on go mod download"; cd tests && GO111MODULE=on go mod download
|
@echo "cd tests && GO111MODULE=on go mod download"; cd tests && GO111MODULE=on go mod download
|
||||||
@echo "cd scripts && GO111MODULE=on go mod tidy"; cd scripts && GO111MODULE=on go mod tidy
|
@echo "cd scripts && GO111MODULE=on go mod tidy"; cd scripts && GO111MODULE=on go mod tidy
|
||||||
|
@ -25,6 +27,8 @@ else
|
||||||
@echo "cd sdk && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download"; cd sdk && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download
|
@echo "cd sdk && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download"; cd sdk && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download
|
||||||
@echo "cd pkg && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy"; cd pkg && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy
|
@echo "cd pkg && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy"; cd pkg && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy
|
||||||
@echo "cd pkg && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download"; cd pkg && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download
|
@echo "cd pkg && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download"; cd pkg && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download
|
||||||
|
@echo "cd scripts && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy"; cd scripts && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy
|
||||||
|
@echo "cd scripts && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download"; cd scripts && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download
|
||||||
@echo "cd tests && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy"; cd tests && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy
|
@echo "cd tests && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy"; cd tests && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy
|
||||||
@echo "cd tests && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download"; cd tests && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download
|
@echo "cd tests && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download"; cd tests && GO111MODULE=on GOPROXY=$(GOPROXY) go mod download
|
||||||
@echo "cd scripts && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy"; cd scripts && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy
|
@echo "cd scripts && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy"; cd scripts && GO111MODULE=on GOPROXY=$(GOPROXY) go mod tidy
|
||||||
|
@ -42,13 +46,13 @@ generate::
|
||||||
go generate ./pkg/codegen/docs/
|
go generate ./pkg/codegen/docs/
|
||||||
|
|
||||||
build::
|
build::
|
||||||
cd pkg && go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
|
cd pkg && go install -ldflags "-X github.com/pulumi/pulumi/pkg/v2/version.Version=${VERSION}" ${PROJECT}
|
||||||
|
|
||||||
install::
|
install::
|
||||||
cd pkg && GOBIN=$(PULUMI_BIN) go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
|
cd pkg && GOBIN=$(PULUMI_BIN) go install -ldflags "-X github.com/pulumi/pulumi/pkg/v2/version.Version=${VERSION}" ${PROJECT}
|
||||||
|
|
||||||
dist::
|
dist::
|
||||||
cd pkg && go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
|
cd pkg && go install -ldflags "-X github.com/pulumi/pulumi/pkg/v2/version.Version=${VERSION}" ${PROJECT}
|
||||||
|
|
||||||
lint::
|
lint::
|
||||||
for DIR in "pkg" "sdk" "tests" ; do \
|
for DIR in "pkg" "sdk" "tests" ; do \
|
||||||
|
|
32
build.proj
32
build.proj
|
@ -66,20 +66,20 @@
|
||||||
<Exec Command="dotnet build dotnet.sln /p:VersionPrefix=$(VersionPrefix) /p:VersionSuffix=preview"
|
<Exec Command="dotnet build dotnet.sln /p:VersionPrefix=$(VersionPrefix) /p:VersionSuffix=preview"
|
||||||
WorkingDirectory="$(DotNetSdkDirectory)" />
|
WorkingDirectory="$(DotNetSdkDirectory)" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<DotNetPackagesToBuild Include="github.com/pulumi/pulumi/sdk/dotnet/cmd/pulumi-language-dotnet" />
|
<DotNetPackagesToBuild Include="github.com/pulumi/pulumi/sdk/v2/dotnet/cmd/pulumi-language-dotnet" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=$(Version)" %(DotNetPackagesToBuild.Identity)"
|
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/sdk/v2/go/common/version.Version=$(Version)" %(DotNetPackagesToBuild.Identity)"
|
||||||
WorkingDirectory="$(SdkDirectory)"/>
|
WorkingDirectory="$(SdkDirectory)"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="DotNetInstallPlugin">
|
<Target Name="DotNetInstallPlugin">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<DotNetPackagesToBuild Include="github.com/pulumi/pulumi/sdk/dotnet/cmd/pulumi-language-dotnet" />
|
<DotNetPackagesToBuild Include="github.com/pulumi/pulumi/sdk/v2/dotnet/cmd/pulumi-language-dotnet" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Exec Command=""$(MSBuildThisFileDirectory)\scripts\get-version.cmd"" ConsoleToMSBuild="true">
|
<Exec Command=""$(MSBuildThisFileDirectory)\scripts\get-version.cmd"" ConsoleToMSBuild="true">
|
||||||
<Output TaskParameter="ConsoleOutput" PropertyName="Version" />
|
<Output TaskParameter="ConsoleOutput" PropertyName="Version" />
|
||||||
</Exec>
|
</Exec>
|
||||||
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=$(Version)" %(DotNetPackagesToBuild.Identity)"
|
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/sdk/v2/go/common/version.Version=$(Version)" %(DotNetPackagesToBuild.Identity)"
|
||||||
EnvironmentVariables="GOBIN=$(PulumiBin)"
|
EnvironmentVariables="GOBIN=$(PulumiBin)"
|
||||||
WorkingDirectory="$(SdkDirectory)"/>
|
WorkingDirectory="$(SdkDirectory)"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -103,20 +103,20 @@
|
||||||
<Output TaskParameter="ConsoleOutput" PropertyName="Version" />
|
<Output TaskParameter="ConsoleOutput" PropertyName="Version" />
|
||||||
</Exec>
|
</Exec>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<GoPackagesToBuild Include="github.com/pulumi/pulumi/sdk/go/pulumi-language-go" />
|
<GoPackagesToBuild Include="github.com/pulumi/pulumi/sdk/v2/go/pulumi-language-go" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=$(Version)" %(GoPackagesToBuild.Identity)"
|
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/sdk/v2/go/common/version.Version=$(Version)" %(GoPackagesToBuild.Identity)"
|
||||||
WorkingDirectory="$(SdkDirectory)"/>
|
WorkingDirectory="$(SdkDirectory)"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="GoInstallPlugin">
|
<Target Name="GoInstallPlugin">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<GoPackagesToBuild Include="github.com/pulumi/pulumi/sdk/go/pulumi-language-go" />
|
<GoPackagesToBuild Include="github.com/pulumi/pulumi/sdk/v2/go/pulumi-language-go" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Exec Command=""$(MSBuildThisFileDirectory)\scripts\get-version.cmd"" ConsoleToMSBuild="true">
|
<Exec Command=""$(MSBuildThisFileDirectory)\scripts\get-version.cmd"" ConsoleToMSBuild="true">
|
||||||
<Output TaskParameter="ConsoleOutput" PropertyName="Version" />
|
<Output TaskParameter="ConsoleOutput" PropertyName="Version" />
|
||||||
</Exec>
|
</Exec>
|
||||||
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=$(Version)" %(GoPackagesToBuild.Identity)"
|
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/sdk/v2/go/common/version.Version=$(Version)" %(GoPackagesToBuild.Identity)"
|
||||||
EnvironmentVariables="GOBIN=$(PulumiBin)"
|
EnvironmentVariables="GOBIN=$(PulumiBin)"
|
||||||
WorkingDirectory="$(SdkDirectory)"/>
|
WorkingDirectory="$(SdkDirectory)"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -152,9 +152,9 @@
|
||||||
<Copy SourceFiles="@(NodeSdkTestDataFiles)"
|
<Copy SourceFiles="@(NodeSdkTestDataFiles)"
|
||||||
DestinationFolder="$(NodeJSSdkDirectory)\bin\tests\runtime\langhost\cases" />
|
DestinationFolder="$(NodeJSSdkDirectory)\bin\tests\runtime\langhost\cases" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<NodeJSPackagesToBuild Include="github.com/pulumi/pulumi/sdk/nodejs/cmd/pulumi-language-nodejs" />
|
<NodeJSPackagesToBuild Include="github.com/pulumi/pulumi/sdk/v2/nodejs/cmd/pulumi-language-nodejs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=$(Version)" %(NodeJSPackagesToBuild.Identity)"
|
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/sdk/v2/go/common/version.Version=$(Version)" %(NodeJSPackagesToBuild.Identity)"
|
||||||
WorkingDirectory="$(SdkDirectory)"/>
|
WorkingDirectory="$(SdkDirectory)"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@
|
||||||
<Exec Command=""$(MSBuildThisFileDirectory)\scripts\get-version.cmd"" ConsoleToMSBuild="true">
|
<Exec Command=""$(MSBuildThisFileDirectory)\scripts\get-version.cmd"" ConsoleToMSBuild="true">
|
||||||
<Output TaskParameter="ConsoleOutput" PropertyName="Version" />
|
<Output TaskParameter="ConsoleOutput" PropertyName="Version" />
|
||||||
</Exec>
|
</Exec>
|
||||||
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=$(Version)" %(NodeJSPackagesToBuild.Identity)"
|
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/pkg/v2/version.Version=$(Version)" %(NodeJSPackagesToBuild.Identity)"
|
||||||
EnvironmentVariables="GOBIN=$(PulumiBin)"
|
EnvironmentVariables="GOBIN=$(PulumiBin)"
|
||||||
WorkingDirectory="$(SdkDirectory)"/>
|
WorkingDirectory="$(SdkDirectory)"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -227,9 +227,9 @@
|
||||||
<Exec Command="pipenv run python setup.py build bdist_wheel --universal"
|
<Exec Command="pipenv run python setup.py build bdist_wheel --universal"
|
||||||
WorkingDirectory="$(PythonSdkDirectory)\env\src" />
|
WorkingDirectory="$(PythonSdkDirectory)\env\src" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PythonPackagesToBuild Include="github.com/pulumi/pulumi/sdk/python/cmd/pulumi-language-python" />
|
<PythonPackagesToBuild Include="github.com/pulumi/pulumi/sdk/v2/python/cmd/pulumi-language-python" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=$(Version)" %(PythonPackagesToBuild.Identity)"
|
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/sdk/v2/go/common/version.Version=$(Version)" %(PythonPackagesToBuild.Identity)"
|
||||||
WorkingDirectory="$(SdkDirectory)"/>
|
WorkingDirectory="$(SdkDirectory)"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
@ -245,12 +245,12 @@
|
||||||
<Copy SourceFiles="@(PythonDistFiles)"
|
<Copy SourceFiles="@(PythonDistFiles)"
|
||||||
DestinationFolder="$(PulumiBin)\" />
|
DestinationFolder="$(PulumiBin)\" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PythonPackagesToBuild Include="github.com/pulumi/pulumi/sdk/python/cmd/pulumi-language-python" />
|
<PythonPackagesToBuild Include="github.com/pulumi/pulumi/sdk/v2/python/cmd/pulumi-language-python" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Exec Command=""$(MSBuildThisFileDirectory)\scripts\get-version.cmd"" ConsoleToMSBuild="true">
|
<Exec Command=""$(MSBuildThisFileDirectory)\scripts\get-version.cmd"" ConsoleToMSBuild="true">
|
||||||
<Output TaskParameter="ConsoleOutput" PropertyName="Version" />
|
<Output TaskParameter="ConsoleOutput" PropertyName="Version" />
|
||||||
</Exec>
|
</Exec>
|
||||||
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=$(Version)" %(PythonPackagesToBuild.Identity)"
|
<Exec Command="go install -ldflags "-X github.com/pulumi/pulumi/sdk/v2/go/common/version.Version=$(Version)" %(PythonPackagesToBuild.Identity)"
|
||||||
EnvironmentVariables="GOBIN=$(PulumiBin)"
|
EnvironmentVariables="GOBIN=$(PulumiBin)"
|
||||||
WorkingDirectory="$(SdkDirectory)"/>
|
WorkingDirectory="$(SdkDirectory)"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -258,7 +258,7 @@
|
||||||
<!-- Install the Pulumi SDK -->
|
<!-- Install the Pulumi SDK -->
|
||||||
<Target Name="InstallPulumiPlugin">
|
<Target Name="InstallPulumiPlugin">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PulumiPackagesToBuild Include="github.com/pulumi/pulumi/pkg/cmd/pulumi" />
|
<PulumiPackagesToBuild Include="github.com/pulumi/pulumi/pkg/v2/cmd/pulumi" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Exec Command=""$(MSBuildThisFileDirectory)\scripts\get-version.cmd"" ConsoleToMSBuild="true">
|
<Exec Command=""$(MSBuildThisFileDirectory)\scripts\get-version.cmd"" ConsoleToMSBuild="true">
|
||||||
|
|
|
@ -18,7 +18,6 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -26,13 +25,14 @@ import (
|
||||||
survey "gopkg.in/AlecAivazis/survey.v1"
|
survey "gopkg.in/AlecAivazis/survey.v1"
|
||||||
surveycore "gopkg.in/AlecAivazis/survey.v1/core"
|
surveycore "gopkg.in/AlecAivazis/survey.v1/core"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ApplierOptions is a bag of configuration settings for an Applier.
|
// ApplierOptions is a bag of configuration settings for an Applier.
|
||||||
|
|
|
@ -22,20 +22,21 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/operations"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/operations"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/stack"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets"
|
"github.com/pulumi/pulumi/pkg/v2/resource/stack"
|
||||||
"github.com/pulumi/pulumi/pkg/util/cancel"
|
"github.com/pulumi/pulumi/pkg/v2/secrets"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/pkg/v2/util/cancel"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -20,9 +20,9 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetStackResourceOutputs(t *testing.T) {
|
func TestGetStackResourceOutputs(t *testing.T) {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package display
|
package display
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/plugin"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/plugin"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
)
|
)
|
||||||
|
|
||||||
// getProperty fetches the child property with the indicated key from the given property value. If the key does not
|
// getProperty fetches the child property with the indicated key from the given property value. If the key does not
|
||||||
|
|
|
@ -3,10 +3,11 @@ package display
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/plugin"
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/plugin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTranslateDetailedDiff(t *testing.T) {
|
func TestTranslateDetailedDiff(t *testing.T) {
|
||||||
|
|
|
@ -25,14 +25,14 @@ import (
|
||||||
|
|
||||||
"github.com/dustin/go-humanize/english"
|
"github.com/dustin/go-humanize/english"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ShowDiffEvents displays the engine events with the diff view.
|
// ShowDiffEvents displays the engine events with the diff view.
|
||||||
|
|
|
@ -21,13 +21,13 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ShowEvents reads events from the `events` channel until it is closed, displaying each event as
|
// ShowEvents reads events from the `events` channel until it is closed, displaying each event as
|
||||||
|
|
|
@ -2,12 +2,13 @@ package display
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
|
||||||
"github.com/pulumi/pulumi/pkg/resource/stack"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/pkg/v2/resource/stack"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/plugin"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/plugin"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ConvertEngineEvent converts a raw engine.Event into an apitype.EngineEvent used in the Pulumi
|
// ConvertEngineEvent converts a raw engine.Event into an apitype.EngineEvent used in the Pulumi
|
||||||
|
|
|
@ -19,16 +19,16 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/stack"
|
"github.com/pulumi/pulumi/pkg/v2/resource/stack"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
// massagePropertyValue takes a property value and strips out the secrets annotations from it. If showSecrets is
|
// massagePropertyValue takes a property value and strips out the secrets annotations from it. If showSecrets is
|
||||||
|
|
|
@ -24,7 +24,7 @@ import (
|
||||||
|
|
||||||
gotty "github.com/ijc/Gotty"
|
gotty "github.com/ijc/Gotty"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
)
|
)
|
||||||
|
|
||||||
/* Satisfied by gotty.TermInfo as well as noTermInfo from below */
|
/* Satisfied by gotty.TermInfo as well as noTermInfo from below */
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
package display
|
package display
|
||||||
|
|
||||||
import "github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
import "github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
|
|
||||||
// Type of output to display.
|
// Type of output to display.
|
||||||
type Type int
|
type Type int
|
||||||
|
|
|
@ -30,15 +30,15 @@ import (
|
||||||
"github.com/docker/docker/pkg/term"
|
"github.com/docker/docker/pkg/term"
|
||||||
"golang.org/x/crypto/ssh/terminal"
|
"golang.org/x/crypto/ssh/terminal"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Progress describes a message we want to show in the display. There are two types of messages,
|
// Progress describes a message we want to show in the display. There are two types of messages,
|
||||||
|
|
|
@ -20,10 +20,10 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ShowQueryEvents displays query events on the CLI.
|
// ShowQueryEvents displays query events on the CLI.
|
||||||
|
|
|
@ -22,11 +22,11 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/dustin/go-humanize/english"
|
"github.com/dustin/go-humanize/english"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Row interface {
|
type Row interface {
|
||||||
|
|
|
@ -18,8 +18,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
)
|
)
|
||||||
|
|
||||||
func columnHeader(msg string) string {
|
func columnHeader(msg string) string {
|
||||||
|
|
|
@ -22,9 +22,9 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
)
|
)
|
||||||
|
|
||||||
// We use RFC 5424 timestamps with millisecond precision for displaying time stamps on watch
|
// We use RFC 5424 timestamps with millisecond precision for displaying time stamps on watch
|
||||||
|
|
|
@ -35,25 +35,25 @@ import (
|
||||||
_ "gocloud.dev/blob/s3blob" // driver for s3://
|
_ "gocloud.dev/blob/s3blob" // driver for s3://
|
||||||
"gocloud.dev/gcerrors"
|
"gocloud.dev/gcerrors"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/operations"
|
"github.com/pulumi/pulumi/pkg/v2/operations"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/edit"
|
"github.com/pulumi/pulumi/pkg/v2/resource/edit"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/stack"
|
"github.com/pulumi/pulumi/pkg/v2/resource/stack"
|
||||||
"github.com/pulumi/pulumi/pkg/util/validation"
|
"github.com/pulumi/pulumi/pkg/v2/util/validation"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/encoding"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/encoding"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/logging"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Backend extends the base backend interface with specific information about local backends.
|
// Backend extends the base backend interface with specific information about local backends.
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/logging"
|
||||||
"gocloud.dev/blob"
|
"gocloud.dev/blob"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
|
|
||||||
"golang.org/x/oauth2/google"
|
"golang.org/x/oauth2/google"
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
package filestate
|
package filestate
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets"
|
"github.com/pulumi/pulumi/pkg/v2/secrets"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
)
|
)
|
||||||
|
|
||||||
// localSnapshotManager is a simple SnapshotManager implementation that persists snapshots
|
// localSnapshotManager is a simple SnapshotManager implementation that persists snapshots
|
||||||
|
|
|
@ -18,14 +18,14 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/operations"
|
"github.com/pulumi/pulumi/pkg/v2/operations"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Stack is a local stack. This simply adds some local-specific properties atop the standard backend stack interface.
|
// Stack is a local stack. This simply adds some local-specific properties atop the standard backend stack interface.
|
||||||
|
|
|
@ -24,24 +24,24 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"gocloud.dev/gcerrors"
|
"gocloud.dev/gcerrors"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/stack"
|
"github.com/pulumi/pulumi/pkg/v2/resource/stack"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets"
|
"github.com/pulumi/pulumi/pkg/v2/secrets"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/encoding"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/encoding"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/fsutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/fsutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/logging"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
const DisableCheckpointBackupsEnvVar = "PULUMI_DISABLE_CHECKPOINT_BACKUPS"
|
const DisableCheckpointBackupsEnvVar = "PULUMI_DISABLE_CHECKPOINT_BACKUPS"
|
||||||
|
|
|
@ -34,26 +34,26 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/skratchdot/open-golang/open"
|
"github.com/skratchdot/open-golang/open"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/filestate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/filestate"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate/client"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate/client"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/operations"
|
"github.com/pulumi/pulumi/pkg/v2/operations"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets"
|
"github.com/pulumi/pulumi/pkg/v2/secrets"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/logging"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/retry"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/retry"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -27,18 +27,18 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
|
|
||||||
"github.com/google/go-querystring/query"
|
"github.com/google/go-querystring/query"
|
||||||
"github.com/opentracing/opentracing-go"
|
"github.com/opentracing/opentracing-go"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/util/tracing"
|
"github.com/pulumi/pulumi/pkg/v2/util/tracing"
|
||||||
"github.com/pulumi/pulumi/pkg/version"
|
"github.com/pulumi/pulumi/pkg/v2/version"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/httputil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/httputil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -26,20 +26,20 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/plugin"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/plugin"
|
||||||
|
|
||||||
"github.com/blang/semver"
|
"github.com/blang/semver"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/util/validation"
|
"github.com/pulumi/pulumi/pkg/v2/util/validation"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Client provides a slim wrapper around the Pulumi HTTP/REST API.
|
// Client provides a slim wrapper around the Pulumi HTTP/REST API.
|
||||||
|
|
|
@ -12,20 +12,20 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/archive"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/archive"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/npm"
|
"github.com/pulumi/pulumi/pkg/v2/npm"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate/client"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate/client"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
resourceanalyzer "github.com/pulumi/pulumi/pkg/resource/analyzer"
|
resourceanalyzer "github.com/pulumi/pulumi/pkg/v2/resource/analyzer"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
type cloudRequiredPolicy struct {
|
type cloudRequiredPolicy struct {
|
||||||
|
|
|
@ -18,11 +18,11 @@ import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate/client"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate/client"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/stack"
|
"github.com/pulumi/pulumi/pkg/v2/resource/stack"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets"
|
"github.com/pulumi/pulumi/pkg/v2/secrets"
|
||||||
)
|
)
|
||||||
|
|
||||||
// cloudSnapshotPersister persists snapshots to the Pulumi service.
|
// cloudSnapshotPersister persists snapshots to the Pulumi service.
|
||||||
|
|
|
@ -19,15 +19,15 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate/client"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate/client"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/operations"
|
"github.com/pulumi/pulumi/pkg/v2/operations"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Stack is a cloud stack. This simply adds some cloud-specific properties atop the standard backend stack interface.
|
// Stack is a cloud stack. This simply adds some cloud-specific properties atop the standard backend stack interface.
|
||||||
|
|
|
@ -20,20 +20,20 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/logging"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate/client"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate/client"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/stack"
|
"github.com/pulumi/pulumi/pkg/v2/resource/stack"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
type tokenRequest chan<- tokenResponse
|
type tokenRequest chan<- tokenResponse
|
||||||
|
|
|
@ -17,14 +17,14 @@ package backend
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/operations"
|
"github.com/pulumi/pulumi/pkg/v2/operations"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -18,10 +18,9 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/plugin"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/plugin"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// PublishOperation publishes a PolicyPack to the backend.
|
// PublishOperation publishes a PolicyPack to the backend.
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
|
|
||||||
opentracing "github.com/opentracing/opentracing-go"
|
opentracing "github.com/opentracing/opentracing-go"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MakeQuery func(context.Context, QueryOperation) (engine.QueryInfo, error)
|
type MakeQuery func(context.Context, QueryOperation) (engine.QueryInfo, error)
|
||||||
|
|
|
@ -20,13 +20,14 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/pkg/version"
|
"github.com/pulumi/pulumi/pkg/v2/secrets"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/pkg/v2/version"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SnapshotPersister is an interface implemented by our backends that implements snapshot
|
// SnapshotPersister is an interface implemented by our backends that implements snapshot
|
||||||
|
|
|
@ -20,12 +20,12 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets"
|
"github.com/pulumi/pulumi/pkg/v2/secrets"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets/b64"
|
"github.com/pulumi/pulumi/pkg/v2/secrets/b64"
|
||||||
"github.com/pulumi/pulumi/pkg/version"
|
"github.com/pulumi/pulumi/pkg/v2/version"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MockRegisterResourceEvent struct {
|
type MockRegisterResourceEvent struct {
|
||||||
|
|
|
@ -21,16 +21,16 @@ import (
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/operations"
|
"github.com/pulumi/pulumi/pkg/v2/operations"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/gitutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/gitutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Stack is a stack associated with a particular backend implementation.
|
// Stack is a stack associated with a particular backend implementation.
|
||||||
|
|
|
@ -17,8 +17,8 @@ package state
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CurrentStack reads the current stack and returns an instance connected to its backend provider.
|
// CurrentStack reads the current stack and returns an instance connected to its backend provider.
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
package backend
|
package backend
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UpdateMetadata describes optional metadata about an update.
|
// UpdateMetadata describes optional metadata about an update.
|
||||||
|
|
|
@ -22,12 +22,12 @@ import (
|
||||||
|
|
||||||
"github.com/rjeczalik/notify"
|
"github.com/rjeczalik/notify"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/operations"
|
"github.com/pulumi/pulumi/pkg/v2/operations"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/logging"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Watch watches the project's working directory for changes and automatically updates the active
|
// Watch watches the project's working directory for changes and automatically updates the active
|
||||||
|
|
|
@ -17,14 +17,14 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newCancelCmd() *cobra.Command {
|
func newCancelCmd() *cobra.Command {
|
||||||
|
|
|
@ -28,13 +28,13 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"golang.org/x/crypto/ssh/terminal"
|
"golang.org/x/crypto/ssh/terminal"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets"
|
"github.com/pulumi/pulumi/pkg/v2/secrets"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newConfigCmd() *cobra.Command {
|
func newConfigCmd() *cobra.Command {
|
||||||
|
|
|
@ -19,9 +19,9 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPrettyKeyForProject(t *testing.T) {
|
func TestPrettyKeyForProject(t *testing.T) {
|
||||||
|
|
|
@ -19,13 +19,13 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/filestate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/filestate"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/stack"
|
"github.com/pulumi/pulumi/pkg/v2/resource/stack"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets"
|
"github.com/pulumi/pulumi/pkg/v2/secrets"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets/passphrase"
|
"github.com/pulumi/pulumi/pkg/v2/secrets/passphrase"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getStackEncrypter(s backend.Stack) (config.Encrypter, error) {
|
func getStackEncrypter(s backend.Stack) (config.Encrypter, error) {
|
||||||
|
|
|
@ -17,11 +17,11 @@ package main
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/secrets"
|
"github.com/pulumi/pulumi/pkg/v2/secrets"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets/cloud"
|
"github.com/pulumi/pulumi/pkg/v2/secrets/cloud"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newCloudSecretsManager(stackName tokens.QName, configFile, secretsProvider string) (secrets.Manager, error) {
|
func newCloudSecretsManager(stackName tokens.QName, configFile, secretsProvider string) (secrets.Manager, error) {
|
||||||
|
|
|
@ -15,10 +15,9 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pulumi/pulumi/pkg/secrets/service"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate"
|
||||||
|
"github.com/pulumi/pulumi/pkg/v2/secrets"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate"
|
"github.com/pulumi/pulumi/pkg/v2/secrets/service"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func newServiceSecretsManager(s httpstate.Stack) (secrets.Manager, error) {
|
func newServiceSecretsManager(s httpstate.Stack) (secrets.Manager, error) {
|
||||||
|
|
|
@ -21,14 +21,14 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/secrets"
|
"github.com/pulumi/pulumi/pkg/v2/secrets"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets/passphrase"
|
"github.com/pulumi/pulumi/pkg/v2/secrets/passphrase"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func readPassphrase(prompt string) (string, error) {
|
func readPassphrase(prompt string) (string, error) {
|
||||||
|
|
|
@ -21,12 +21,12 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newDestroyCmd() *cobra.Command {
|
func newDestroyCmd() *cobra.Command {
|
||||||
|
@ -63,8 +63,8 @@ func newDestroyCmd() *cobra.Command {
|
||||||
Args: cmdutil.NoArgs,
|
Args: cmdutil.NoArgs,
|
||||||
Run: cmdutil.RunResultFunc(func(cmd *cobra.Command, args []string) result.Result {
|
Run: cmdutil.RunResultFunc(func(cmd *cobra.Command, args []string) result.Result {
|
||||||
interactive := cmdutil.Interactive()
|
interactive := cmdutil.Interactive()
|
||||||
if !interactive {
|
if !interactive && !yes {
|
||||||
yes = true // auto-approve changes, since we cannot prompt.
|
return result.FromError(errors.New("--yes must be passed in to proceed when running in non-interactive mode"))
|
||||||
}
|
}
|
||||||
|
|
||||||
opts, err := updateFlagsToOptions(interactive, skipPreview, yes)
|
opts, err := updateFlagsToOptions(interactive, skipPreview, yes)
|
||||||
|
|
|
@ -6,12 +6,12 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PrintEngineResult optionally provides a place for the CLI to provide human-friendly error
|
// PrintEngineResult optionally provides a place for the CLI to provide human-friendly error
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newCompletionCmd returns a new command that, when run, generates a bash or zsh completion script for the CLI.
|
// newCompletionCmd returns a new command that, when run, generates a bash or zsh completion script for the CLI.
|
||||||
|
|
|
@ -25,7 +25,7 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/cobra/doc"
|
"github.com/spf13/cobra/doc"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Used to replace the `## <command>` line in generated markdown files.
|
// Used to replace the `## <command>` line in generated markdown files.
|
||||||
|
|
|
@ -25,12 +25,12 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newHistoryCmd() *cobra.Command {
|
func newHistoryCmd() *cobra.Command {
|
||||||
|
|
|
@ -23,12 +23,12 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/filestate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/filestate"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newLoginCmd() *cobra.Command {
|
func newLoginCmd() *cobra.Command {
|
||||||
|
|
|
@ -18,11 +18,11 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/filestate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/filestate"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newLogoutCmd() *cobra.Command {
|
func newLogoutCmd() *cobra.Command {
|
||||||
|
|
|
@ -23,10 +23,10 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/operations"
|
"github.com/pulumi/pulumi/pkg/v2/operations"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// We use RFC 5424 timestamps with millisecond precision for displaying time stamps on log entries. Go does not
|
// We use RFC 5424 timestamps with millisecond precision for displaying time stamps on log entries. Go does not
|
||||||
|
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/version"
|
"github.com/pulumi/pulumi/pkg/v2/version"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
)
|
)
|
||||||
|
|
||||||
func panicHandler() {
|
func panicHandler() {
|
||||||
|
|
|
@ -31,21 +31,21 @@ import (
|
||||||
survey "gopkg.in/AlecAivazis/survey.v1"
|
survey "gopkg.in/AlecAivazis/survey.v1"
|
||||||
surveycore "gopkg.in/AlecAivazis/survey.v1/core"
|
surveycore "gopkg.in/AlecAivazis/survey.v1/core"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/state"
|
"github.com/pulumi/pulumi/pkg/v2/backend/state"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/npm"
|
"github.com/pulumi/pulumi/pkg/v2/npm"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/executable"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/executable"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/logging"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
type promptForValueFunc func(yes bool, valueType string, defaultValue string, secret bool,
|
type promptForValueFunc func(yes bool, valueType string, defaultValue string, secret bool,
|
||||||
|
@ -69,8 +69,8 @@ type newArgs struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func runNew(args newArgs) error {
|
func runNew(args newArgs) error {
|
||||||
if !args.interactive {
|
if !args.interactive && !args.yes {
|
||||||
args.yes = true // auto-approve changes, since we cannot prompt.
|
return errors.New("--yes must be passed in to proceed when running in non-interactive mode")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepare options.
|
// Prepare options.
|
||||||
|
|
|
@ -21,10 +21,10 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ func TestCreatingStackWithArgsSpecifiedName(t *testing.T) {
|
||||||
|
|
||||||
var args = newArgs{
|
var args = newArgs{
|
||||||
interactive: false,
|
interactive: false,
|
||||||
|
yes: true,
|
||||||
prompt: promptForValue,
|
prompt: promptForValue,
|
||||||
secretsProvider: "default",
|
secretsProvider: "default",
|
||||||
stack: stackName,
|
stack: stackName,
|
||||||
|
@ -50,6 +51,26 @@ func TestCreatingStackWithArgsSpecifiedName(t *testing.T) {
|
||||||
removeStack(t, stackName)
|
removeStack(t, stackName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestFailInInteractiveWithoutYes(t *testing.T) {
|
||||||
|
skipIfShort(t)
|
||||||
|
|
||||||
|
tempdir, _ := ioutil.TempDir("", "test-env")
|
||||||
|
defer os.RemoveAll(tempdir)
|
||||||
|
assert.NoError(t, os.Chdir(tempdir))
|
||||||
|
|
||||||
|
var args = newArgs{
|
||||||
|
interactive: false,
|
||||||
|
yes: false,
|
||||||
|
prompt: promptForValue,
|
||||||
|
secretsProvider: "default",
|
||||||
|
stack: stackName,
|
||||||
|
templateNameOrURL: "typescript",
|
||||||
|
}
|
||||||
|
|
||||||
|
err := runNew(args)
|
||||||
|
assert.Error(t, err)
|
||||||
|
}
|
||||||
|
|
||||||
func TestCreatingStackWithPromptedName(t *testing.T) {
|
func TestCreatingStackWithPromptedName(t *testing.T) {
|
||||||
skipIfShort(t)
|
skipIfShort(t)
|
||||||
|
|
||||||
|
@ -83,6 +104,7 @@ func TestCreatingStackWithArgsSpecifiedOrgName(t *testing.T) {
|
||||||
|
|
||||||
var args = newArgs{
|
var args = newArgs{
|
||||||
interactive: false,
|
interactive: false,
|
||||||
|
yes: true,
|
||||||
prompt: promptForValue,
|
prompt: promptForValue,
|
||||||
secretsProvider: "default",
|
secretsProvider: "default",
|
||||||
stack: orgStackName,
|
stack: orgStackName,
|
||||||
|
@ -133,6 +155,7 @@ func TestCreatingStackWithArgsSpecifiedFullNameSucceeds(t *testing.T) {
|
||||||
|
|
||||||
var args = newArgs{
|
var args = newArgs{
|
||||||
interactive: false,
|
interactive: false,
|
||||||
|
yes: true,
|
||||||
prompt: promptForValue,
|
prompt: promptForValue,
|
||||||
secretsProvider: "default",
|
secretsProvider: "default",
|
||||||
stack: fullStackName,
|
stack: fullStackName,
|
||||||
|
@ -182,6 +205,7 @@ func TestCreatingProjectWithArgsSpecifiedName(t *testing.T) {
|
||||||
|
|
||||||
var args = newArgs{
|
var args = newArgs{
|
||||||
interactive: false,
|
interactive: false,
|
||||||
|
yes: true,
|
||||||
name: uniqueProjectName,
|
name: uniqueProjectName,
|
||||||
prompt: promptForValue,
|
prompt: promptForValue,
|
||||||
secretsProvider: "default",
|
secretsProvider: "default",
|
||||||
|
@ -237,6 +261,7 @@ func TestCreatingProjectWithExistingArgsSpecifiedNameFails(t *testing.T) {
|
||||||
|
|
||||||
var args = newArgs{
|
var args = newArgs{
|
||||||
interactive: false,
|
interactive: false,
|
||||||
|
yes: true,
|
||||||
name: projectName,
|
name: projectName,
|
||||||
prompt: promptForValue,
|
prompt: promptForValue,
|
||||||
secretsProvider: "default",
|
secretsProvider: "default",
|
||||||
|
@ -290,6 +315,7 @@ func TestGeneratingProjectWithExistingArgsSpecifiedNameSucceeds(t *testing.T) {
|
||||||
var args = newArgs{
|
var args = newArgs{
|
||||||
generateOnly: true,
|
generateOnly: true,
|
||||||
interactive: false,
|
interactive: false,
|
||||||
|
yes: true,
|
||||||
name: projectName,
|
name: projectName,
|
||||||
prompt: promptForValue,
|
prompt: promptForValue,
|
||||||
secretsProvider: "default",
|
secretsProvider: "default",
|
||||||
|
@ -349,6 +375,7 @@ func TestGeneratingProjectWithInvalidArgsSpecifiedNameFails(t *testing.T) {
|
||||||
var args = newArgs{
|
var args = newArgs{
|
||||||
generateOnly: true,
|
generateOnly: true,
|
||||||
interactive: false,
|
interactive: false,
|
||||||
|
yes: true,
|
||||||
name: "not#valid",
|
name: "not#valid",
|
||||||
prompt: promptForValue,
|
prompt: promptForValue,
|
||||||
secretsProvider: "default",
|
secretsProvider: "default",
|
||||||
|
@ -397,6 +424,8 @@ func TestInvalidTemplateName(t *testing.T) {
|
||||||
assert.NoError(t, os.Chdir(tempdir))
|
assert.NoError(t, os.Chdir(tempdir))
|
||||||
|
|
||||||
var args = newArgs{
|
var args = newArgs{
|
||||||
|
interactive: false,
|
||||||
|
yes: true,
|
||||||
secretsProvider: "default",
|
secretsProvider: "default",
|
||||||
templateNameOrURL: "",
|
templateNameOrURL: "",
|
||||||
}
|
}
|
||||||
|
@ -417,6 +446,8 @@ func TestInvalidTemplateName(t *testing.T) {
|
||||||
template := "this-is-not-the-template-youre-looking-for"
|
template := "this-is-not-the-template-youre-looking-for"
|
||||||
|
|
||||||
var args = newArgs{
|
var args = newArgs{
|
||||||
|
interactive: false,
|
||||||
|
yes: true,
|
||||||
secretsProvider: "default",
|
secretsProvider: "default",
|
||||||
templateNameOrURL: template,
|
templateNameOrURL: template,
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,11 +17,11 @@ package main
|
||||||
import (
|
import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/plugin"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/plugin"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newPluginCmd() *cobra.Command {
|
func newPluginCmd() *cobra.Command {
|
||||||
|
|
|
@ -23,11 +23,11 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newPluginInstallCmd() *cobra.Command {
|
func newPluginInstallCmd() *cobra.Command {
|
||||||
|
|
|
@ -22,8 +22,8 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newPluginLsCmd() *cobra.Command {
|
func newPluginLsCmd() *cobra.Command {
|
||||||
|
|
|
@ -22,10 +22,10 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newPluginRmCmd() *cobra.Command {
|
func newPluginRmCmd() *cobra.Command {
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,10 @@ package main
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
resourceanalyzer "github.com/pulumi/pulumi/pkg/resource/analyzer"
|
resourceanalyzer "github.com/pulumi/pulumi/pkg/v2/resource/analyzer"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/plugin"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/plugin"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,9 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,9 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,11 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
survey "gopkg.in/AlecAivazis/survey.v1"
|
survey "gopkg.in/AlecAivazis/survey.v1"
|
||||||
surveycore "gopkg.in/AlecAivazis/survey.v1/core"
|
surveycore "gopkg.in/AlecAivazis/survey.v1/core"
|
||||||
|
@ -84,8 +84,8 @@ func newPolicyNewCmd() *cobra.Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
func runNewPolicyPack(args newPolicyArgs) error {
|
func runNewPolicyPack(args newPolicyArgs) error {
|
||||||
if !args.interactive {
|
if !args.interactive && !args.yes {
|
||||||
args.yes = true // auto-approve changes, since we cannot prompt.
|
return errors.New("--yes must be passed in to proceed when running in non-interactive mode")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepare options.
|
// Prepare options.
|
||||||
|
|
|
@ -31,6 +31,7 @@ func TestCreatingPolicyPackWithArgsSpecifiedName(t *testing.T) {
|
||||||
|
|
||||||
var args = newPolicyArgs{
|
var args = newPolicyArgs{
|
||||||
interactive: false,
|
interactive: false,
|
||||||
|
yes: true,
|
||||||
templateNameOrURL: "aws-typescript",
|
templateNameOrURL: "aws-typescript",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +74,8 @@ func TestInvalidPolicyPackTemplateName(t *testing.T) {
|
||||||
assert.NoError(t, os.Chdir(tempdir))
|
assert.NoError(t, os.Chdir(tempdir))
|
||||||
|
|
||||||
var args = newPolicyArgs{
|
var args = newPolicyArgs{
|
||||||
|
interactive: false,
|
||||||
|
yes: true,
|
||||||
templateNameOrURL: nonExistantTemplate,
|
templateNameOrURL: nonExistantTemplate,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,16 +18,14 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/plugin"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/plugin"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,12 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newPreviewCmd() *cobra.Command {
|
func newPreviewCmd() *cobra.Command {
|
||||||
|
|
|
@ -35,18 +35,18 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/filestate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/filestate"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate/client"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate/client"
|
||||||
"github.com/pulumi/pulumi/pkg/version"
|
"github.com/pulumi/pulumi/pkg/v2/version"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/httputil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/httputil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/logging"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewPulumiCmd creates a new Pulumi Cmd instance.
|
// NewPulumiCmd creates a new Pulumi Cmd instance.
|
||||||
|
|
|
@ -19,11 +19,11 @@ import (
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
// intentionally disabling here for cleaner err declaration/assignment.
|
// intentionally disabling here for cleaner err declaration/assignment.
|
||||||
|
|
|
@ -20,12 +20,12 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newRefreshCmd() *cobra.Command {
|
func newRefreshCmd() *cobra.Command {
|
||||||
|
@ -61,8 +61,8 @@ func newRefreshCmd() *cobra.Command {
|
||||||
Args: cmdutil.NoArgs,
|
Args: cmdutil.NoArgs,
|
||||||
Run: cmdutil.RunResultFunc(func(cmd *cobra.Command, args []string) result.Result {
|
Run: cmdutil.RunResultFunc(func(cmd *cobra.Command, args []string) result.Result {
|
||||||
interactive := cmdutil.Interactive()
|
interactive := cmdutil.Interactive()
|
||||||
if !interactive {
|
if !interactive && !yes {
|
||||||
yes = true // auto-approve changes, since we cannot prompt.
|
return result.FromError(errors.New("--yes must be passed in to proceed when running in non-interactive mode"))
|
||||||
}
|
}
|
||||||
|
|
||||||
opts, err := updateFlagsToOptions(interactive, skipPreview, yes)
|
opts, err := updateFlagsToOptions(interactive, skipPreview, yes)
|
||||||
|
|
|
@ -23,11 +23,11 @@ import (
|
||||||
humanize "github.com/dustin/go-humanize"
|
humanize "github.com/dustin/go-humanize"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newStackCmd() *cobra.Command {
|
func newStackCmd() *cobra.Command {
|
||||||
|
|
|
@ -21,10 +21,10 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newStackExportCmd() *cobra.Command {
|
func newStackExportCmd() *cobra.Command {
|
||||||
|
|
|
@ -18,12 +18,12 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/graph"
|
"github.com/pulumi/pulumi/pkg/v2/graph"
|
||||||
"github.com/pulumi/pulumi/pkg/graph/dotconv"
|
"github.com/pulumi/pulumi/pkg/v2/graph/dotconv"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,11 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/stack"
|
"github.com/pulumi/pulumi/pkg/v2/resource/stack"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newStackImportCmd() *cobra.Command {
|
func newStackImportCmd() *cobra.Command {
|
||||||
|
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -23,12 +23,12 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/state"
|
"github.com/pulumi/pulumi/pkg/v2/backend/state"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newStackLsCmd() *cobra.Command {
|
func newStackLsCmd() *cobra.Command {
|
||||||
|
|
|
@ -20,11 +20,11 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/stack"
|
"github.com/pulumi/pulumi/pkg/v2/resource/stack"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newStackOutputCmd() *cobra.Command {
|
func newStackOutputCmd() *cobra.Command {
|
||||||
|
|
|
@ -19,15 +19,15 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/state"
|
"github.com/pulumi/pulumi/pkg/v2/backend/state"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newStackRenameCmd() *cobra.Command {
|
func newStackRenameCmd() *cobra.Command {
|
||||||
|
|
|
@ -18,16 +18,16 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/state"
|
"github.com/pulumi/pulumi/pkg/v2/backend/state"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newStackRmCmd() *cobra.Command {
|
func newStackRmCmd() *cobra.Command {
|
||||||
|
|
|
@ -18,10 +18,10 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/state"
|
"github.com/pulumi/pulumi/pkg/v2/backend/state"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newStackSelectCmd handles both the "local" and "cloud" scenarios in its implementation.
|
// newStackSelectCmd handles both the "local" and "cloud" scenarios in its implementation.
|
||||||
|
|
|
@ -21,10 +21,10 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newStackTagCmd() *cobra.Command {
|
func newStackTagCmd() *cobra.Command {
|
||||||
|
|
|
@ -18,19 +18,19 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/edit"
|
"github.com/pulumi/pulumi/pkg/v2/resource/edit"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/stack"
|
"github.com/pulumi/pulumi/pkg/v2/resource/stack"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/apitype"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/apitype"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
survey "gopkg.in/AlecAivazis/survey.v1"
|
survey "gopkg.in/AlecAivazis/survey.v1"
|
||||||
surveycore "gopkg.in/AlecAivazis/survey.v1/core"
|
surveycore "gopkg.in/AlecAivazis/survey.v1/core"
|
||||||
|
|
|
@ -17,13 +17,12 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
|
"github.com/pulumi/pulumi/pkg/v2/resource/edit"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/edit"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
|
@ -17,16 +17,13 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/pkg/v2/resource/edit"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
"github.com/pulumi/pulumi/pkg/resource/edit"
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
|
@ -21,22 +21,20 @@ import (
|
||||||
"math"
|
"math"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/tokens"
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
|
"github.com/pulumi/pulumi/pkg/v2/resource/deploy"
|
||||||
|
"github.com/pulumi/pulumi/pkg/v2/resource/stack"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/resource/config"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/tokens"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
|
||||||
"github.com/pulumi/pulumi/pkg/resource/deploy"
|
|
||||||
"github.com/pulumi/pulumi/pkg/resource/stack"
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource"
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/resource/config"
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -334,8 +332,8 @@ func newUpCmd() *cobra.Command {
|
||||||
Args: cmdutil.MaximumNArgs(1),
|
Args: cmdutil.MaximumNArgs(1),
|
||||||
Run: cmdutil.RunResultFunc(func(cmd *cobra.Command, args []string) result.Result {
|
Run: cmdutil.RunResultFunc(func(cmd *cobra.Command, args []string) result.Result {
|
||||||
interactive := cmdutil.Interactive()
|
interactive := cmdutil.Interactive()
|
||||||
if !interactive {
|
if !interactive && !yes {
|
||||||
yes = true // auto-approve changes, since we cannot prompt.
|
return result.FromError(errors.New("--yes must be passed in to proceed when running in non-interactive mode"))
|
||||||
}
|
}
|
||||||
|
|
||||||
opts, err := updateFlagsToOptions(interactive, skipPreview, yes)
|
opts, err := updateFlagsToOptions(interactive, skipPreview, yes)
|
||||||
|
|
|
@ -35,22 +35,22 @@ import (
|
||||||
surveycore "gopkg.in/AlecAivazis/survey.v1/core"
|
surveycore "gopkg.in/AlecAivazis/survey.v1/core"
|
||||||
git "gopkg.in/src-d/go-git.v4"
|
git "gopkg.in/src-d/go-git.v4"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/filestate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/filestate"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/httpstate"
|
"github.com/pulumi/pulumi/pkg/v2/backend/httpstate"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/state"
|
"github.com/pulumi/pulumi/pkg/v2/backend/state"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/pkg/secrets/passphrase"
|
"github.com/pulumi/pulumi/pkg/v2/secrets/passphrase"
|
||||||
"github.com/pulumi/pulumi/pkg/util/cancel"
|
"github.com/pulumi/pulumi/pkg/v2/util/cancel"
|
||||||
"github.com/pulumi/pulumi/pkg/util/tracing"
|
"github.com/pulumi/pulumi/pkg/v2/util/tracing"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/diag/colors"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/ciutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/ciutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/gitutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/gitutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/logging"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/workspace"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
func hasDebugCommands() bool {
|
func hasDebugCommands() bool {
|
||||||
|
|
|
@ -17,9 +17,9 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
pul_testing "github.com/pulumi/pulumi/sdk/go/common/testing"
|
pul_testing "github.com/pulumi/pulumi/sdk/v2/go/common/testing"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/gitutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/gitutil"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/version"
|
"github.com/pulumi/pulumi/pkg/v2/version"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ import (
|
||||||
"sourcegraph.com/sourcegraph/appdash"
|
"sourcegraph.com/sourcegraph/appdash"
|
||||||
"sourcegraph.com/sourcegraph/appdash/traceapp"
|
"sourcegraph.com/sourcegraph/appdash/traceapp"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/contract"
|
||||||
)
|
)
|
||||||
|
|
||||||
func readTrace(path string, store io.ReaderFrom) error {
|
func readTrace(path string, store io.ReaderFrom) error {
|
||||||
|
|
|
@ -20,11 +20,11 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend"
|
"github.com/pulumi/pulumi/pkg/v2/backend"
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/pkg/engine"
|
"github.com/pulumi/pulumi/pkg/v2/engine"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/result"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/result"
|
||||||
)
|
)
|
||||||
|
|
||||||
// intentionally disabling here for cleaner err declaration/assignment.
|
// intentionally disabling here for cleaner err declaration/assignment.
|
||||||
|
|
|
@ -17,8 +17,8 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/pulumi/pulumi/pkg/backend/display"
|
"github.com/pulumi/pulumi/pkg/v2/backend/display"
|
||||||
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
|
"github.com/pulumi/pulumi/sdk/v2/go/common/util/cmdutil"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue