aloof-tailor-93191
09/20/2018, 9:05 PMNoCredentialProviders: no valid providers in chain.
microscopic-florist-22719
aloof-tailor-93191
09/20/2018, 9:08 PMmicroscopic-florist-22719
aloof-tailor-93191
09/20/2018, 9:09 PMmicroscopic-florist-22719
aloof-tailor-93191
09/20/2018, 9:09 PMmicroscopic-florist-22719
aloof-tailor-93191
09/20/2018, 9:10 PMfunc encrypt(arn, value string) (string, error) {
sess, err := session.NewSession(&aws.Config{
Region: aws.String("us-east-1"),
})
if err != nil {
return "", err
}
kmsSvc := awskms.New(sess)
result, err := kmsSvc.Encrypt(&awskms.EncryptInput{
KeyId: aws.String(arn),
Plaintext: []byte(value),
})
if err != nil {
return "", err
}
return string(result.CiphertextBlob), nil
}
microscopic-florist-22719
aloof-tailor-93191
09/20/2018, 9:11 PMmicroscopic-florist-22719
aloof-tailor-93191
09/20/2018, 9:12 PMmicroscopic-florist-22719
CredentialsChainVerboseErrors
to aws.Bool(true)
in the aws.Config
value you're building?aloof-tailor-93191
09/20/2018, 9:15 PMDiagnostics:
pulumi:pulumi:Stack: billing-billing-dev
info: error: program failed: 1 error occurred:
* marshaling properties: awaiting input property environment: NoCredentialProviders: no valid providers in chain
caused by: EnvAccessKeyNotFound: failed to find credentials in the environment.
SharedCredsLoad: failed to load profile, .
EC2RoleRequestError: no EC2 instance role found
caused by: RequestError: send request failed
caused by: Get <http://169.254.169.254/latest/meta-data/iam/security-credentials/>: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
pulumi:pulumi:Stack: billing-billing-dev
error: an unhandled error occurred: program exited with non-zero exit code: 1
microscopic-florist-22719
AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
, right?aloof-tailor-93191
09/20/2018, 9:26 PMmicroscopic-florist-22719
pulumi is not executing the program and passing the environment alongThis would be very surprising, but it's certainly possible
aloof-tailor-93191
09/20/2018, 9:27 PM~/.aws
directory. I have a way of managing my keys as just env vars and so I rely on thatmicroscopic-florist-22719
os.Environ
aloof-tailor-93191
09/20/2018, 9:32 PM[PULUMI_PROJECT=billing PULUMI_STACK=billing-dev PULUMI_CONFIG={"aws:region":"us-east-1","slack:webhook":"[secret]"} PULUMI_DRY_RUN=true PULUMI_PARALLEL=10 PULUMI_MONITOR=127.0.0.1:43596 PULUMI_ENGINE=127.0.0.1:34309]
microscopic-florist-22719
aloof-tailor-93191
09/20/2018, 9:42 PMmicroscopic-florist-22719
aloof-tailor-93191
09/20/2018, 9:43 PMmicroscopic-florist-22719
diff --git a/sdk/go/pulumi-language-go/main.go b/sdk/go/pulumi-language-go/main.go
index 505d130..50ebc02 100644
--- a/sdk/go/pulumi-language-go/main.go
+++ b/sdk/go/pulumi-language-go/main.go
@@ -179,7 +179,7 @@ func (host *goLanguageHost) constructEnv(req *pulumirpc.RunRequest) ([]string, e
return nil, err
}
- var env []string
+ env = append(nil, os.Environ()...)
maybeAppendEnv := func(k, v string) {
if v != "" {
env = append(env, fmt.Sprintf("%s=%s", k, v))
env :=
rather than env =
)aloof-tailor-93191
09/20/2018, 9:52 PMmicroscopic-florist-22719
aloof-tailor-93191
09/20/2018, 11:27 PM