pulumi/pkg/resource
Matt Ellis 31bd463264 Gracefully handle the case where secrets_provider is uninitalized
A customer reported an issue where operations would fail with the
following error:

```
error: could not deserialize deployment: unknown secrets provider type
```

The problem here was the customer's deployment had a
`secrets_provider` section which looked like the following:

```
"secrets_providers": {
    "type": ""
}
```

And so our code to try to construct a secrets manager from this thing
would fail, as our registry does not contain any information about a
provider with an empty type.

We do two things in this change:

1. When serializing a deployment, if there is no secrets manager,
don't even write the `secrets_provider` block. This helps for cases
where we are roundtripping deployments that did not have a provider
configured (i.e. they were older stacks that did not use secrets)

2. When deserializing, if we see an empty secrets provider like the
above, interpret it to mean "this deployment has no secrets". We set
up a decrypter such that if it ends up haiving secrets, we panic
eagerly (since this is a logical bug in our system somewhere).
2019-05-21 17:11:54 -07:00
..
config Encrypt secret values in deployments 2019-05-10 17:07:52 -07:00
deploy Remove acceptsSecrets from InvokeRequest 2019-05-10 17:07:52 -07:00
edit Retain the SecretsManager that was used to deserialize a deployment 2019-05-10 17:07:52 -07:00
graph Process deletions conservatively in parallel (#1963) 2018-09-27 15:49:08 -07:00
plugin Do not pass arguments as secrets to CheckConfig/Configure 2019-05-17 16:42:29 -07:00
provider Implement status sinks 2018-08-31 15:56:53 -07:00
stack Gracefully handle the case where secrets_provider is uninitalized 2019-05-21 17:11:54 -07:00
testdata Fix asset bugs; write more tests 2017-10-24 09:00:11 -07:00
asset.go Correctly handle FileArchives when the filename contains a dot 2019-03-28 13:26:07 -07:00
asset_test.go Correctly handle FileArchives when the filename contains a dot 2019-03-28 13:26:07 -07:00
errors.go Add license headers 2018-05-22 15:02:47 -07:00
properties.go Rework secret annotation algorithm slightly 2019-05-15 09:33:02 -07:00
properties_diff.go Fix a panic during property diffing 2019-05-15 16:20:25 -07:00
properties_diff_test.go Fix a panic during property diffing 2019-05-15 16:20:25 -07:00
properties_test.go Add license headers 2018-05-22 15:02:47 -07:00
resource_goal.go Rename SecretOutputs to AdditionalSecretOutputs 2019-05-10 17:07:52 -07:00
resource_id.go Add license headers 2018-05-22 15:02:47 -07:00
resource_id_test.go Adopt golangci-lint and address issues 2018-11-08 14:11:47 -08:00
resource_operation.go Add a list of in-flight operations to the deployment (#1759) 2018-08-10 21:39:59 -07:00
resource_state.go Rename SecretOutputs to AdditionalSecretOutputs 2019-05-10 17:07:52 -07:00
stack.go Make a smattering of CLI UX improvements 2018-09-24 08:43:46 -07:00
status.go Partial status for resource providers 2018-07-02 13:32:23 -07:00
urn.go Add license headers 2018-05-22 15:02:47 -07:00
urn_test.go Add license headers 2018-05-22 15:02:47 -07:00