2018-06-26 18:14:03 +00:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
2017-02-10 17:08:06 +00:00
|
|
|
// source: provider.proto
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
package pulumirpc
|
2017-02-10 17:08:06 +00:00
|
|
|
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
|
|
import fmt "fmt"
|
|
|
|
import math "math"
|
2018-07-12 01:07:50 +00:00
|
|
|
import empty "github.com/golang/protobuf/ptypes/empty"
|
|
|
|
import _struct "github.com/golang/protobuf/ptypes/struct"
|
2017-02-10 17:08:06 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
context "golang.org/x/net/context"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
|
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
|
2018-04-05 14:00:16 +00:00
|
|
|
type DiffResponse_DiffChanges int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
DiffResponse_DIFF_UNKNOWN DiffResponse_DiffChanges = 0
|
|
|
|
DiffResponse_DIFF_NONE DiffResponse_DiffChanges = 1
|
|
|
|
DiffResponse_DIFF_SOME DiffResponse_DiffChanges = 2
|
|
|
|
)
|
|
|
|
|
|
|
|
var DiffResponse_DiffChanges_name = map[int32]string{
|
|
|
|
0: "DIFF_UNKNOWN",
|
|
|
|
1: "DIFF_NONE",
|
|
|
|
2: "DIFF_SOME",
|
|
|
|
}
|
|
|
|
var DiffResponse_DiffChanges_value = map[string]int32{
|
|
|
|
"DIFF_UNKNOWN": 0,
|
|
|
|
"DIFF_NONE": 1,
|
|
|
|
"DIFF_SOME": 2,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x DiffResponse_DiffChanges) String() string {
|
|
|
|
return proto.EnumName(DiffResponse_DiffChanges_name, int32(x))
|
|
|
|
}
|
2018-07-12 01:07:50 +00:00
|
|
|
func (DiffResponse_DiffChanges) EnumDescriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{8, 0}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
2018-04-05 14:00:16 +00:00
|
|
|
|
2017-08-31 21:31:33 +00:00
|
|
|
type ConfigureRequest struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Variables map[string]string `protobuf:"bytes,1,rep,name=variables" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConfigureRequest) Reset() { *m = ConfigureRequest{} }
|
|
|
|
func (m *ConfigureRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ConfigureRequest) ProtoMessage() {}
|
|
|
|
func (*ConfigureRequest) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{0}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *ConfigureRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ConfigureRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ConfigureRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ConfigureRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *ConfigureRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ConfigureRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *ConfigureRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ConfigureRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ConfigureRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ConfigureRequest.DiscardUnknown(m)
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
var xxx_messageInfo_ConfigureRequest proto.InternalMessageInfo
|
2017-08-31 21:31:33 +00:00
|
|
|
|
|
|
|
func (m *ConfigureRequest) GetVariables() map[string]string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Variables
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-04-04 17:08:17 +00:00
|
|
|
// ConfigureErrorMissingKeys is sent as a Detail on an error returned from `ResourceProvider.Configure`.
|
|
|
|
type ConfigureErrorMissingKeys struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
MissingKeys []*ConfigureErrorMissingKeys_MissingKey `protobuf:"bytes,1,rep,name=missingKeys" json:"missingKeys,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *ConfigureErrorMissingKeys) Reset() { *m = ConfigureErrorMissingKeys{} }
|
|
|
|
func (m *ConfigureErrorMissingKeys) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ConfigureErrorMissingKeys) ProtoMessage() {}
|
|
|
|
func (*ConfigureErrorMissingKeys) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{1}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *ConfigureErrorMissingKeys) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ConfigureErrorMissingKeys.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ConfigureErrorMissingKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ConfigureErrorMissingKeys.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *ConfigureErrorMissingKeys) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ConfigureErrorMissingKeys.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *ConfigureErrorMissingKeys) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ConfigureErrorMissingKeys.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ConfigureErrorMissingKeys) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ConfigureErrorMissingKeys.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ConfigureErrorMissingKeys proto.InternalMessageInfo
|
2018-04-04 17:08:17 +00:00
|
|
|
|
|
|
|
func (m *ConfigureErrorMissingKeys) GetMissingKeys() []*ConfigureErrorMissingKeys_MissingKey {
|
|
|
|
if m != nil {
|
|
|
|
return m.MissingKeys
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type ConfigureErrorMissingKeys_MissingKey struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
|
|
|
Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-04-04 17:08:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConfigureErrorMissingKeys_MissingKey) Reset() { *m = ConfigureErrorMissingKeys_MissingKey{} }
|
|
|
|
func (m *ConfigureErrorMissingKeys_MissingKey) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ConfigureErrorMissingKeys_MissingKey) ProtoMessage() {}
|
|
|
|
func (*ConfigureErrorMissingKeys_MissingKey) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{1, 0}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *ConfigureErrorMissingKeys_MissingKey) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ConfigureErrorMissingKeys_MissingKey.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ConfigureErrorMissingKeys_MissingKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ConfigureErrorMissingKeys_MissingKey.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *ConfigureErrorMissingKeys_MissingKey) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ConfigureErrorMissingKeys_MissingKey.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *ConfigureErrorMissingKeys_MissingKey) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ConfigureErrorMissingKeys_MissingKey.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ConfigureErrorMissingKeys_MissingKey) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ConfigureErrorMissingKeys_MissingKey.DiscardUnknown(m)
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
var xxx_messageInfo_ConfigureErrorMissingKeys_MissingKey proto.InternalMessageInfo
|
|
|
|
|
2018-04-04 17:08:17 +00:00
|
|
|
func (m *ConfigureErrorMissingKeys_MissingKey) GetName() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Name
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConfigureErrorMissingKeys_MissingKey) GetDescription() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Description
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
type InvokeRequest struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Tok string `protobuf:"bytes,1,opt,name=tok" json:"tok,omitempty"`
|
|
|
|
Args *_struct.Struct `protobuf:"bytes,2,opt,name=args" json:"args,omitempty"`
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
Provider string `protobuf:"bytes,3,opt,name=provider" json:"provider,omitempty"`
|
2018-07-12 01:07:50 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *InvokeRequest) Reset() { *m = InvokeRequest{} }
|
|
|
|
func (m *InvokeRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*InvokeRequest) ProtoMessage() {}
|
|
|
|
func (*InvokeRequest) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{2}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *InvokeRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_InvokeRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *InvokeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_InvokeRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *InvokeRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_InvokeRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *InvokeRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_InvokeRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *InvokeRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_InvokeRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_InvokeRequest proto.InternalMessageInfo
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
|
|
|
|
func (m *InvokeRequest) GetTok() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Tok
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *InvokeRequest) GetArgs() *_struct.Struct {
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Args
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
func (m *InvokeRequest) GetProvider() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Provider
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
type InvokeResponse struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Return *_struct.Struct `protobuf:"bytes,1,opt,name=return" json:"return,omitempty"`
|
|
|
|
Failures []*CheckFailure `protobuf:"bytes,2,rep,name=failures" json:"failures,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *InvokeResponse) Reset() { *m = InvokeResponse{} }
|
|
|
|
func (m *InvokeResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*InvokeResponse) ProtoMessage() {}
|
|
|
|
func (*InvokeResponse) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{3}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *InvokeResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_InvokeResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *InvokeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_InvokeResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *InvokeResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_InvokeResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *InvokeResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_InvokeResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *InvokeResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_InvokeResponse.DiscardUnknown(m)
|
|
|
|
}
|
2018-06-27 23:08:21 +00:00
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
var xxx_messageInfo_InvokeResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *InvokeResponse) GetReturn() *_struct.Struct {
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Return
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InvokeResponse) GetFailures() []*CheckFailure {
|
|
|
|
if m != nil {
|
|
|
|
return m.Failures
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-03-03 02:15:38 +00:00
|
|
|
type CheckRequest struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Urn string `protobuf:"bytes,1,opt,name=urn" json:"urn,omitempty"`
|
|
|
|
Olds *_struct.Struct `protobuf:"bytes,2,opt,name=olds" json:"olds,omitempty"`
|
|
|
|
News *_struct.Struct `protobuf:"bytes,3,opt,name=news" json:"news,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *CheckRequest) Reset() { *m = CheckRequest{} }
|
|
|
|
func (m *CheckRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CheckRequest) ProtoMessage() {}
|
|
|
|
func (*CheckRequest) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{4}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *CheckRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_CheckRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *CheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_CheckRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *CheckRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_CheckRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *CheckRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_CheckRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *CheckRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_CheckRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_CheckRequest proto.InternalMessageInfo
|
2017-03-03 02:15:38 +00:00
|
|
|
|
2017-08-31 20:10:55 +00:00
|
|
|
func (m *CheckRequest) GetUrn() string {
|
2017-03-03 02:15:38 +00:00
|
|
|
if m != nil {
|
2017-08-31 20:10:55 +00:00
|
|
|
return m.Urn
|
2017-03-03 02:15:38 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *CheckRequest) GetOlds() *_struct.Struct {
|
2017-03-03 02:15:38 +00:00
|
|
|
if m != nil {
|
2017-12-03 00:34:16 +00:00
|
|
|
return m.Olds
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *CheckRequest) GetNews() *_struct.Struct {
|
2017-12-03 00:34:16 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.News
|
2017-03-03 02:15:38 +00:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type CheckResponse struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Inputs *_struct.Struct `protobuf:"bytes,1,opt,name=inputs" json:"inputs,omitempty"`
|
|
|
|
Failures []*CheckFailure `protobuf:"bytes,2,rep,name=failures" json:"failures,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *CheckResponse) Reset() { *m = CheckResponse{} }
|
|
|
|
func (m *CheckResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CheckResponse) ProtoMessage() {}
|
|
|
|
func (*CheckResponse) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{5}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *CheckResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_CheckResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *CheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_CheckResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *CheckResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_CheckResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *CheckResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_CheckResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *CheckResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_CheckResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_CheckResponse proto.InternalMessageInfo
|
2017-08-01 01:26:15 +00:00
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *CheckResponse) GetInputs() *_struct.Struct {
|
2017-08-01 01:26:15 +00:00
|
|
|
if m != nil {
|
2017-12-03 00:34:16 +00:00
|
|
|
return m.Inputs
|
2017-08-01 01:26:15 +00:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2017-03-03 02:15:38 +00:00
|
|
|
|
|
|
|
func (m *CheckResponse) GetFailures() []*CheckFailure {
|
|
|
|
if m != nil {
|
|
|
|
return m.Failures
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type CheckFailure struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Property string `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
|
|
|
|
Reason string `protobuf:"bytes,2,opt,name=reason" json:"reason,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *CheckFailure) Reset() { *m = CheckFailure{} }
|
|
|
|
func (m *CheckFailure) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CheckFailure) ProtoMessage() {}
|
|
|
|
func (*CheckFailure) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{6}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *CheckFailure) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_CheckFailure.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *CheckFailure) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_CheckFailure.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *CheckFailure) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_CheckFailure.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *CheckFailure) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_CheckFailure.Size(m)
|
|
|
|
}
|
|
|
|
func (m *CheckFailure) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_CheckFailure.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_CheckFailure proto.InternalMessageInfo
|
2017-03-03 02:15:38 +00:00
|
|
|
|
|
|
|
func (m *CheckFailure) GetProperty() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Property
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *CheckFailure) GetReason() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Reason
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2017-08-01 01:26:15 +00:00
|
|
|
type DiffRequest struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
|
|
|
Urn string `protobuf:"bytes,2,opt,name=urn" json:"urn,omitempty"`
|
|
|
|
Olds *_struct.Struct `protobuf:"bytes,3,opt,name=olds" json:"olds,omitempty"`
|
|
|
|
News *_struct.Struct `protobuf:"bytes,4,opt,name=news" json:"news,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *DiffRequest) Reset() { *m = DiffRequest{} }
|
|
|
|
func (m *DiffRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DiffRequest) ProtoMessage() {}
|
|
|
|
func (*DiffRequest) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{7}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *DiffRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_DiffRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *DiffRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_DiffRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *DiffRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_DiffRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *DiffRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_DiffRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *DiffRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_DiffRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_DiffRequest proto.InternalMessageInfo
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
|
2017-08-01 01:26:15 +00:00
|
|
|
func (m *DiffRequest) GetId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2017-08-31 20:10:55 +00:00
|
|
|
func (m *DiffRequest) GetUrn() string {
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
if m != nil {
|
2017-08-31 20:10:55 +00:00
|
|
|
return m.Urn
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *DiffRequest) GetOlds() *_struct.Struct {
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
if m != nil {
|
2017-08-01 01:26:15 +00:00
|
|
|
return m.Olds
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *DiffRequest) GetNews() *_struct.Struct {
|
2017-08-01 01:26:15 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.News
|
|
|
|
}
|
|
|
|
return nil
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
}
|
|
|
|
|
2017-08-01 01:26:15 +00:00
|
|
|
type DiffResponse struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Replaces []string `protobuf:"bytes,1,rep,name=replaces" json:"replaces,omitempty"`
|
|
|
|
Stables []string `protobuf:"bytes,2,rep,name=stables" json:"stables,omitempty"`
|
|
|
|
DeleteBeforeReplace bool `protobuf:"varint,3,opt,name=deleteBeforeReplace" json:"deleteBeforeReplace,omitempty"`
|
|
|
|
Changes DiffResponse_DiffChanges `protobuf:"varint,4,opt,name=changes,enum=pulumirpc.DiffResponse_DiffChanges" json:"changes,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DiffResponse) Reset() { *m = DiffResponse{} }
|
|
|
|
func (m *DiffResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DiffResponse) ProtoMessage() {}
|
|
|
|
func (*DiffResponse) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{8}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *DiffResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_DiffResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *DiffResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_DiffResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *DiffResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_DiffResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *DiffResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_DiffResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *DiffResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_DiffResponse.DiscardUnknown(m)
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
var xxx_messageInfo_DiffResponse proto.InternalMessageInfo
|
2017-08-01 01:26:15 +00:00
|
|
|
|
|
|
|
func (m *DiffResponse) GetReplaces() []string {
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
if m != nil {
|
2017-08-01 01:26:15 +00:00
|
|
|
return m.Replaces
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
}
|
2017-08-01 01:26:15 +00:00
|
|
|
return nil
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
}
|
|
|
|
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
func (m *DiffResponse) GetStables() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Stables
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-12-10 16:37:22 +00:00
|
|
|
func (m *DiffResponse) GetDeleteBeforeReplace() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.DeleteBeforeReplace
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2018-04-05 14:00:16 +00:00
|
|
|
func (m *DiffResponse) GetChanges() DiffResponse_DiffChanges {
|
|
|
|
if m != nil {
|
|
|
|
return m.Changes
|
|
|
|
}
|
|
|
|
return DiffResponse_DIFF_UNKNOWN
|
|
|
|
}
|
|
|
|
|
2017-02-10 17:08:06 +00:00
|
|
|
type CreateRequest struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Urn string `protobuf:"bytes,1,opt,name=urn" json:"urn,omitempty"`
|
|
|
|
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *CreateRequest) Reset() { *m = CreateRequest{} }
|
|
|
|
func (m *CreateRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CreateRequest) ProtoMessage() {}
|
|
|
|
func (*CreateRequest) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{9}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *CreateRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_CreateRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_CreateRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *CreateRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_CreateRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *CreateRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_CreateRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *CreateRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_CreateRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_CreateRequest proto.InternalMessageInfo
|
2017-02-10 17:08:06 +00:00
|
|
|
|
2017-08-31 20:10:55 +00:00
|
|
|
func (m *CreateRequest) GetUrn() string {
|
2017-02-10 17:08:06 +00:00
|
|
|
if m != nil {
|
2017-08-31 20:10:55 +00:00
|
|
|
return m.Urn
|
2017-02-10 17:08:06 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *CreateRequest) GetProperties() *_struct.Struct {
|
2017-02-10 17:08:06 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type CreateResponse struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
|
|
|
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2017-02-10 17:08:06 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *CreateResponse) Reset() { *m = CreateResponse{} }
|
|
|
|
func (m *CreateResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*CreateResponse) ProtoMessage() {}
|
|
|
|
func (*CreateResponse) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{10}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *CreateResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_CreateResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_CreateResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *CreateResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_CreateResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *CreateResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_CreateResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *CreateResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_CreateResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_CreateResponse proto.InternalMessageInfo
|
2017-02-10 17:08:06 +00:00
|
|
|
|
|
|
|
func (m *CreateResponse) GetId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *CreateResponse) GetProperties() *_struct.Struct {
|
2017-07-18 01:44:45 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-04-05 14:00:16 +00:00
|
|
|
type ReadRequest struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
|
|
|
Urn string `protobuf:"bytes,2,opt,name=urn" json:"urn,omitempty"`
|
|
|
|
Properties *_struct.Struct `protobuf:"bytes,3,opt,name=properties" json:"properties,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *ReadRequest) Reset() { *m = ReadRequest{} }
|
|
|
|
func (m *ReadRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ReadRequest) ProtoMessage() {}
|
|
|
|
func (*ReadRequest) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{11}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *ReadRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ReadRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ReadRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *ReadRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ReadRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *ReadRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ReadRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ReadRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ReadRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ReadRequest proto.InternalMessageInfo
|
2018-04-05 14:00:16 +00:00
|
|
|
|
|
|
|
func (m *ReadRequest) GetId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ReadRequest) GetUrn() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Urn
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *ReadRequest) GetProperties() *_struct.Struct {
|
2018-04-05 14:00:16 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type ReadResponse struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
|
|
|
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *ReadResponse) Reset() { *m = ReadResponse{} }
|
|
|
|
func (m *ReadResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ReadResponse) ProtoMessage() {}
|
|
|
|
func (*ReadResponse) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{12}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *ReadResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ReadResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ReadResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *ReadResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ReadResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *ReadResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ReadResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ReadResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ReadResponse.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ReadResponse proto.InternalMessageInfo
|
2018-04-05 14:00:16 +00:00
|
|
|
|
2018-04-10 19:58:50 +00:00
|
|
|
func (m *ReadResponse) GetId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *ReadResponse) GetProperties() *_struct.Struct {
|
2018-04-05 14:00:16 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
Initial support for output properties (1 of 3)
This change includes approximately 1/3rd of the change necessary
to support output properties, as per pulumi/lumi#90.
In short, the runtime now has a new hidden type, Latent<T>, which
represents a "speculative" value, whose eventual type will be T,
that we can use during evaluation in various ways. Namely,
operations against Latent<T>s generally produce new Latent<U>s.
During planning, any Latent<T>s that end up in resource properties
are transformed into "unknown" property values. An unknown property
value is legal only during planning-time activities, such as Check,
Name, and InspectChange. As a result, those RPC interfaces have
been updated to include lookaside maps indicating which properties
have unknown values. My intent is to add some helper functions to
make dealing with this circumstance more correct-by-construction.
For now, using an unresolved Latent<T> in a conditional will lead
to an error. See pulumi/lumi#67. Speculating beyond these -- by
supporting iterative planning and application -- is something we
want to support eventually, but it makes sense to do that as an
additive change beyond this initial support. That is a missing 1/3.
Finally, the other missing 1/3rd which will happen much sooner
than the rest is restructuing plan application so that it will
correctly observe resolution of Latent<T> values. Right now, the
evaluation happens in one single pass, prior to the application, and
so Latent<T>s never actually get witnessed in a resolved state.
2017-05-24 00:32:59 +00:00
|
|
|
type UpdateRequest struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
|
|
|
Urn string `protobuf:"bytes,2,opt,name=urn" json:"urn,omitempty"`
|
|
|
|
Olds *_struct.Struct `protobuf:"bytes,3,opt,name=olds" json:"olds,omitempty"`
|
|
|
|
News *_struct.Struct `protobuf:"bytes,4,opt,name=news" json:"news,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *UpdateRequest) Reset() { *m = UpdateRequest{} }
|
|
|
|
func (m *UpdateRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*UpdateRequest) ProtoMessage() {}
|
|
|
|
func (*UpdateRequest) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{13}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *UpdateRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_UpdateRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *UpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_UpdateRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *UpdateRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_UpdateRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *UpdateRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_UpdateRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *UpdateRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_UpdateRequest.DiscardUnknown(m)
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
var xxx_messageInfo_UpdateRequest proto.InternalMessageInfo
|
Initial support for output properties (1 of 3)
This change includes approximately 1/3rd of the change necessary
to support output properties, as per pulumi/lumi#90.
In short, the runtime now has a new hidden type, Latent<T>, which
represents a "speculative" value, whose eventual type will be T,
that we can use during evaluation in various ways. Namely,
operations against Latent<T>s generally produce new Latent<U>s.
During planning, any Latent<T>s that end up in resource properties
are transformed into "unknown" property values. An unknown property
value is legal only during planning-time activities, such as Check,
Name, and InspectChange. As a result, those RPC interfaces have
been updated to include lookaside maps indicating which properties
have unknown values. My intent is to add some helper functions to
make dealing with this circumstance more correct-by-construction.
For now, using an unresolved Latent<T> in a conditional will lead
to an error. See pulumi/lumi#67. Speculating beyond these -- by
supporting iterative planning and application -- is something we
want to support eventually, but it makes sense to do that as an
additive change beyond this initial support. That is a missing 1/3.
Finally, the other missing 1/3rd which will happen much sooner
than the rest is restructuing plan application so that it will
correctly observe resolution of Latent<T> values. Right now, the
evaluation happens in one single pass, prior to the application, and
so Latent<T>s never actually get witnessed in a resolved state.
2017-05-24 00:32:59 +00:00
|
|
|
|
|
|
|
func (m *UpdateRequest) GetId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2017-08-31 20:10:55 +00:00
|
|
|
func (m *UpdateRequest) GetUrn() string {
|
Initial support for output properties (1 of 3)
This change includes approximately 1/3rd of the change necessary
to support output properties, as per pulumi/lumi#90.
In short, the runtime now has a new hidden type, Latent<T>, which
represents a "speculative" value, whose eventual type will be T,
that we can use during evaluation in various ways. Namely,
operations against Latent<T>s generally produce new Latent<U>s.
During planning, any Latent<T>s that end up in resource properties
are transformed into "unknown" property values. An unknown property
value is legal only during planning-time activities, such as Check,
Name, and InspectChange. As a result, those RPC interfaces have
been updated to include lookaside maps indicating which properties
have unknown values. My intent is to add some helper functions to
make dealing with this circumstance more correct-by-construction.
For now, using an unresolved Latent<T> in a conditional will lead
to an error. See pulumi/lumi#67. Speculating beyond these -- by
supporting iterative planning and application -- is something we
want to support eventually, but it makes sense to do that as an
additive change beyond this initial support. That is a missing 1/3.
Finally, the other missing 1/3rd which will happen much sooner
than the rest is restructuing plan application so that it will
correctly observe resolution of Latent<T> values. Right now, the
evaluation happens in one single pass, prior to the application, and
so Latent<T>s never actually get witnessed in a resolved state.
2017-05-24 00:32:59 +00:00
|
|
|
if m != nil {
|
2017-08-31 20:10:55 +00:00
|
|
|
return m.Urn
|
Initial support for output properties (1 of 3)
This change includes approximately 1/3rd of the change necessary
to support output properties, as per pulumi/lumi#90.
In short, the runtime now has a new hidden type, Latent<T>, which
represents a "speculative" value, whose eventual type will be T,
that we can use during evaluation in various ways. Namely,
operations against Latent<T>s generally produce new Latent<U>s.
During planning, any Latent<T>s that end up in resource properties
are transformed into "unknown" property values. An unknown property
value is legal only during planning-time activities, such as Check,
Name, and InspectChange. As a result, those RPC interfaces have
been updated to include lookaside maps indicating which properties
have unknown values. My intent is to add some helper functions to
make dealing with this circumstance more correct-by-construction.
For now, using an unresolved Latent<T> in a conditional will lead
to an error. See pulumi/lumi#67. Speculating beyond these -- by
supporting iterative planning and application -- is something we
want to support eventually, but it makes sense to do that as an
additive change beyond this initial support. That is a missing 1/3.
Finally, the other missing 1/3rd which will happen much sooner
than the rest is restructuing plan application so that it will
correctly observe resolution of Latent<T> values. Right now, the
evaluation happens in one single pass, prior to the application, and
so Latent<T>s never actually get witnessed in a resolved state.
2017-05-24 00:32:59 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *UpdateRequest) GetOlds() *_struct.Struct {
|
Initial support for output properties (1 of 3)
This change includes approximately 1/3rd of the change necessary
to support output properties, as per pulumi/lumi#90.
In short, the runtime now has a new hidden type, Latent<T>, which
represents a "speculative" value, whose eventual type will be T,
that we can use during evaluation in various ways. Namely,
operations against Latent<T>s generally produce new Latent<U>s.
During planning, any Latent<T>s that end up in resource properties
are transformed into "unknown" property values. An unknown property
value is legal only during planning-time activities, such as Check,
Name, and InspectChange. As a result, those RPC interfaces have
been updated to include lookaside maps indicating which properties
have unknown values. My intent is to add some helper functions to
make dealing with this circumstance more correct-by-construction.
For now, using an unresolved Latent<T> in a conditional will lead
to an error. See pulumi/lumi#67. Speculating beyond these -- by
supporting iterative planning and application -- is something we
want to support eventually, but it makes sense to do that as an
additive change beyond this initial support. That is a missing 1/3.
Finally, the other missing 1/3rd which will happen much sooner
than the rest is restructuing plan application so that it will
correctly observe resolution of Latent<T> values. Right now, the
evaluation happens in one single pass, prior to the application, and
so Latent<T>s never actually get witnessed in a resolved state.
2017-05-24 00:32:59 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Olds
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *UpdateRequest) GetNews() *_struct.Struct {
|
Initial support for output properties (1 of 3)
This change includes approximately 1/3rd of the change necessary
to support output properties, as per pulumi/lumi#90.
In short, the runtime now has a new hidden type, Latent<T>, which
represents a "speculative" value, whose eventual type will be T,
that we can use during evaluation in various ways. Namely,
operations against Latent<T>s generally produce new Latent<U>s.
During planning, any Latent<T>s that end up in resource properties
are transformed into "unknown" property values. An unknown property
value is legal only during planning-time activities, such as Check,
Name, and InspectChange. As a result, those RPC interfaces have
been updated to include lookaside maps indicating which properties
have unknown values. My intent is to add some helper functions to
make dealing with this circumstance more correct-by-construction.
For now, using an unresolved Latent<T> in a conditional will lead
to an error. See pulumi/lumi#67. Speculating beyond these -- by
supporting iterative planning and application -- is something we
want to support eventually, but it makes sense to do that as an
additive change beyond this initial support. That is a missing 1/3.
Finally, the other missing 1/3rd which will happen much sooner
than the rest is restructuing plan application so that it will
correctly observe resolution of Latent<T> values. Right now, the
evaluation happens in one single pass, prior to the application, and
so Latent<T>s never actually get witnessed in a resolved state.
2017-05-24 00:32:59 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.News
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-07-18 01:44:45 +00:00
|
|
|
type UpdateResponse struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Properties *_struct.Struct `protobuf:"bytes,1,opt,name=properties" json:"properties,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *UpdateResponse) Reset() { *m = UpdateResponse{} }
|
|
|
|
func (m *UpdateResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*UpdateResponse) ProtoMessage() {}
|
|
|
|
func (*UpdateResponse) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{14}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *UpdateResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_UpdateResponse.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *UpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_UpdateResponse.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *UpdateResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_UpdateResponse.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *UpdateResponse) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_UpdateResponse.Size(m)
|
|
|
|
}
|
|
|
|
func (m *UpdateResponse) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_UpdateResponse.DiscardUnknown(m)
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
2017-07-18 01:44:45 +00:00
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
var xxx_messageInfo_UpdateResponse proto.InternalMessageInfo
|
2018-06-27 23:08:21 +00:00
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *UpdateResponse) GetProperties() *_struct.Struct {
|
2017-07-18 01:44:45 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-02-10 17:08:06 +00:00
|
|
|
type DeleteRequest struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
|
|
|
Urn string `protobuf:"bytes,2,opt,name=urn" json:"urn,omitempty"`
|
|
|
|
Properties *_struct.Struct `protobuf:"bytes,3,opt,name=properties" json:"properties,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
|
|
|
|
func (m *DeleteRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DeleteRequest) ProtoMessage() {}
|
|
|
|
func (*DeleteRequest) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{15}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_DeleteRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *DeleteRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_DeleteRequest.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *DeleteRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_DeleteRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *DeleteRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_DeleteRequest.DiscardUnknown(m)
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo
|
2017-02-10 17:08:06 +00:00
|
|
|
|
|
|
|
func (m *DeleteRequest) GetId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2017-08-31 20:10:55 +00:00
|
|
|
func (m *DeleteRequest) GetUrn() string {
|
Implement resource provider plugins
This change adds basic support for discovering, loading, binding to,
and invoking RPC methods on, resource provider plugins.
In a nutshell, we add a new context object that will share cached
state such as loaded plugins and connections to them. It will be
a policy decision in server scenarios how much state to share and
between whom. This context also controls per-resource context
allocation, which in the future will allow us to perform structured
cancellation and teardown amongst entire groups of requests.
Plugins are loaded based on their name, and can be found in one of
two ways: either simply by having them on your path (with a name of
"mu-ressrv-<pkg>", where "<pkg>" is the resource package name with
any "/"s replaced with "_"s); or by placing them in the standard
library installation location, which need not be on the path for this
to work (since we know precisely where to look).
If we find a protocol, we will load it as a child process.
The protocol for plugins is that they will choose a port on their
own -- to eliminate races that'd be involved should Mu attempt to
pre-pick one for them -- and then write that out as the first line
to STDOUT (terminated by a "\n"). This is the only STDERR/STDOUT
that Mu cares about; from there, the plugin is free to write all it
pleases (e.g., for logging, debugging purposes, etc).
Afterwards, we then bind our gRPC connection to that port, and create
a typed resource provider client. The CRUD operations that get driven
by plan application are then simple wrappers atop the underlying gRPC
calls. For now, we interpret all errors as catastrophic; in the near
future, we will probably want to introduce a "structured error"
mechanism in the gRPC interface for "transactional errors"; that is,
errors for which the server was able to recover to a safe checkpoint,
which can be interpreted as ResourceOK rather than ResourceUnknown.
2017-02-19 19:08:06 +00:00
|
|
|
if m != nil {
|
2017-08-31 20:10:55 +00:00
|
|
|
return m.Urn
|
Implement resource provider plugins
This change adds basic support for discovering, loading, binding to,
and invoking RPC methods on, resource provider plugins.
In a nutshell, we add a new context object that will share cached
state such as loaded plugins and connections to them. It will be
a policy decision in server scenarios how much state to share and
between whom. This context also controls per-resource context
allocation, which in the future will allow us to perform structured
cancellation and teardown amongst entire groups of requests.
Plugins are loaded based on their name, and can be found in one of
two ways: either simply by having them on your path (with a name of
"mu-ressrv-<pkg>", where "<pkg>" is the resource package name with
any "/"s replaced with "_"s); or by placing them in the standard
library installation location, which need not be on the path for this
to work (since we know precisely where to look).
If we find a protocol, we will load it as a child process.
The protocol for plugins is that they will choose a port on their
own -- to eliminate races that'd be involved should Mu attempt to
pre-pick one for them -- and then write that out as the first line
to STDOUT (terminated by a "\n"). This is the only STDERR/STDOUT
that Mu cares about; from there, the plugin is free to write all it
pleases (e.g., for logging, debugging purposes, etc).
Afterwards, we then bind our gRPC connection to that port, and create
a typed resource provider client. The CRUD operations that get driven
by plan application are then simple wrappers atop the underlying gRPC
calls. For now, we interpret all errors as catastrophic; in the near
future, we will probably want to introduce a "structured error"
mechanism in the gRPC interface for "transactional errors"; that is,
errors for which the server was able to recover to a safe checkpoint,
which can be interpreted as ResourceOK rather than ResourceUnknown.
2017-02-19 19:08:06 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *DeleteRequest) GetProperties() *_struct.Struct {
|
2017-07-19 14:57:22 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-06-27 23:08:21 +00:00
|
|
|
// ErrorResourceInitFailed is sent as a Detail `ResourceProvider.{Create, Update}` fail because a
|
|
|
|
// resource was created successfully, but failed to initialize.
|
|
|
|
type ErrorResourceInitFailed struct {
|
2018-07-12 01:07:50 +00:00
|
|
|
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
|
|
|
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
|
|
|
|
Reasons []string `protobuf:"bytes,3,rep,name=reasons" json:"reasons,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-06-27 23:08:21 +00:00
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *ErrorResourceInitFailed) Reset() { *m = ErrorResourceInitFailed{} }
|
|
|
|
func (m *ErrorResourceInitFailed) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ErrorResourceInitFailed) ProtoMessage() {}
|
|
|
|
func (*ErrorResourceInitFailed) Descriptor() ([]byte, []int) {
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
return fileDescriptor_provider_5951afc12b1894bc, []int{16}
|
2018-07-12 01:07:50 +00:00
|
|
|
}
|
|
|
|
func (m *ErrorResourceInitFailed) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ErrorResourceInitFailed.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ErrorResourceInitFailed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ErrorResourceInitFailed.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (dst *ErrorResourceInitFailed) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ErrorResourceInitFailed.Merge(dst, src)
|
|
|
|
}
|
|
|
|
func (m *ErrorResourceInitFailed) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ErrorResourceInitFailed.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ErrorResourceInitFailed) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ErrorResourceInitFailed.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ErrorResourceInitFailed proto.InternalMessageInfo
|
2018-06-27 23:08:21 +00:00
|
|
|
|
|
|
|
func (m *ErrorResourceInitFailed) GetId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (m *ErrorResourceInitFailed) GetProperties() *_struct.Struct {
|
2018-06-27 23:08:21 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ErrorResourceInitFailed) GetReasons() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Reasons
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-02-10 17:08:06 +00:00
|
|
|
func init() {
|
2017-09-22 02:18:21 +00:00
|
|
|
proto.RegisterType((*ConfigureRequest)(nil), "pulumirpc.ConfigureRequest")
|
2018-07-12 01:07:50 +00:00
|
|
|
proto.RegisterMapType((map[string]string)(nil), "pulumirpc.ConfigureRequest.VariablesEntry")
|
2018-04-04 17:08:17 +00:00
|
|
|
proto.RegisterType((*ConfigureErrorMissingKeys)(nil), "pulumirpc.ConfigureErrorMissingKeys")
|
|
|
|
proto.RegisterType((*ConfigureErrorMissingKeys_MissingKey)(nil), "pulumirpc.ConfigureErrorMissingKeys.MissingKey")
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
proto.RegisterType((*InvokeRequest)(nil), "pulumirpc.InvokeRequest")
|
|
|
|
proto.RegisterType((*InvokeResponse)(nil), "pulumirpc.InvokeResponse")
|
2017-09-22 02:18:21 +00:00
|
|
|
proto.RegisterType((*CheckRequest)(nil), "pulumirpc.CheckRequest")
|
|
|
|
proto.RegisterType((*CheckResponse)(nil), "pulumirpc.CheckResponse")
|
|
|
|
proto.RegisterType((*CheckFailure)(nil), "pulumirpc.CheckFailure")
|
|
|
|
proto.RegisterType((*DiffRequest)(nil), "pulumirpc.DiffRequest")
|
|
|
|
proto.RegisterType((*DiffResponse)(nil), "pulumirpc.DiffResponse")
|
|
|
|
proto.RegisterType((*CreateRequest)(nil), "pulumirpc.CreateRequest")
|
|
|
|
proto.RegisterType((*CreateResponse)(nil), "pulumirpc.CreateResponse")
|
2018-04-05 14:00:16 +00:00
|
|
|
proto.RegisterType((*ReadRequest)(nil), "pulumirpc.ReadRequest")
|
|
|
|
proto.RegisterType((*ReadResponse)(nil), "pulumirpc.ReadResponse")
|
2017-09-22 02:18:21 +00:00
|
|
|
proto.RegisterType((*UpdateRequest)(nil), "pulumirpc.UpdateRequest")
|
|
|
|
proto.RegisterType((*UpdateResponse)(nil), "pulumirpc.UpdateResponse")
|
|
|
|
proto.RegisterType((*DeleteRequest)(nil), "pulumirpc.DeleteRequest")
|
2018-06-27 23:08:21 +00:00
|
|
|
proto.RegisterType((*ErrorResourceInitFailed)(nil), "pulumirpc.ErrorResourceInitFailed")
|
2018-04-05 14:00:16 +00:00
|
|
|
proto.RegisterEnum("pulumirpc.DiffResponse_DiffChanges", DiffResponse_DiffChanges_name, DiffResponse_DiffChanges_value)
|
2017-02-10 17:08:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ context.Context
|
|
|
|
var _ grpc.ClientConn
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
|
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
|
2018-06-29 23:14:49 +00:00
|
|
|
// Client API for ResourceProvider service
|
|
|
|
|
2017-02-10 17:08:06 +00:00
|
|
|
type ResourceProviderClient interface {
|
2017-08-31 21:31:33 +00:00
|
|
|
// Configure configures the resource provider with "globals" that control its behavior.
|
2018-07-12 01:07:50 +00:00
|
|
|
Configure(ctx context.Context, in *ConfigureRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
// Invoke dynamically executes a built-in function in the provider.
|
|
|
|
Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error)
|
2017-12-10 16:37:22 +00:00
|
|
|
// Check validates that the given property bag is valid for a resource of the given type and returns the inputs
|
|
|
|
// that should be passed to successive calls to Diff, Create, or Update for this resource. As a rule, the provider
|
|
|
|
// inputs returned by a call to Check should preserve the original representation of the properties as present in
|
|
|
|
// the program inputs. Though this rule is not required for correctness, violations thereof can negatively impact
|
|
|
|
// the end-user experience, as the provider inputs are using for detecting and rendering diffs.
|
2017-08-01 01:26:15 +00:00
|
|
|
Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
|
|
|
|
// Diff checks what impacts a hypothetical update will have on the resource's properties.
|
|
|
|
Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error)
|
2017-02-10 17:08:06 +00:00
|
|
|
// Create allocates a new instance of the provided resource and returns its unique ID afterwards. (The input ID
|
|
|
|
// must be blank.) If this call fails, the resource must not have been created (i.e., it is "transacational").
|
|
|
|
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
|
2018-04-05 14:00:16 +00:00
|
|
|
// Read the current live state associated with a resource. Enough state must be include in the inputs to uniquely
|
|
|
|
// identify the resource; this is typically just the resource ID, but may also include some properties.
|
|
|
|
Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
|
2017-03-02 17:52:08 +00:00
|
|
|
// Update updates an existing resource with new values.
|
2017-07-18 01:44:45 +00:00
|
|
|
Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
|
2017-02-10 17:08:06 +00:00
|
|
|
// Delete tears down an existing resource with the given ID. If it fails, the resource is assumed to still exist.
|
2018-07-12 01:07:50 +00:00
|
|
|
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
|
|
|
// Cancel signals the provider to abort all outstanding resource operations.
|
|
|
|
Cancel(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
|
2017-12-01 21:50:32 +00:00
|
|
|
// GetPluginInfo returns generic information about this plugin, like its version.
|
2018-07-12 01:07:50 +00:00
|
|
|
GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error)
|
2017-02-10 17:08:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type resourceProviderClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewResourceProviderClient(cc *grpc.ClientConn) ResourceProviderClient {
|
|
|
|
return &resourceProviderClient{cc}
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (c *resourceProviderClient) Configure(ctx context.Context, in *ConfigureRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
|
|
|
|
out := new(empty.Empty)
|
2018-06-29 23:14:49 +00:00
|
|
|
err := grpc.Invoke(ctx, "/pulumirpc.ResourceProvider/Configure", in, out, c.cc, opts...)
|
2017-08-31 21:31:33 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
func (c *resourceProviderClient) Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error) {
|
|
|
|
out := new(InvokeResponse)
|
2018-06-29 23:14:49 +00:00
|
|
|
err := grpc.Invoke(ctx, "/pulumirpc.ResourceProvider/Invoke", in, out, c.cc, opts...)
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2017-03-03 02:15:38 +00:00
|
|
|
func (c *resourceProviderClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) {
|
|
|
|
out := new(CheckResponse)
|
2018-06-29 23:14:49 +00:00
|
|
|
err := grpc.Invoke(ctx, "/pulumirpc.ResourceProvider/Check", in, out, c.cc, opts...)
|
2017-03-03 02:15:38 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2017-08-01 01:26:15 +00:00
|
|
|
func (c *resourceProviderClient) Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error) {
|
|
|
|
out := new(DiffResponse)
|
2018-06-29 23:14:49 +00:00
|
|
|
err := grpc.Invoke(ctx, "/pulumirpc.ResourceProvider/Diff", in, out, c.cc, opts...)
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2017-02-10 17:08:06 +00:00
|
|
|
func (c *resourceProviderClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) {
|
|
|
|
out := new(CreateResponse)
|
2018-06-29 23:14:49 +00:00
|
|
|
err := grpc.Invoke(ctx, "/pulumirpc.ResourceProvider/Create", in, out, c.cc, opts...)
|
2017-02-10 17:08:06 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-04-05 14:00:16 +00:00
|
|
|
func (c *resourceProviderClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) {
|
|
|
|
out := new(ReadResponse)
|
2018-06-29 23:14:49 +00:00
|
|
|
err := grpc.Invoke(ctx, "/pulumirpc.ResourceProvider/Read", in, out, c.cc, opts...)
|
2018-04-05 14:00:16 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2017-07-18 01:44:45 +00:00
|
|
|
func (c *resourceProviderClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) {
|
|
|
|
out := new(UpdateResponse)
|
2018-06-29 23:14:49 +00:00
|
|
|
err := grpc.Invoke(ctx, "/pulumirpc.ResourceProvider/Update", in, out, c.cc, opts...)
|
Support replacement IDs
This change introduces a new RPC function to the provider interface;
in pseudo-code:
UpdateImpact(id ID, t Type, olds PropertyMap, news PropertyMap)
(bool, PropertyMap, error)
Essentially, during the planning phase, we will consult each provider
about the nature of a proposed update. This update includes a set of
old properties and the new ones and, if the resource provider will need
to replace the property as a result of the update, it will return true;
in general, the PropertyMap will eventually contain a list of all
properties that will be modified as a result of the operation (see below).
The planning phase reacts to this by propagating the change to dependent
resources, so that they know that the ID will change (and so that they
can recalculate their own state accordingly, possibly leading to a ripple
effect). This ensures the overall DAG / schedule is ordered correctly.
This change is most of pulumi/coconut#105. The only missing piece
is to generalize replacing the "ID" property with replacing arbitrary
properties; there are hooks in here for this, but until pulumi/coconut#90
is addressed, it doesn't make sense to make much progress on this.
2017-03-01 17:08:53 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (c *resourceProviderClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
|
|
|
|
out := new(empty.Empty)
|
2018-06-29 23:14:49 +00:00
|
|
|
err := grpc.Invoke(ctx, "/pulumirpc.ResourceProvider/Delete", in, out, c.cc, opts...)
|
2017-02-10 17:08:06 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func (c *resourceProviderClient) Cancel(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
|
|
|
|
out := new(empty.Empty)
|
|
|
|
err := grpc.Invoke(ctx, "/pulumirpc.ResourceProvider/Cancel", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *resourceProviderClient) GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error) {
|
2017-12-01 21:50:32 +00:00
|
|
|
out := new(PluginInfo)
|
2018-06-29 23:14:49 +00:00
|
|
|
err := grpc.Invoke(ctx, "/pulumirpc.ResourceProvider/GetPluginInfo", in, out, c.cc, opts...)
|
2017-12-01 21:50:32 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-06-29 23:14:49 +00:00
|
|
|
// Server API for ResourceProvider service
|
|
|
|
|
2017-02-10 17:08:06 +00:00
|
|
|
type ResourceProviderServer interface {
|
2017-08-31 21:31:33 +00:00
|
|
|
// Configure configures the resource provider with "globals" that control its behavior.
|
2018-07-12 01:07:50 +00:00
|
|
|
Configure(context.Context, *ConfigureRequest) (*empty.Empty, error)
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
// Invoke dynamically executes a built-in function in the provider.
|
|
|
|
Invoke(context.Context, *InvokeRequest) (*InvokeResponse, error)
|
2017-12-10 16:37:22 +00:00
|
|
|
// Check validates that the given property bag is valid for a resource of the given type and returns the inputs
|
|
|
|
// that should be passed to successive calls to Diff, Create, or Update for this resource. As a rule, the provider
|
|
|
|
// inputs returned by a call to Check should preserve the original representation of the properties as present in
|
|
|
|
// the program inputs. Though this rule is not required for correctness, violations thereof can negatively impact
|
|
|
|
// the end-user experience, as the provider inputs are using for detecting and rendering diffs.
|
2017-08-01 01:26:15 +00:00
|
|
|
Check(context.Context, *CheckRequest) (*CheckResponse, error)
|
|
|
|
// Diff checks what impacts a hypothetical update will have on the resource's properties.
|
|
|
|
Diff(context.Context, *DiffRequest) (*DiffResponse, error)
|
2017-02-10 17:08:06 +00:00
|
|
|
// Create allocates a new instance of the provided resource and returns its unique ID afterwards. (The input ID
|
|
|
|
// must be blank.) If this call fails, the resource must not have been created (i.e., it is "transacational").
|
|
|
|
Create(context.Context, *CreateRequest) (*CreateResponse, error)
|
2018-04-05 14:00:16 +00:00
|
|
|
// Read the current live state associated with a resource. Enough state must be include in the inputs to uniquely
|
|
|
|
// identify the resource; this is typically just the resource ID, but may also include some properties.
|
|
|
|
Read(context.Context, *ReadRequest) (*ReadResponse, error)
|
2017-03-02 17:52:08 +00:00
|
|
|
// Update updates an existing resource with new values.
|
2017-07-18 01:44:45 +00:00
|
|
|
Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
|
2017-02-10 17:08:06 +00:00
|
|
|
// Delete tears down an existing resource with the given ID. If it fails, the resource is assumed to still exist.
|
2018-07-12 01:07:50 +00:00
|
|
|
Delete(context.Context, *DeleteRequest) (*empty.Empty, error)
|
|
|
|
// Cancel signals the provider to abort all outstanding resource operations.
|
|
|
|
Cancel(context.Context, *empty.Empty) (*empty.Empty, error)
|
2017-12-01 21:50:32 +00:00
|
|
|
// GetPluginInfo returns generic information about this plugin, like its version.
|
2018-07-12 01:07:50 +00:00
|
|
|
GetPluginInfo(context.Context, *empty.Empty) (*PluginInfo, error)
|
2017-02-10 17:08:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterResourceProviderServer(s *grpc.Server, srv ResourceProviderServer) {
|
|
|
|
s.RegisterService(&_ResourceProvider_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
2017-08-31 21:31:33 +00:00
|
|
|
func _ResourceProvider_Configure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(ConfigureRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ResourceProviderServer).Configure(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2017-09-22 02:18:21 +00:00
|
|
|
FullMethod: "/pulumirpc.ResourceProvider/Configure",
|
2017-08-31 21:31:33 +00:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ResourceProviderServer).Configure(ctx, req.(*ConfigureRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
func _ResourceProvider_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(InvokeRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ResourceProviderServer).Invoke(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/pulumirpc.ResourceProvider/Invoke",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ResourceProviderServer).Invoke(ctx, req.(*InvokeRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-03-03 02:15:38 +00:00
|
|
|
func _ResourceProvider_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(CheckRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ResourceProviderServer).Check(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2017-09-22 02:18:21 +00:00
|
|
|
FullMethod: "/pulumirpc.ResourceProvider/Check",
|
2017-03-03 02:15:38 +00:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ResourceProviderServer).Check(ctx, req.(*CheckRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-08-01 01:26:15 +00:00
|
|
|
func _ResourceProvider_Diff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(DiffRequest)
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
2017-08-01 01:26:15 +00:00
|
|
|
return srv.(ResourceProviderServer).Diff(ctx, in)
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2017-09-22 02:18:21 +00:00
|
|
|
FullMethod: "/pulumirpc.ResourceProvider/Diff",
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
2017-08-01 01:26:15 +00:00
|
|
|
return srv.(ResourceProviderServer).Diff(ctx, req.(*DiffRequest))
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-02-10 17:08:06 +00:00
|
|
|
func _ResourceProvider_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(CreateRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ResourceProviderServer).Create(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2017-09-22 02:18:21 +00:00
|
|
|
FullMethod: "/pulumirpc.ResourceProvider/Create",
|
2017-02-10 17:08:06 +00:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ResourceProviderServer).Create(ctx, req.(*CreateRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-04-05 14:00:16 +00:00
|
|
|
func _ResourceProvider_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(ReadRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ResourceProviderServer).Read(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/pulumirpc.ResourceProvider/Read",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ResourceProviderServer).Read(ctx, req.(*ReadRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-04-20 21:09:00 +00:00
|
|
|
func _ResourceProvider_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
Initial support for output properties (1 of 3)
This change includes approximately 1/3rd of the change necessary
to support output properties, as per pulumi/lumi#90.
In short, the runtime now has a new hidden type, Latent<T>, which
represents a "speculative" value, whose eventual type will be T,
that we can use during evaluation in various ways. Namely,
operations against Latent<T>s generally produce new Latent<U>s.
During planning, any Latent<T>s that end up in resource properties
are transformed into "unknown" property values. An unknown property
value is legal only during planning-time activities, such as Check,
Name, and InspectChange. As a result, those RPC interfaces have
been updated to include lookaside maps indicating which properties
have unknown values. My intent is to add some helper functions to
make dealing with this circumstance more correct-by-construction.
For now, using an unresolved Latent<T> in a conditional will lead
to an error. See pulumi/lumi#67. Speculating beyond these -- by
supporting iterative planning and application -- is something we
want to support eventually, but it makes sense to do that as an
additive change beyond this initial support. That is a missing 1/3.
Finally, the other missing 1/3rd which will happen much sooner
than the rest is restructuing plan application so that it will
correctly observe resolution of Latent<T> values. Right now, the
evaluation happens in one single pass, prior to the application, and
so Latent<T>s never actually get witnessed in a resolved state.
2017-05-24 00:32:59 +00:00
|
|
|
in := new(UpdateRequest)
|
Support replacement IDs
This change introduces a new RPC function to the provider interface;
in pseudo-code:
UpdateImpact(id ID, t Type, olds PropertyMap, news PropertyMap)
(bool, PropertyMap, error)
Essentially, during the planning phase, we will consult each provider
about the nature of a proposed update. This update includes a set of
old properties and the new ones and, if the resource provider will need
to replace the property as a result of the update, it will return true;
in general, the PropertyMap will eventually contain a list of all
properties that will be modified as a result of the operation (see below).
The planning phase reacts to this by propagating the change to dependent
resources, so that they know that the ID will change (and so that they
can recalculate their own state accordingly, possibly leading to a ripple
effect). This ensures the overall DAG / schedule is ordered correctly.
This change is most of pulumi/coconut#105. The only missing piece
is to generalize replacing the "ID" property with replacing arbitrary
properties; there are hooks in here for this, but until pulumi/coconut#90
is addressed, it doesn't make sense to make much progress on this.
2017-03-01 17:08:53 +00:00
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
2017-04-20 21:09:00 +00:00
|
|
|
return srv.(ResourceProviderServer).Update(ctx, in)
|
Support replacement IDs
This change introduces a new RPC function to the provider interface;
in pseudo-code:
UpdateImpact(id ID, t Type, olds PropertyMap, news PropertyMap)
(bool, PropertyMap, error)
Essentially, during the planning phase, we will consult each provider
about the nature of a proposed update. This update includes a set of
old properties and the new ones and, if the resource provider will need
to replace the property as a result of the update, it will return true;
in general, the PropertyMap will eventually contain a list of all
properties that will be modified as a result of the operation (see below).
The planning phase reacts to this by propagating the change to dependent
resources, so that they know that the ID will change (and so that they
can recalculate their own state accordingly, possibly leading to a ripple
effect). This ensures the overall DAG / schedule is ordered correctly.
This change is most of pulumi/coconut#105. The only missing piece
is to generalize replacing the "ID" property with replacing arbitrary
properties; there are hooks in here for this, but until pulumi/coconut#90
is addressed, it doesn't make sense to make much progress on this.
2017-03-01 17:08:53 +00:00
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2017-09-22 02:18:21 +00:00
|
|
|
FullMethod: "/pulumirpc.ResourceProvider/Update",
|
Support replacement IDs
This change introduces a new RPC function to the provider interface;
in pseudo-code:
UpdateImpact(id ID, t Type, olds PropertyMap, news PropertyMap)
(bool, PropertyMap, error)
Essentially, during the planning phase, we will consult each provider
about the nature of a proposed update. This update includes a set of
old properties and the new ones and, if the resource provider will need
to replace the property as a result of the update, it will return true;
in general, the PropertyMap will eventually contain a list of all
properties that will be modified as a result of the operation (see below).
The planning phase reacts to this by propagating the change to dependent
resources, so that they know that the ID will change (and so that they
can recalculate their own state accordingly, possibly leading to a ripple
effect). This ensures the overall DAG / schedule is ordered correctly.
This change is most of pulumi/coconut#105. The only missing piece
is to generalize replacing the "ID" property with replacing arbitrary
properties; there are hooks in here for this, but until pulumi/coconut#90
is addressed, it doesn't make sense to make much progress on this.
2017-03-01 17:08:53 +00:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
Initial support for output properties (1 of 3)
This change includes approximately 1/3rd of the change necessary
to support output properties, as per pulumi/lumi#90.
In short, the runtime now has a new hidden type, Latent<T>, which
represents a "speculative" value, whose eventual type will be T,
that we can use during evaluation in various ways. Namely,
operations against Latent<T>s generally produce new Latent<U>s.
During planning, any Latent<T>s that end up in resource properties
are transformed into "unknown" property values. An unknown property
value is legal only during planning-time activities, such as Check,
Name, and InspectChange. As a result, those RPC interfaces have
been updated to include lookaside maps indicating which properties
have unknown values. My intent is to add some helper functions to
make dealing with this circumstance more correct-by-construction.
For now, using an unresolved Latent<T> in a conditional will lead
to an error. See pulumi/lumi#67. Speculating beyond these -- by
supporting iterative planning and application -- is something we
want to support eventually, but it makes sense to do that as an
additive change beyond this initial support. That is a missing 1/3.
Finally, the other missing 1/3rd which will happen much sooner
than the rest is restructuing plan application so that it will
correctly observe resolution of Latent<T> values. Right now, the
evaluation happens in one single pass, prior to the application, and
so Latent<T>s never actually get witnessed in a resolved state.
2017-05-24 00:32:59 +00:00
|
|
|
return srv.(ResourceProviderServer).Update(ctx, req.(*UpdateRequest))
|
Support replacement IDs
This change introduces a new RPC function to the provider interface;
in pseudo-code:
UpdateImpact(id ID, t Type, olds PropertyMap, news PropertyMap)
(bool, PropertyMap, error)
Essentially, during the planning phase, we will consult each provider
about the nature of a proposed update. This update includes a set of
old properties and the new ones and, if the resource provider will need
to replace the property as a result of the update, it will return true;
in general, the PropertyMap will eventually contain a list of all
properties that will be modified as a result of the operation (see below).
The planning phase reacts to this by propagating the change to dependent
resources, so that they know that the ID will change (and so that they
can recalculate their own state accordingly, possibly leading to a ripple
effect). This ensures the overall DAG / schedule is ordered correctly.
This change is most of pulumi/coconut#105. The only missing piece
is to generalize replacing the "ID" property with replacing arbitrary
properties; there are hooks in here for this, but until pulumi/coconut#90
is addressed, it doesn't make sense to make much progress on this.
2017-03-01 17:08:53 +00:00
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-02-10 17:08:06 +00:00
|
|
|
func _ResourceProvider_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(DeleteRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ResourceProviderServer).Delete(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2017-09-22 02:18:21 +00:00
|
|
|
FullMethod: "/pulumirpc.ResourceProvider/Delete",
|
2017-02-10 17:08:06 +00:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ResourceProviderServer).Delete(ctx, req.(*DeleteRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2018-07-12 01:07:50 +00:00
|
|
|
func _ResourceProvider_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(empty.Empty)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ResourceProviderServer).Cancel(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/pulumirpc.ResourceProvider/Cancel",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ResourceProviderServer).Cancel(ctx, req.(*empty.Empty))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-12-01 21:50:32 +00:00
|
|
|
func _ResourceProvider_GetPluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
2018-07-12 01:07:50 +00:00
|
|
|
in := new(empty.Empty)
|
2017-12-01 21:50:32 +00:00
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ResourceProviderServer).GetPluginInfo(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/pulumirpc.ResourceProvider/GetPluginInfo",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
2018-07-12 01:07:50 +00:00
|
|
|
return srv.(ResourceProviderServer).GetPluginInfo(ctx, req.(*empty.Empty))
|
2017-12-01 21:50:32 +00:00
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-02-10 17:08:06 +00:00
|
|
|
var _ResourceProvider_serviceDesc = grpc.ServiceDesc{
|
2017-09-22 02:18:21 +00:00
|
|
|
ServiceName: "pulumirpc.ResourceProvider",
|
2017-02-10 17:08:06 +00:00
|
|
|
HandlerType: (*ResourceProviderServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
2017-08-31 21:31:33 +00:00
|
|
|
{
|
|
|
|
MethodName: "Configure",
|
|
|
|
Handler: _ResourceProvider_Configure_Handler,
|
|
|
|
},
|
Add a notion of stable properties
This change adds the capability for a resource provider to indicate
that, where an action carried out in response to a diff, a certain set
of properties would be "stable"; that is to say, they are guaranteed
not to change. As a result, properties may be resolved to their final
values during previewing, avoiding erroneous cascading impacts.
This avoids the ever-annoying situation I keep running into when demoing:
when adding or removing an ingress rule to a security group, we ripple
the impact through the instance, and claim it must be replaced, because
that instance depends on the security group via its name. Well, the name
is a great example of a stable property, in that it will never change, and
so this is truly unfortunate and always adds uncertainty into the demos.
Particularly since the actual update doesn't need to perform replacements.
This resolves pulumi/pulumi#330.
2017-10-04 12:22:21 +00:00
|
|
|
{
|
|
|
|
MethodName: "Invoke",
|
|
|
|
Handler: _ResourceProvider_Invoke_Handler,
|
|
|
|
},
|
2017-03-03 02:15:38 +00:00
|
|
|
{
|
|
|
|
MethodName: "Check",
|
|
|
|
Handler: _ResourceProvider_Check_Handler,
|
|
|
|
},
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
{
|
2017-08-01 01:26:15 +00:00
|
|
|
MethodName: "Diff",
|
|
|
|
Handler: _ResourceProvider_Diff_Handler,
|
Redo object monikers
This change overhauls the way we do object monikers. The old mechanism,
generating monikers using graph paths, was far too brittle and prone to
collisions. The new approach mixes some amount of "automatic scoping"
plus some "explicit naming." Although there is some explicitness, this
is arguably a good thing, as the monikers will be relatable back to the
source more readily by developers inspecting the graph and resource state.
Each moniker has four parts:
<Namespace>::<AllocModule>::<Type>::<Name>
wherein each element is the following:
<Namespace> The namespace being deployed into
<AllocModule> The module in which the object was allocated
<Type> The type of the resource
<Name> The assigned name of the resource
The <Namespace> is essentially the deployment target -- so "prod",
"stage", etc -- although it is more general purpose to allow for future
namespacing within a target (e.g., "prod/customer1", etc); for now
this is rudimentary, however, see marapongo/mu#94.
The <AllocModule> is the token for the code that contained the 'new'
that led to this object being created. In the future, we may wish to
extend this to also track the module under evaluation. (This is a nice
aspect of monikers; they can become arbitrarily complex, so long as
they are precise, and not prone to false positives/negatives.)
The <Name> warrants more discussion. The resource provider is consulted
via a new gRPC method, Name, that fetches the name. How the provider
does this is entirely up to it. For some resource types, the resource
may have properties that developers must set (e.g., `new Bucket("foo")`);
for other providers, perhaps the resource intrinsically has a property
that explicitly and uniquely qualifies the object (e.g., AWS SecurityGroups,
via `new SecurityGroup({groupName: "my-sg"}`); and finally, it's conceivable
that a provider might auto-generate the name (e.g., such as an AWS Lambda
whose name could simply be a hash of the source code contents).
This should overall produce better results with respect to moniker
collisions, ability to match resources, and the usability of the system.
2017-02-24 22:50:02 +00:00
|
|
|
},
|
2017-02-10 17:08:06 +00:00
|
|
|
{
|
|
|
|
MethodName: "Create",
|
|
|
|
Handler: _ResourceProvider_Create_Handler,
|
|
|
|
},
|
2018-04-05 14:00:16 +00:00
|
|
|
{
|
|
|
|
MethodName: "Read",
|
|
|
|
Handler: _ResourceProvider_Read_Handler,
|
|
|
|
},
|
Support replacement IDs
This change introduces a new RPC function to the provider interface;
in pseudo-code:
UpdateImpact(id ID, t Type, olds PropertyMap, news PropertyMap)
(bool, PropertyMap, error)
Essentially, during the planning phase, we will consult each provider
about the nature of a proposed update. This update includes a set of
old properties and the new ones and, if the resource provider will need
to replace the property as a result of the update, it will return true;
in general, the PropertyMap will eventually contain a list of all
properties that will be modified as a result of the operation (see below).
The planning phase reacts to this by propagating the change to dependent
resources, so that they know that the ID will change (and so that they
can recalculate their own state accordingly, possibly leading to a ripple
effect). This ensures the overall DAG / schedule is ordered correctly.
This change is most of pulumi/coconut#105. The only missing piece
is to generalize replacing the "ID" property with replacing arbitrary
properties; there are hooks in here for this, but until pulumi/coconut#90
is addressed, it doesn't make sense to make much progress on this.
2017-03-01 17:08:53 +00:00
|
|
|
{
|
2017-04-20 21:09:00 +00:00
|
|
|
MethodName: "Update",
|
|
|
|
Handler: _ResourceProvider_Update_Handler,
|
Support replacement IDs
This change introduces a new RPC function to the provider interface;
in pseudo-code:
UpdateImpact(id ID, t Type, olds PropertyMap, news PropertyMap)
(bool, PropertyMap, error)
Essentially, during the planning phase, we will consult each provider
about the nature of a proposed update. This update includes a set of
old properties and the new ones and, if the resource provider will need
to replace the property as a result of the update, it will return true;
in general, the PropertyMap will eventually contain a list of all
properties that will be modified as a result of the operation (see below).
The planning phase reacts to this by propagating the change to dependent
resources, so that they know that the ID will change (and so that they
can recalculate their own state accordingly, possibly leading to a ripple
effect). This ensures the overall DAG / schedule is ordered correctly.
This change is most of pulumi/coconut#105. The only missing piece
is to generalize replacing the "ID" property with replacing arbitrary
properties; there are hooks in here for this, but until pulumi/coconut#90
is addressed, it doesn't make sense to make much progress on this.
2017-03-01 17:08:53 +00:00
|
|
|
},
|
2017-02-10 17:08:06 +00:00
|
|
|
{
|
|
|
|
MethodName: "Delete",
|
|
|
|
Handler: _ResourceProvider_Delete_Handler,
|
|
|
|
},
|
2018-07-12 01:07:50 +00:00
|
|
|
{
|
|
|
|
MethodName: "Cancel",
|
|
|
|
Handler: _ResourceProvider_Cancel_Handler,
|
|
|
|
},
|
2017-12-01 21:50:32 +00:00
|
|
|
{
|
|
|
|
MethodName: "GetPluginInfo",
|
|
|
|
Handler: _ResourceProvider_GetPluginInfo_Handler,
|
|
|
|
},
|
2017-02-10 17:08:06 +00:00
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
Metadata: "provider.proto",
|
|
|
|
}
|
|
|
|
|
Implement first-class providers. (#1695)
### First-Class Providers
These changes implement support for first-class providers. First-class
providers are provider plugins that are exposed as resources via the
Pulumi programming model so that they may be explicitly and multiply
instantiated. Each instance of a provider resource may be configured
differently, and configuration parameters may be source from the
outputs of other resources.
### Provider Plugin Changes
In order to accommodate the need to verify and diff provider
configuration and configure providers without complete configuration
information, these changes adjust the high-level provider plugin
interface. Two new methods for validating a provider's configuration
and diffing changes to the same have been added (`CheckConfig` and
`DiffConfig`, respectively), and the type of the configuration bag
accepted by `Configure` has been changed to a `PropertyMap`.
These changes have not yet been reflected in the provider plugin gRPC
interface. We will do this in a set of follow-up changes. Until then,
these methods are implemented by adapters:
- `CheckConfig` validates that all configuration parameters are string
or unknown properties. This is necessary because existing plugins
only accept string-typed configuration values.
- `DiffConfig` either returns "never replace" if all configuration
values are known or "must replace" if any configuration value is
unknown. The justification for this behavior is given
[here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106)
- `Configure` converts the config bag to a legacy config map and
configures the provider plugin if all config values are known. If any
config value is unknown, the underlying plugin is not configured and
the provider may only perform `Check`, `Read`, and `Invoke`, all of
which return empty results. We justify this behavior becuase it is
only possible during a preview and provides the best experience we
can manage with the existing gRPC interface.
### Resource Model Changes
Providers are now exposed as resources that participate in a stack's
dependency graph. Like other resources, they are explicitly created,
may have multiple instances, and may have dependencies on other
resources. Providers are referred to using provider references, which
are a combination of the provider's URN and its ID. This design
addresses the need during a preview to refer to providers that have not
yet been physically created and therefore have no ID.
All custom resources that are not themselves providers must specify a
single provider via a provider reference. The named provider will be
used to manage that resource's CRUD operations. If a resource's
provider reference changes, the resource must be replaced. Though its
URN is not present in the resource's dependency list, the provider
should be treated as a dependency of the resource when topologically
sorting the dependency graph.
Finally, `Invoke` operations must now specify a provider to use for the
invocation via a provider reference.
### Engine Changes
First-class providers support requires a few changes to the engine:
- The engine must have some way to map from provider references to
provider plugins. It must be possible to add providers from a stack's
checkpoint to this map and to register new/updated providers during
the execution of a plan in response to CRUD operations on provider
resources.
- In order to support updating existing stacks using existing Pulumi
programs that may not explicitly instantiate providers, the engine
must be able to manage the "default" providers for each package
referenced by a checkpoint or Pulumi program. The configuration for
a "default" provider is taken from the stack's configuration data.
The former need is addressed by adding a provider registry type that is
responsible for managing all of the plugins required by a plan. In
addition to loading plugins froma checkpoint and providing the ability
to map from a provider reference to a provider plugin, this type serves
as the provider plugin for providers themselves (i.e. it is the
"provider provider").
The latter need is solved via two relatively self-contained changes to
plan setup and the eval source.
During plan setup, the old checkpoint is scanned for custom resources
that do not have a provider reference in order to compute the set of
packages that require a default provider. Once this set has been
computed, the required default provider definitions are conjured and
prepended to the checkpoint's resource list. Each resource that
requires a default provider is then updated to refer to the default
provider for its package.
While an eval source is running, each custom resource registration,
resource read, and invoke that does not name a provider is trapped
before being returned by the source iterator. If no default provider
for the appropriate package has been registered, the eval source
synthesizes an appropriate registration, waits for it to complete, and
records the registered provider's reference. This reference is injected
into the original request, which is then processed as usual. If a
default provider was already registered, the recorded reference is
used and no new registration occurs.
### SDK Changes
These changes only expose first-class providers from the Node.JS SDK.
- A new abstract class, `ProviderResource`, can be subclassed and used
to instantiate first-class providers.
- A new field in `ResourceOptions`, `provider`, can be used to supply
a particular provider instance to manage a `CustomResource`'s CRUD
operations.
- A new type, `InvokeOptions`, can be used to specify options that
control the behavior of a call to `pulumi.runtime.invoke`. This type
includes a `provider` field that is analogous to
`ResourceOptions.provider`.
2018-08-07 00:50:29 +00:00
|
|
|
func init() { proto.RegisterFile("provider.proto", fileDescriptor_provider_5951afc12b1894bc) }
|
|
|
|
|
|
|
|
var fileDescriptor_provider_5951afc12b1894bc = []byte{
|
|
|
|
// 889 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xc4, 0x56, 0xdd, 0x8e, 0xdb, 0x44,
|
|
|
|
0x14, 0x5e, 0x27, 0xd9, 0x74, 0x73, 0xf2, 0xa3, 0x68, 0x80, 0xdd, 0x34, 0xe5, 0xa2, 0x32, 0x37,
|
|
|
|
0x15, 0x48, 0x0e, 0x4a, 0x2f, 0x80, 0xaa, 0x15, 0x28, 0xdd, 0x2c, 0x44, 0x55, 0xb3, 0xc5, 0x55,
|
|
|
|
0x59, 0xc1, 0x0d, 0xf2, 0xda, 0x93, 0xac, 0x89, 0x63, 0x9b, 0xf1, 0x38, 0x28, 0x88, 0x17, 0x58,
|
|
|
|
0xf1, 0x06, 0x3c, 0x06, 0xcf, 0xc6, 0x03, 0x30, 0x9e, 0x1f, 0xc7, 0x93, 0x6c, 0xb2, 0x61, 0xb5,
|
|
|
|
0xa2, 0x77, 0x73, 0x7c, 0x7e, 0xbe, 0xf3, 0x9d, 0x73, 0xe6, 0x8c, 0xa1, 0x15, 0x93, 0x68, 0xe1,
|
|
|
|
0x7b, 0x98, 0x58, 0xec, 0x40, 0x23, 0x54, 0x8b, 0xd3, 0x20, 0x9d, 0xfb, 0x24, 0x76, 0xbb, 0x8d,
|
|
|
|
0x38, 0x48, 0xa7, 0x7e, 0x28, 0x14, 0xdd, 0x47, 0xd3, 0x28, 0x9a, 0x06, 0xb8, 0xc7, 0xa5, 0xcb,
|
|
|
|
0x74, 0xd2, 0xc3, 0xf3, 0x98, 0x2e, 0xa5, 0xf2, 0xe3, 0x75, 0x65, 0x42, 0x49, 0xea, 0x52, 0xa1,
|
|
|
|
0x35, 0xff, 0x32, 0xa0, 0xfd, 0x32, 0x0a, 0x27, 0xfe, 0x34, 0x25, 0xd8, 0xc6, 0xbf, 0xa6, 0x38,
|
|
|
|
0xa1, 0xe8, 0x3b, 0xa8, 0x2d, 0x1c, 0xe2, 0x3b, 0x97, 0x01, 0x4e, 0x3a, 0xc6, 0xe3, 0xf2, 0x93,
|
|
|
|
0x7a, 0xff, 0x53, 0x2b, 0x07, 0xb7, 0xd6, 0xed, 0xad, 0x1f, 0x94, 0xf1, 0x30, 0xa4, 0x64, 0x69,
|
|
|
|
0xaf, 0x9c, 0xbb, 0xcf, 0xa1, 0xa5, 0x2b, 0x51, 0x1b, 0xca, 0x33, 0xbc, 0x64, 0x51, 0x8d, 0x27,
|
|
|
|
0x35, 0x3b, 0x3b, 0xa2, 0x0f, 0xe1, 0x70, 0xe1, 0x04, 0x29, 0xee, 0x94, 0xf8, 0x37, 0x21, 0x3c,
|
|
|
|
0x2b, 0x7d, 0x69, 0x98, 0x7f, 0x1b, 0xf0, 0x30, 0x07, 0x1b, 0x12, 0x12, 0x91, 0xd7, 0x7e, 0x92,
|
|
|
|
0xf8, 0xe1, 0xf4, 0x15, 0x5e, 0x26, 0xe8, 0x7b, 0xa8, 0xcf, 0x57, 0xa2, 0xcc, 0xb3, 0x77, 0x53,
|
|
|
|
0x9e, 0xeb, 0xae, 0xd6, 0xea, 0x6c, 0x17, 0x63, 0x74, 0x07, 0x00, 0x2b, 0x15, 0x42, 0x50, 0x09,
|
|
|
|
0x9d, 0x39, 0x96, 0xb9, 0xf2, 0x33, 0x7a, 0x0c, 0x75, 0x0f, 0x27, 0x2e, 0xf1, 0x63, 0xea, 0x47,
|
|
|
|
0xa1, 0x4c, 0xb9, 0xf8, 0xc9, 0xfc, 0x05, 0x9a, 0xa3, 0x70, 0x11, 0xcd, 0xf2, 0x6a, 0x32, 0xc6,
|
|
|
|
0x34, 0x9a, 0x29, 0xc6, 0xec, 0x88, 0x3e, 0x83, 0x8a, 0x43, 0xa6, 0x09, 0xf7, 0xae, 0xf7, 0x4f,
|
|
|
|
0x2c, 0xd1, 0x21, 0x4b, 0x75, 0xc8, 0x7a, 0xcb, 0x3b, 0x64, 0x73, 0x23, 0xd4, 0x85, 0x23, 0x35,
|
|
|
|
0x07, 0x9d, 0x32, 0x8f, 0x91, 0xcb, 0xe6, 0x02, 0x5a, 0x0a, 0x2b, 0x89, 0xa3, 0x30, 0xc1, 0xa8,
|
|
|
|
0x07, 0x55, 0x82, 0x69, 0x4a, 0x42, 0x8e, 0xb7, 0x23, 0xb8, 0x34, 0x43, 0x4f, 0xe1, 0x68, 0xe2,
|
|
|
|
0xf8, 0x01, 0xab, 0x52, 0x96, 0x4f, 0x99, 0xbb, 0x14, 0x4a, 0x78, 0x85, 0xdd, 0xd9, 0x99, 0xd0,
|
|
|
|
0xdb, 0xb9, 0xa1, 0xf9, 0x3b, 0x34, 0xb8, 0xa6, 0x40, 0x51, 0x41, 0x32, 0x8a, 0x59, 0x58, 0x46,
|
|
|
|
0x31, 0x0a, 0xbc, 0xdb, 0x29, 0x66, 0x46, 0x99, 0x71, 0x88, 0x7f, 0x4b, 0x38, 0xbd, 0x5d, 0xc6,
|
|
|
|
0x99, 0x91, 0x99, 0x42, 0x53, 0x62, 0xaf, 0x28, 0xfb, 0x61, 0x9c, 0xd2, 0xe4, 0x56, 0xca, 0xc2,
|
|
|
|
0xec, 0x6e, 0x94, 0x07, 0x92, 0xb2, 0xd4, 0xc8, 0xb6, 0xc4, 0x98, 0x50, 0x35, 0xcc, 0xb9, 0x8c,
|
|
|
|
0x8e, 0xb3, 0x26, 0x38, 0x49, 0x3e, 0x1f, 0x52, 0x32, 0xaf, 0x0d, 0xa8, 0x9f, 0xfa, 0x93, 0x89,
|
|
|
|
0x2a, 0x5b, 0x0b, 0x4a, 0xbe, 0x27, 0xbd, 0xd9, 0x49, 0x95, 0xb1, 0xb4, 0x59, 0xc6, 0xf2, 0x7f,
|
|
|
|
0x29, 0x63, 0x65, 0x9f, 0x32, 0xfe, 0x63, 0x40, 0x43, 0xe4, 0x22, 0xcb, 0xc8, 0x08, 0x11, 0x1c,
|
|
|
|
0x07, 0x8e, 0x2b, 0xef, 0x3c, 0x23, 0xa4, 0x64, 0xd4, 0x81, 0x07, 0x09, 0x15, 0xeb, 0xa0, 0xc4,
|
|
|
|
0x55, 0x4a, 0x44, 0x9f, 0xc3, 0x07, 0x1e, 0x0e, 0x30, 0xc5, 0x03, 0x3c, 0x89, 0xb2, 0x8d, 0xc0,
|
|
|
|
0x3d, 0x78, 0xbe, 0x47, 0xf6, 0x4d, 0x2a, 0xf4, 0x02, 0x1e, 0xb8, 0x57, 0x4e, 0x38, 0xc5, 0x22,
|
|
|
|
0xd1, 0x56, 0xff, 0x93, 0x42, 0xf1, 0x8b, 0x19, 0x71, 0xe1, 0xa5, 0x30, 0xb5, 0x95, 0x8f, 0xf9,
|
|
|
|
0x42, 0x94, 0x50, 0x7e, 0x67, 0x25, 0x6b, 0x9c, 0x8e, 0xce, 0xce, 0x7e, 0x7e, 0x37, 0x7e, 0x35,
|
|
|
|
0x3e, 0xbf, 0x18, 0xb7, 0x0f, 0x50, 0x13, 0x6a, 0xfc, 0xcb, 0xf8, 0x7c, 0x3c, 0x6c, 0x1b, 0xb9,
|
|
|
|
0xf8, 0xf6, 0xfc, 0xf5, 0xb0, 0x5d, 0x32, 0x7f, 0x62, 0xd3, 0xc3, 0xba, 0x41, 0xf1, 0xf6, 0xd1,
|
|
|
|
0xfd, 0x02, 0x40, 0x76, 0xd2, 0xc7, 0xb7, 0x0e, 0x70, 0xc1, 0xd4, 0xfc, 0x11, 0x5a, 0x2a, 0xb6,
|
|
|
|
0xac, 0xe9, 0x7a, 0x83, 0xef, 0x1c, 0xfa, 0x0a, 0xea, 0x36, 0x76, 0xbc, 0xfd, 0x07, 0x47, 0x47,
|
|
|
|
0x2a, 0xef, 0x8f, 0x74, 0x01, 0x0d, 0x81, 0x74, 0xdf, 0x14, 0xfe, 0x34, 0xa0, 0xf9, 0x2e, 0xf6,
|
|
|
|
0x0a, 0xa5, 0x7f, 0x9f, 0xe3, 0x3f, 0x82, 0x96, 0x4a, 0x46, 0x12, 0xd5, 0x89, 0x19, 0xfb, 0x13,
|
|
|
|
0x63, 0x0b, 0xff, 0x94, 0xcf, 0xf9, 0xff, 0xd0, 0x9d, 0x3f, 0xe0, 0x84, 0x3f, 0x66, 0x2c, 0xeb,
|
|
|
|
0x28, 0x25, 0x2e, 0x1e, 0x85, 0x3e, 0xcd, 0x36, 0x12, 0xf6, 0xee, 0xad, 0x51, 0xd9, 0x65, 0x17,
|
|
|
|
0xfb, 0x2a, 0xcb, 0x8c, 0x5f, 0x76, 0x29, 0xf6, 0xaf, 0x0f, 0xa1, 0xad, 0x90, 0xdf, 0xc8, 0x37,
|
|
|
|
0x08, 0x0d, 0xa0, 0x96, 0x3f, 0xb4, 0xe8, 0xd1, 0x8e, 0xdf, 0x84, 0xee, 0xf1, 0x06, 0xfa, 0x30,
|
|
|
|
0xfb, 0x4f, 0x31, 0x0f, 0xd0, 0xd7, 0x50, 0x15, 0xef, 0x18, 0xea, 0x14, 0x02, 0x68, 0xcf, 0x68,
|
|
|
|
0xf7, 0xe1, 0x0d, 0x1a, 0xd1, 0x3a, 0x16, 0xe0, 0x39, 0x1c, 0xf2, 0xed, 0x8c, 0x36, 0x36, 0xb9,
|
|
|
|
0x72, 0xef, 0x6c, 0x2a, 0x72, 0xef, 0xaf, 0xa0, 0x92, 0xed, 0x14, 0x74, 0xbc, 0xb1, 0x89, 0x84,
|
|
|
|
0xef, 0xc9, 0x96, 0x0d, 0x25, 0x32, 0x17, 0x77, 0x5e, 0xcb, 0x5c, 0x5b, 0x31, 0x5a, 0xe6, 0xfa,
|
|
|
|
0x82, 0x10, 0xd8, 0xd9, 0x7d, 0xd3, 0xb0, 0x0b, 0x57, 0x5d, 0xc3, 0x2e, 0x5e, 0x4c, 0x81, 0x2d,
|
|
|
|
0x66, 0x58, 0xc3, 0xd6, 0xee, 0x98, 0x86, 0xad, 0x0f, 0x3c, 0xaf, 0x5a, 0x55, 0x4c, 0xae, 0x16,
|
|
|
|
0x40, 0x1b, 0xe6, 0x1d, 0x4d, 0x7b, 0xc6, 0xa8, 0x3b, 0xa1, 0x8b, 0x03, 0xb4, 0xc5, 0x66, 0x87,
|
|
|
|
0xef, 0x37, 0xd0, 0xfc, 0x16, 0xd3, 0x37, 0xfc, 0x27, 0x76, 0x14, 0x4e, 0xa2, 0xad, 0x21, 0x3e,
|
|
|
|
0x2a, 0x24, 0xb6, 0x32, 0x37, 0x0f, 0x2e, 0xab, 0xdc, 0xf0, 0xe9, 0xbf, 0x01, 0x00, 0x00, 0xff,
|
|
|
|
0xff, 0x2f, 0x82, 0x27, 0xcd, 0x25, 0x0b, 0x00, 0x00,
|
2017-02-10 17:08:06 +00:00
|
|
|
}
|