pulumi/sdk/proto/go/provider.pb.go

2781 lines
106 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: provider.proto
package pulumirpc
import (
2020-02-28 12:53:47 +01:00
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_struct "github.com/golang/protobuf/ptypes/struct"
grpc "google.golang.org/grpc"
2020-02-28 12:53:47 +01:00
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// 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.
2020-02-28 12:53:47 +01:00
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
Defer all diffs to resource providers. (#2849) Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
2019-07-01 21:34:19 +02:00
type PropertyDiff_Kind int32
const (
PropertyDiff_ADD PropertyDiff_Kind = 0
PropertyDiff_ADD_REPLACE PropertyDiff_Kind = 1
PropertyDiff_DELETE PropertyDiff_Kind = 2
PropertyDiff_DELETE_REPLACE PropertyDiff_Kind = 3
PropertyDiff_UPDATE PropertyDiff_Kind = 4
PropertyDiff_UPDATE_REPLACE PropertyDiff_Kind = 5
)
var PropertyDiff_Kind_name = map[int32]string{
0: "ADD",
1: "ADD_REPLACE",
2: "DELETE",
3: "DELETE_REPLACE",
4: "UPDATE",
5: "UPDATE_REPLACE",
}
2020-02-28 12:53:47 +01:00
Defer all diffs to resource providers. (#2849) Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
2019-07-01 21:34:19 +02:00
var PropertyDiff_Kind_value = map[string]int32{
"ADD": 0,
"ADD_REPLACE": 1,
"DELETE": 2,
"DELETE_REPLACE": 3,
"UPDATE": 4,
"UPDATE_REPLACE": 5,
}
func (x PropertyDiff_Kind) String() string {
return proto.EnumName(PropertyDiff_Kind_name, int32(x))
}
2020-02-28 12:53:47 +01:00
Defer all diffs to resource providers. (#2849) Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
2019-07-01 21:34:19 +02:00
func (PropertyDiff_Kind) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{13, 0}
Defer all diffs to resource providers. (#2849) Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
2019-07-01 21:34:19 +02: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",
}
2020-02-28 12:53:47 +01:00
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))
}
2020-02-28 12:53:47 +01:00
func (DiffResponse_DiffChanges) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{14, 0}
}
type GetSchemaRequest struct {
2020-02-28 12:53:47 +01:00
Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetSchemaRequest) Reset() { *m = GetSchemaRequest{} }
func (m *GetSchemaRequest) String() string { return proto.CompactTextString(m) }
func (*GetSchemaRequest) ProtoMessage() {}
func (*GetSchemaRequest) Descriptor() ([]byte, []int) {
2020-02-28 12:53:47 +01:00
return fileDescriptor_c6a9f3c02af3d1c8, []int{0}
}
2020-02-28 12:53:47 +01:00
func (m *GetSchemaRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSchemaRequest.Unmarshal(m, b)
}
func (m *GetSchemaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetSchemaRequest.Marshal(b, m, deterministic)
}
2020-02-28 12:53:47 +01:00
func (m *GetSchemaRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetSchemaRequest.Merge(m, src)
}
func (m *GetSchemaRequest) XXX_Size() int {
return xxx_messageInfo_GetSchemaRequest.Size(m)
}
func (m *GetSchemaRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetSchemaRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetSchemaRequest proto.InternalMessageInfo
func (m *GetSchemaRequest) GetVersion() int32 {
if m != nil {
return m.Version
}
return 0
}
type GetSchemaResponse struct {
2020-02-28 12:53:47 +01:00
Schema string `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetSchemaResponse) Reset() { *m = GetSchemaResponse{} }
func (m *GetSchemaResponse) String() string { return proto.CompactTextString(m) }
func (*GetSchemaResponse) ProtoMessage() {}
func (*GetSchemaResponse) Descriptor() ([]byte, []int) {
2020-02-28 12:53:47 +01:00
return fileDescriptor_c6a9f3c02af3d1c8, []int{1}
}
2020-02-28 12:53:47 +01:00
func (m *GetSchemaResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSchemaResponse.Unmarshal(m, b)
}
func (m *GetSchemaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetSchemaResponse.Marshal(b, m, deterministic)
}
2020-02-28 12:53:47 +01:00
func (m *GetSchemaResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetSchemaResponse.Merge(m, src)
}
func (m *GetSchemaResponse) XXX_Size() int {
return xxx_messageInfo_GetSchemaResponse.Size(m)
}
func (m *GetSchemaResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetSchemaResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetSchemaResponse proto.InternalMessageInfo
func (m *GetSchemaResponse) GetSchema() string {
if m != nil {
return m.Schema
}
return ""
}
type ConfigureRequest struct {
2020-02-28 12:53:47 +01:00
Variables map[string]string `protobuf:"bytes,1,rep,name=variables,proto3" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Args *_struct.Struct `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"`
AcceptSecrets bool `protobuf:"varint,3,opt,name=acceptSecrets,proto3" json:"acceptSecrets,omitempty"`
AcceptResources bool `protobuf:"varint,4,opt,name=acceptResources,proto3" json:"acceptResources,omitempty"`
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) {
2020-02-28 12:53:47 +01:00
return fileDescriptor_c6a9f3c02af3d1c8, []int{2}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *ConfigureRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConfigureRequest.Merge(m, src)
}
func (m *ConfigureRequest) XXX_Size() int {
return xxx_messageInfo_ConfigureRequest.Size(m)
}
func (m *ConfigureRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ConfigureRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ConfigureRequest proto.InternalMessageInfo
func (m *ConfigureRequest) GetVariables() map[string]string {
if m != nil {
return m.Variables
}
return nil
}
func (m *ConfigureRequest) GetArgs() *_struct.Struct {
if m != nil {
return m.Args
}
return nil
}
2019-04-12 20:27:18 +02:00
func (m *ConfigureRequest) GetAcceptSecrets() bool {
if m != nil {
return m.AcceptSecrets
}
return false
}
func (m *ConfigureRequest) GetAcceptResources() bool {
if m != nil {
return m.AcceptResources
}
return false
}
2019-04-12 20:27:18 +02:00
type ConfigureResponse struct {
2020-02-28 12:53:47 +01:00
AcceptSecrets bool `protobuf:"varint,1,opt,name=acceptSecrets,proto3" json:"acceptSecrets,omitempty"`
SupportsPreview bool `protobuf:"varint,2,opt,name=supportsPreview,proto3" json:"supportsPreview,omitempty"`
AcceptResources bool `protobuf:"varint,3,opt,name=acceptResources,proto3" json:"acceptResources,omitempty"`
2019-04-12 20:27:18 +02:00
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ConfigureResponse) Reset() { *m = ConfigureResponse{} }
func (m *ConfigureResponse) String() string { return proto.CompactTextString(m) }
func (*ConfigureResponse) ProtoMessage() {}
func (*ConfigureResponse) Descriptor() ([]byte, []int) {
2020-02-28 12:53:47 +01:00
return fileDescriptor_c6a9f3c02af3d1c8, []int{3}
2019-04-12 20:27:18 +02:00
}
2020-02-28 12:53:47 +01:00
2019-04-12 20:27:18 +02:00
func (m *ConfigureResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConfigureResponse.Unmarshal(m, b)
}
func (m *ConfigureResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConfigureResponse.Marshal(b, m, deterministic)
}
2020-02-28 12:53:47 +01:00
func (m *ConfigureResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConfigureResponse.Merge(m, src)
2019-04-12 20:27:18 +02:00
}
func (m *ConfigureResponse) XXX_Size() int {
return xxx_messageInfo_ConfigureResponse.Size(m)
}
func (m *ConfigureResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ConfigureResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ConfigureResponse proto.InternalMessageInfo
func (m *ConfigureResponse) GetAcceptSecrets() bool {
if m != nil {
return m.AcceptSecrets
}
return false
}
func (m *ConfigureResponse) GetSupportsPreview() bool {
if m != nil {
return m.SupportsPreview
}
return false
}
func (m *ConfigureResponse) GetAcceptResources() bool {
if m != nil {
return m.AcceptResources
}
return false
}
// ConfigureErrorMissingKeys is sent as a Detail on an error returned from `ResourceProvider.Configure`.
type ConfigureErrorMissingKeys struct {
2020-02-28 12:53:47 +01:00
MissingKeys []*ConfigureErrorMissingKeys_MissingKey `protobuf:"bytes,1,rep,name=missingKeys,proto3" json:"missingKeys,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ConfigureErrorMissingKeys) Reset() { *m = ConfigureErrorMissingKeys{} }
func (m *ConfigureErrorMissingKeys) String() string { return proto.CompactTextString(m) }
func (*ConfigureErrorMissingKeys) ProtoMessage() {}
func (*ConfigureErrorMissingKeys) Descriptor() ([]byte, []int) {
2020-02-28 12:53:47 +01:00
return fileDescriptor_c6a9f3c02af3d1c8, []int{4}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *ConfigureErrorMissingKeys) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConfigureErrorMissingKeys.Merge(m, 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
func (m *ConfigureErrorMissingKeys) GetMissingKeys() []*ConfigureErrorMissingKeys_MissingKey {
if m != nil {
return m.MissingKeys
}
return nil
}
type ConfigureErrorMissingKeys_MissingKey struct {
2020-02-28 12:53:47 +01:00
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) {
2020-02-28 12:53:47 +01:00
return fileDescriptor_c6a9f3c02af3d1c8, []int{4, 0}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *ConfigureErrorMissingKeys_MissingKey) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConfigureErrorMissingKeys_MissingKey.Merge(m, 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)
}
var xxx_messageInfo_ConfigureErrorMissingKeys_MissingKey proto.InternalMessageInfo
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 ""
}
type InvokeRequest struct {
2020-02-28 12:53:47 +01:00
Tok string `protobuf:"bytes,1,opt,name=tok,proto3" json:"tok,omitempty"`
Args *_struct.Struct `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"`
Provider string `protobuf:"bytes,3,opt,name=provider,proto3" json:"provider,omitempty"`
Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
AcceptResources bool `protobuf:"varint,5,opt,name=acceptResources,proto3" json:"acceptResources,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InvokeRequest) Reset() { *m = InvokeRequest{} }
func (m *InvokeRequest) String() string { return proto.CompactTextString(m) }
func (*InvokeRequest) ProtoMessage() {}
func (*InvokeRequest) Descriptor() ([]byte, []int) {
2020-02-28 12:53:47 +01:00
return fileDescriptor_c6a9f3c02af3d1c8, []int{5}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *InvokeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_InvokeRequest.Merge(m, 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
func (m *InvokeRequest) GetTok() string {
if m != nil {
return m.Tok
}
return ""
}
func (m *InvokeRequest) GetArgs() *_struct.Struct {
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 02:50:29 +02:00
func (m *InvokeRequest) GetProvider() string {
if m != nil {
return m.Provider
}
return ""
}
func (m *InvokeRequest) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *InvokeRequest) GetAcceptResources() bool {
if m != nil {
return m.AcceptResources
}
return false
}
type InvokeResponse struct {
2020-02-28 12:53:47 +01:00
Return *_struct.Struct `protobuf:"bytes,1,opt,name=return,proto3" json:"return,omitempty"`
Failures []*CheckFailure `protobuf:"bytes,2,rep,name=failures,proto3" json:"failures,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InvokeResponse) Reset() { *m = InvokeResponse{} }
func (m *InvokeResponse) String() string { return proto.CompactTextString(m) }
func (*InvokeResponse) ProtoMessage() {}
func (*InvokeResponse) Descriptor() ([]byte, []int) {
2020-02-28 12:53:47 +01:00
return fileDescriptor_c6a9f3c02af3d1c8, []int{6}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *InvokeResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_InvokeResponse.Merge(m, src)
}
func (m *InvokeResponse) XXX_Size() int {
return xxx_messageInfo_InvokeResponse.Size(m)
}
func (m *InvokeResponse) XXX_DiscardUnknown() {
xxx_messageInfo_InvokeResponse.DiscardUnknown(m)
}
var xxx_messageInfo_InvokeResponse proto.InternalMessageInfo
func (m *InvokeResponse) GetReturn() *_struct.Struct {
if m != nil {
return m.Return
}
return nil
}
func (m *InvokeResponse) GetFailures() []*CheckFailure {
if m != nil {
return m.Failures
}
return nil
}
type CallRequest struct {
Tok string `protobuf:"bytes,1,opt,name=tok,proto3" json:"tok,omitempty"`
Args *_struct.Struct `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"`
ArgDependencies map[string]*CallRequest_ArgumentDependencies `protobuf:"bytes,3,rep,name=argDependencies,proto3" json:"argDependencies,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Provider string `protobuf:"bytes,4,opt,name=provider,proto3" json:"provider,omitempty"`
Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
Project string `protobuf:"bytes,6,opt,name=project,proto3" json:"project,omitempty"`
Stack string `protobuf:"bytes,7,opt,name=stack,proto3" json:"stack,omitempty"`
Config map[string]string `protobuf:"bytes,8,rep,name=config,proto3" json:"config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
ConfigSecretKeys []string `protobuf:"bytes,9,rep,name=configSecretKeys,proto3" json:"configSecretKeys,omitempty"`
DryRun bool `protobuf:"varint,10,opt,name=dryRun,proto3" json:"dryRun,omitempty"`
Parallel int32 `protobuf:"varint,11,opt,name=parallel,proto3" json:"parallel,omitempty"`
MonitorEndpoint string `protobuf:"bytes,12,opt,name=monitorEndpoint,proto3" json:"monitorEndpoint,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CallRequest) Reset() { *m = CallRequest{} }
func (m *CallRequest) String() string { return proto.CompactTextString(m) }
func (*CallRequest) ProtoMessage() {}
func (*CallRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{7}
}
func (m *CallRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CallRequest.Unmarshal(m, b)
}
func (m *CallRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CallRequest.Marshal(b, m, deterministic)
}
func (m *CallRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CallRequest.Merge(m, src)
}
func (m *CallRequest) XXX_Size() int {
return xxx_messageInfo_CallRequest.Size(m)
}
func (m *CallRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CallRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CallRequest proto.InternalMessageInfo
func (m *CallRequest) GetTok() string {
if m != nil {
return m.Tok
}
return ""
}
func (m *CallRequest) GetArgs() *_struct.Struct {
if m != nil {
return m.Args
}
return nil
}
func (m *CallRequest) GetArgDependencies() map[string]*CallRequest_ArgumentDependencies {
if m != nil {
return m.ArgDependencies
}
return nil
}
func (m *CallRequest) GetProvider() string {
if m != nil {
return m.Provider
}
return ""
}
func (m *CallRequest) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *CallRequest) GetProject() string {
if m != nil {
return m.Project
}
return ""
}
func (m *CallRequest) GetStack() string {
if m != nil {
return m.Stack
}
return ""
}
func (m *CallRequest) GetConfig() map[string]string {
if m != nil {
return m.Config
}
return nil
}
func (m *CallRequest) GetConfigSecretKeys() []string {
if m != nil {
return m.ConfigSecretKeys
}
return nil
}
func (m *CallRequest) GetDryRun() bool {
if m != nil {
return m.DryRun
}
return false
}
func (m *CallRequest) GetParallel() int32 {
if m != nil {
return m.Parallel
}
return 0
}
func (m *CallRequest) GetMonitorEndpoint() string {
if m != nil {
return m.MonitorEndpoint
}
return ""
}
// ArgumentDependencies describes the resources that a particular argument depends on.
type CallRequest_ArgumentDependencies struct {
Urns []string `protobuf:"bytes,1,rep,name=urns,proto3" json:"urns,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CallRequest_ArgumentDependencies) Reset() { *m = CallRequest_ArgumentDependencies{} }
func (m *CallRequest_ArgumentDependencies) String() string { return proto.CompactTextString(m) }
func (*CallRequest_ArgumentDependencies) ProtoMessage() {}
func (*CallRequest_ArgumentDependencies) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{7, 0}
}
func (m *CallRequest_ArgumentDependencies) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CallRequest_ArgumentDependencies.Unmarshal(m, b)
}
func (m *CallRequest_ArgumentDependencies) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CallRequest_ArgumentDependencies.Marshal(b, m, deterministic)
}
func (m *CallRequest_ArgumentDependencies) XXX_Merge(src proto.Message) {
xxx_messageInfo_CallRequest_ArgumentDependencies.Merge(m, src)
}
func (m *CallRequest_ArgumentDependencies) XXX_Size() int {
return xxx_messageInfo_CallRequest_ArgumentDependencies.Size(m)
}
func (m *CallRequest_ArgumentDependencies) XXX_DiscardUnknown() {
xxx_messageInfo_CallRequest_ArgumentDependencies.DiscardUnknown(m)
}
var xxx_messageInfo_CallRequest_ArgumentDependencies proto.InternalMessageInfo
func (m *CallRequest_ArgumentDependencies) GetUrns() []string {
if m != nil {
return m.Urns
}
return nil
}
type CallResponse struct {
Return *_struct.Struct `protobuf:"bytes,1,opt,name=return,proto3" json:"return,omitempty"`
ReturnDependencies map[string]*CallResponse_ReturnDependencies `protobuf:"bytes,2,rep,name=returnDependencies,proto3" json:"returnDependencies,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Failures []*CheckFailure `protobuf:"bytes,3,rep,name=failures,proto3" json:"failures,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CallResponse) Reset() { *m = CallResponse{} }
func (m *CallResponse) String() string { return proto.CompactTextString(m) }
func (*CallResponse) ProtoMessage() {}
func (*CallResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{8}
}
func (m *CallResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CallResponse.Unmarshal(m, b)
}
func (m *CallResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CallResponse.Marshal(b, m, deterministic)
}
func (m *CallResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CallResponse.Merge(m, src)
}
func (m *CallResponse) XXX_Size() int {
return xxx_messageInfo_CallResponse.Size(m)
}
func (m *CallResponse) XXX_DiscardUnknown() {
xxx_messageInfo_CallResponse.DiscardUnknown(m)
}
var xxx_messageInfo_CallResponse proto.InternalMessageInfo
func (m *CallResponse) GetReturn() *_struct.Struct {
if m != nil {
return m.Return
}
return nil
}
func (m *CallResponse) GetReturnDependencies() map[string]*CallResponse_ReturnDependencies {
if m != nil {
return m.ReturnDependencies
}
return nil
}
func (m *CallResponse) GetFailures() []*CheckFailure {
if m != nil {
return m.Failures
}
return nil
}
// ReturnDependencies describes the resources that a particular return value depends on.
type CallResponse_ReturnDependencies struct {
Urns []string `protobuf:"bytes,1,rep,name=urns,proto3" json:"urns,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CallResponse_ReturnDependencies) Reset() { *m = CallResponse_ReturnDependencies{} }
func (m *CallResponse_ReturnDependencies) String() string { return proto.CompactTextString(m) }
func (*CallResponse_ReturnDependencies) ProtoMessage() {}
func (*CallResponse_ReturnDependencies) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{8, 0}
}
func (m *CallResponse_ReturnDependencies) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CallResponse_ReturnDependencies.Unmarshal(m, b)
}
func (m *CallResponse_ReturnDependencies) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CallResponse_ReturnDependencies.Marshal(b, m, deterministic)
}
func (m *CallResponse_ReturnDependencies) XXX_Merge(src proto.Message) {
xxx_messageInfo_CallResponse_ReturnDependencies.Merge(m, src)
}
func (m *CallResponse_ReturnDependencies) XXX_Size() int {
return xxx_messageInfo_CallResponse_ReturnDependencies.Size(m)
}
func (m *CallResponse_ReturnDependencies) XXX_DiscardUnknown() {
xxx_messageInfo_CallResponse_ReturnDependencies.DiscardUnknown(m)
}
var xxx_messageInfo_CallResponse_ReturnDependencies proto.InternalMessageInfo
func (m *CallResponse_ReturnDependencies) GetUrns() []string {
if m != nil {
return m.Urns
}
return nil
}
type CheckRequest struct {
2020-02-28 12:53:47 +01:00
Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"`
Olds *_struct.Struct `protobuf:"bytes,2,opt,name=olds,proto3" json:"olds,omitempty"`
News *_struct.Struct `protobuf:"bytes,3,opt,name=news,proto3" json:"news,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CheckRequest) Reset() { *m = CheckRequest{} }
func (m *CheckRequest) String() string { return proto.CompactTextString(m) }
func (*CheckRequest) ProtoMessage() {}
func (*CheckRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{9}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *CheckRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CheckRequest.Merge(m, 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
func (m *CheckRequest) GetUrn() string {
if m != nil {
return m.Urn
}
return ""
}
func (m *CheckRequest) GetOlds() *_struct.Struct {
if m != nil {
return m.Olds
}
return nil
}
func (m *CheckRequest) GetNews() *_struct.Struct {
if m != nil {
return m.News
}
return nil
}
type CheckResponse struct {
2020-02-28 12:53:47 +01:00
Inputs *_struct.Struct `protobuf:"bytes,1,opt,name=inputs,proto3" json:"inputs,omitempty"`
Failures []*CheckFailure `protobuf:"bytes,2,rep,name=failures,proto3" json:"failures,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CheckResponse) Reset() { *m = CheckResponse{} }
func (m *CheckResponse) String() string { return proto.CompactTextString(m) }
func (*CheckResponse) ProtoMessage() {}
func (*CheckResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{10}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *CheckResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CheckResponse.Merge(m, 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
func (m *CheckResponse) GetInputs() *_struct.Struct {
if m != nil {
return m.Inputs
}
return nil
}
func (m *CheckResponse) GetFailures() []*CheckFailure {
if m != nil {
return m.Failures
}
return nil
}
type CheckFailure struct {
2020-02-28 12:53:47 +01:00
Property string `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CheckFailure) Reset() { *m = CheckFailure{} }
func (m *CheckFailure) String() string { return proto.CompactTextString(m) }
func (*CheckFailure) ProtoMessage() {}
func (*CheckFailure) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{11}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *CheckFailure) XXX_Merge(src proto.Message) {
xxx_messageInfo_CheckFailure.Merge(m, 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
func (m *CheckFailure) GetProperty() string {
if m != nil {
return m.Property
}
return ""
}
func (m *CheckFailure) GetReason() string {
if m != nil {
return m.Reason
}
return ""
}
type DiffRequest struct {
2020-02-28 12:53:47 +01:00
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Urn string `protobuf:"bytes,2,opt,name=urn,proto3" json:"urn,omitempty"`
Olds *_struct.Struct `protobuf:"bytes,3,opt,name=olds,proto3" json:"olds,omitempty"`
News *_struct.Struct `protobuf:"bytes,4,opt,name=news,proto3" json:"news,omitempty"`
IgnoreChanges []string `protobuf:"bytes,5,rep,name=ignoreChanges,proto3" json:"ignoreChanges,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DiffRequest) Reset() { *m = DiffRequest{} }
func (m *DiffRequest) String() string { return proto.CompactTextString(m) }
func (*DiffRequest) ProtoMessage() {}
func (*DiffRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{12}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *DiffRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DiffRequest.Merge(m, 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 23:50:02 +01:00
func (m *DiffRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
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 23:50:02 +01:00
if m != nil {
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 23:50:02 +01:00
}
return ""
}
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 23:50:02 +01:00
if m != nil {
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 23:50:02 +01:00
}
return nil
}
func (m *DiffRequest) GetNews() *_struct.Struct {
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 23:50:02 +01:00
}
func (m *DiffRequest) GetIgnoreChanges() []string {
if m != nil {
return m.IgnoreChanges
}
return nil
}
Defer all diffs to resource providers. (#2849) Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
2019-07-01 21:34:19 +02:00
type PropertyDiff struct {
2020-02-28 12:53:47 +01:00
Kind PropertyDiff_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=pulumirpc.PropertyDiff_Kind" json:"kind,omitempty"`
InputDiff bool `protobuf:"varint,2,opt,name=inputDiff,proto3" json:"inputDiff,omitempty"`
Defer all diffs to resource providers. (#2849) Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
2019-07-01 21:34:19 +02:00
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PropertyDiff) Reset() { *m = PropertyDiff{} }
func (m *PropertyDiff) String() string { return proto.CompactTextString(m) }
func (*PropertyDiff) ProtoMessage() {}
func (*PropertyDiff) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{13}
Defer all diffs to resource providers. (#2849) Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
2019-07-01 21:34:19 +02:00
}
2020-02-28 12:53:47 +01:00
Defer all diffs to resource providers. (#2849) Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
2019-07-01 21:34:19 +02:00
func (m *PropertyDiff) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PropertyDiff.Unmarshal(m, b)
}
func (m *PropertyDiff) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PropertyDiff.Marshal(b, m, deterministic)
}
2020-02-28 12:53:47 +01:00
func (m *PropertyDiff) XXX_Merge(src proto.Message) {
xxx_messageInfo_PropertyDiff.Merge(m, src)
Defer all diffs to resource providers. (#2849) Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
2019-07-01 21:34:19 +02:00
}
func (m *PropertyDiff) XXX_Size() int {
return xxx_messageInfo_PropertyDiff.Size(m)
}
func (m *PropertyDiff) XXX_DiscardUnknown() {
xxx_messageInfo_PropertyDiff.DiscardUnknown(m)
}
var xxx_messageInfo_PropertyDiff proto.InternalMessageInfo
func (m *PropertyDiff) GetKind() PropertyDiff_Kind {
if m != nil {
return m.Kind
}
return PropertyDiff_ADD
}
func (m *PropertyDiff) GetInputDiff() bool {
if m != nil {
return m.InputDiff
}
return false
}
type DiffResponse struct {
2020-02-28 12:53:47 +01:00
Replaces []string `protobuf:"bytes,1,rep,name=replaces,proto3" json:"replaces,omitempty"`
Stables []string `protobuf:"bytes,2,rep,name=stables,proto3" json:"stables,omitempty"`
DeleteBeforeReplace bool `protobuf:"varint,3,opt,name=deleteBeforeReplace,proto3" json:"deleteBeforeReplace,omitempty"`
Changes DiffResponse_DiffChanges `protobuf:"varint,4,opt,name=changes,proto3,enum=pulumirpc.DiffResponse_DiffChanges" json:"changes,omitempty"`
Diffs []string `protobuf:"bytes,5,rep,name=diffs,proto3" json:"diffs,omitempty"`
Defer all diffs to resource providers. (#2849) Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
2019-07-01 21:34:19 +02:00
// detailedDiff is an optional field that contains map from each changed property to the type of the change.
//
// The keys of this map are property paths. These paths are essentially Javascript property access expressions
// in which all elements are literals, and obey the following EBNF-ish grammar:
//
// propertyName := [a-zA-Z_$] { [a-zA-Z0-9_$] }
// quotedPropertyName := '"' ( '\' '"' | [^"] ) { ( '\' '"' | [^"] ) } '"'
// arrayIndex := { [0-9] }
//
// propertyIndex := '[' ( quotedPropertyName | arrayIndex ) ']'
// rootProperty := ( propertyName | propertyIndex )
// propertyAccessor := ( ( '.' propertyName ) | propertyIndex )
// path := rootProperty { propertyAccessor }
//
// Examples of valid keys:
// - root
// - root.nested
// - root["nested"]
// - root.double.nest
// - root["double"].nest
// - root["double"]["nest"]
// - root.array[0]
// - root.array[100]
// - root.array[0].nested
// - root.array[0][1].nested
// - root.nested.array[0].double[1]
// - root["key with \"escaped\" quotes"]
// - root["key with a ."]
// - ["root key with \"escaped\" quotes"].nested
// - ["root key with a ."][100]
2020-02-28 12:53:47 +01:00
DetailedDiff map[string]*PropertyDiff `protobuf:"bytes,6,rep,name=detailedDiff,proto3" json:"detailedDiff,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
HasDetailedDiff bool `protobuf:"varint,7,opt,name=hasDetailedDiff,proto3" json:"hasDetailedDiff,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) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{14}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *DiffResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DiffResponse.Merge(m, src)
}
func (m *DiffResponse) XXX_Size() int {
return xxx_messageInfo_DiffResponse.Size(m)
}
func (m *DiffResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DiffResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DiffResponse proto.InternalMessageInfo
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 23:50:02 +01:00
if m != nil {
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 23:50:02 +01: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 23:50:02 +01:00
}
func (m *DiffResponse) GetStables() []string {
if m != nil {
return m.Stables
}
return nil
}
func (m *DiffResponse) GetDeleteBeforeReplace() bool {
if m != nil {
return m.DeleteBeforeReplace
}
return false
}
func (m *DiffResponse) GetChanges() DiffResponse_DiffChanges {
if m != nil {
return m.Changes
}
return DiffResponse_DIFF_UNKNOWN
}
func (m *DiffResponse) GetDiffs() []string {
if m != nil {
return m.Diffs
}
return nil
}
Defer all diffs to resource providers. (#2849) Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
2019-07-01 21:34:19 +02:00
func (m *DiffResponse) GetDetailedDiff() map[string]*PropertyDiff {
if m != nil {
return m.DetailedDiff
}
return nil
}
func (m *DiffResponse) GetHasDetailedDiff() bool {
if m != nil {
return m.HasDetailedDiff
}
return false
}
type CreateRequest struct {
2020-02-28 12:53:47 +01:00
Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"`
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties,proto3" json:"properties,omitempty"`
Timeout float64 `protobuf:"fixed64,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
Preview bool `protobuf:"varint,4,opt,name=preview,proto3" json:"preview,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateRequest) Reset() { *m = CreateRequest{} }
func (m *CreateRequest) String() string { return proto.CompactTextString(m) }
func (*CreateRequest) ProtoMessage() {}
func (*CreateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{15}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *CreateRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateRequest.Merge(m, 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
func (m *CreateRequest) GetUrn() string {
if m != nil {
return m.Urn
}
return ""
}
func (m *CreateRequest) GetProperties() *_struct.Struct {
if m != nil {
return m.Properties
}
return nil
}
2019-07-15 23:26:28 +02:00
func (m *CreateRequest) GetTimeout() float64 {
if m != nil {
return m.Timeout
}
return 0
}
func (m *CreateRequest) GetPreview() bool {
if m != nil {
return m.Preview
}
return false
}
type CreateResponse struct {
2020-02-28 12:53:47 +01:00
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties,proto3" json:"properties,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateResponse) Reset() { *m = CreateResponse{} }
func (m *CreateResponse) String() string { return proto.CompactTextString(m) }
func (*CreateResponse) ProtoMessage() {}
func (*CreateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{16}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *CreateResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateResponse.Merge(m, 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
func (m *CreateResponse) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *CreateResponse) GetProperties() *_struct.Struct {
if m != nil {
return m.Properties
}
return nil
}
type ReadRequest struct {
2020-02-28 12:53:47 +01:00
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Urn string `protobuf:"bytes,2,opt,name=urn,proto3" json:"urn,omitempty"`
Properties *_struct.Struct `protobuf:"bytes,3,opt,name=properties,proto3" json:"properties,omitempty"`
Inputs *_struct.Struct `protobuf:"bytes,4,opt,name=inputs,proto3" json:"inputs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReadRequest) Reset() { *m = ReadRequest{} }
func (m *ReadRequest) String() string { return proto.CompactTextString(m) }
func (*ReadRequest) ProtoMessage() {}
func (*ReadRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{17}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *ReadRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReadRequest.Merge(m, 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
func (m *ReadRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ReadRequest) GetUrn() string {
if m != nil {
return m.Urn
}
return ""
}
func (m *ReadRequest) GetProperties() *_struct.Struct {
if m != nil {
return m.Properties
}
return nil
}
func (m *ReadRequest) GetInputs() *_struct.Struct {
if m != nil {
return m.Inputs
}
return nil
}
type ReadResponse struct {
2020-02-28 12:53:47 +01:00
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties,proto3" json:"properties,omitempty"`
Inputs *_struct.Struct `protobuf:"bytes,3,opt,name=inputs,proto3" json:"inputs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReadResponse) Reset() { *m = ReadResponse{} }
func (m *ReadResponse) String() string { return proto.CompactTextString(m) }
func (*ReadResponse) ProtoMessage() {}
func (*ReadResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{18}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *ReadResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReadResponse.Merge(m, 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
func (m *ReadResponse) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ReadResponse) GetProperties() *_struct.Struct {
if m != nil {
return m.Properties
}
return nil
}
func (m *ReadResponse) GetInputs() *_struct.Struct {
if m != nil {
return m.Inputs
}
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 02:32:59 +02:00
type UpdateRequest struct {
2020-02-28 12:53:47 +01:00
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Urn string `protobuf:"bytes,2,opt,name=urn,proto3" json:"urn,omitempty"`
Olds *_struct.Struct `protobuf:"bytes,3,opt,name=olds,proto3" json:"olds,omitempty"`
News *_struct.Struct `protobuf:"bytes,4,opt,name=news,proto3" json:"news,omitempty"`
Timeout float64 `protobuf:"fixed64,5,opt,name=timeout,proto3" json:"timeout,omitempty"`
IgnoreChanges []string `protobuf:"bytes,6,rep,name=ignoreChanges,proto3" json:"ignoreChanges,omitempty"`
Preview bool `protobuf:"varint,7,opt,name=preview,proto3" json:"preview,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) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{19}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *UpdateRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateRequest.Merge(m, src)
}
func (m *UpdateRequest) XXX_Size() int {
return xxx_messageInfo_UpdateRequest.Size(m)
}
func (m *UpdateRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateRequest.DiscardUnknown(m)
}
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 02:32:59 +02:00
func (m *UpdateRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
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 02:32:59 +02:00
if m != nil {
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 02:32:59 +02:00
}
return ""
}
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 02:32:59 +02:00
if m != nil {
return m.Olds
}
return nil
}
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 02:32:59 +02:00
if m != nil {
return m.News
}
return nil
}
2019-07-15 23:26:28 +02:00
func (m *UpdateRequest) GetTimeout() float64 {
if m != nil {
return m.Timeout
}
return 0
}
func (m *UpdateRequest) GetIgnoreChanges() []string {
if m != nil {
return m.IgnoreChanges
}
return nil
}
func (m *UpdateRequest) GetPreview() bool {
if m != nil {
return m.Preview
}
return false
}
type UpdateResponse struct {
2020-02-28 12:53:47 +01:00
Properties *_struct.Struct `protobuf:"bytes,1,opt,name=properties,proto3" 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) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{20}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *UpdateResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateResponse.Merge(m, src)
}
func (m *UpdateResponse) XXX_Size() int {
return xxx_messageInfo_UpdateResponse.Size(m)
}
func (m *UpdateResponse) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateResponse.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateResponse proto.InternalMessageInfo
func (m *UpdateResponse) GetProperties() *_struct.Struct {
if m != nil {
return m.Properties
}
return nil
}
type DeleteRequest struct {
2020-02-28 12:53:47 +01:00
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Urn string `protobuf:"bytes,2,opt,name=urn,proto3" json:"urn,omitempty"`
Properties *_struct.Struct `protobuf:"bytes,3,opt,name=properties,proto3" json:"properties,omitempty"`
Timeout float64 `protobuf:"fixed64,4,opt,name=timeout,proto3" json:"timeout,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) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{21}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *DeleteRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteRequest.Merge(m, src)
}
func (m *DeleteRequest) XXX_Size() int {
return xxx_messageInfo_DeleteRequest.Size(m)
}
func (m *DeleteRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo
func (m *DeleteRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
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 20:08:06 +01:00
if m != nil {
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 20:08:06 +01:00
}
return ""
}
func (m *DeleteRequest) GetProperties() *_struct.Struct {
2017-07-19 16:57:22 +02:00
if m != nil {
return m.Properties
}
return nil
}
2019-07-15 23:26:28 +02:00
func (m *DeleteRequest) GetTimeout() float64 {
if m != nil {
return m.Timeout
}
return 0
}
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
type ConstructRequest struct {
Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
Stack string `protobuf:"bytes,2,opt,name=stack,proto3" json:"stack,omitempty"`
Config map[string]string `protobuf:"bytes,3,rep,name=config,proto3" json:"config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
DryRun bool `protobuf:"varint,4,opt,name=dryRun,proto3" json:"dryRun,omitempty"`
Parallel int32 `protobuf:"varint,5,opt,name=parallel,proto3" json:"parallel,omitempty"`
MonitorEndpoint string `protobuf:"bytes,6,opt,name=monitorEndpoint,proto3" json:"monitorEndpoint,omitempty"`
Type string `protobuf:"bytes,7,opt,name=type,proto3" json:"type,omitempty"`
Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name,omitempty"`
Parent string `protobuf:"bytes,9,opt,name=parent,proto3" json:"parent,omitempty"`
Inputs *_struct.Struct `protobuf:"bytes,10,opt,name=inputs,proto3" json:"inputs,omitempty"`
InputDependencies map[string]*ConstructRequest_PropertyDependencies `protobuf:"bytes,11,rep,name=inputDependencies,proto3" json:"inputDependencies,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Protect bool `protobuf:"varint,12,opt,name=protect,proto3" json:"protect,omitempty"`
Providers map[string]string `protobuf:"bytes,13,rep,name=providers,proto3" json:"providers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Aliases []string `protobuf:"bytes,14,rep,name=aliases,proto3" json:"aliases,omitempty"`
Dependencies []string `protobuf:"bytes,15,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
ConfigSecretKeys []string `protobuf:"bytes,16,rep,name=configSecretKeys,proto3" json:"configSecretKeys,omitempty"`
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ConstructRequest) Reset() { *m = ConstructRequest{} }
func (m *ConstructRequest) String() string { return proto.CompactTextString(m) }
func (*ConstructRequest) ProtoMessage() {}
func (*ConstructRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{22}
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
}
func (m *ConstructRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConstructRequest.Unmarshal(m, b)
}
func (m *ConstructRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConstructRequest.Marshal(b, m, deterministic)
}
func (m *ConstructRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConstructRequest.Merge(m, src)
}
func (m *ConstructRequest) XXX_Size() int {
return xxx_messageInfo_ConstructRequest.Size(m)
}
func (m *ConstructRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ConstructRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ConstructRequest proto.InternalMessageInfo
func (m *ConstructRequest) GetProject() string {
if m != nil {
return m.Project
}
return ""
}
func (m *ConstructRequest) GetStack() string {
if m != nil {
return m.Stack
}
return ""
}
func (m *ConstructRequest) GetConfig() map[string]string {
if m != nil {
return m.Config
}
return nil
}
func (m *ConstructRequest) GetDryRun() bool {
if m != nil {
return m.DryRun
}
return false
}
func (m *ConstructRequest) GetParallel() int32 {
if m != nil {
return m.Parallel
}
return 0
}
func (m *ConstructRequest) GetMonitorEndpoint() string {
if m != nil {
return m.MonitorEndpoint
}
return ""
}
func (m *ConstructRequest) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *ConstructRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ConstructRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ConstructRequest) GetInputs() *_struct.Struct {
if m != nil {
return m.Inputs
}
return nil
}
func (m *ConstructRequest) GetInputDependencies() map[string]*ConstructRequest_PropertyDependencies {
if m != nil {
return m.InputDependencies
}
return nil
}
func (m *ConstructRequest) GetProtect() bool {
if m != nil {
return m.Protect
}
return false
}
func (m *ConstructRequest) GetProviders() map[string]string {
if m != nil {
return m.Providers
}
return nil
}
func (m *ConstructRequest) GetAliases() []string {
if m != nil {
return m.Aliases
}
return nil
}
func (m *ConstructRequest) GetDependencies() []string {
if m != nil {
return m.Dependencies
}
return nil
}
func (m *ConstructRequest) GetConfigSecretKeys() []string {
if m != nil {
return m.ConfigSecretKeys
}
return nil
}
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
// PropertyDependencies describes the resources that a particular property depends on.
type ConstructRequest_PropertyDependencies struct {
Urns []string `protobuf:"bytes,1,rep,name=urns,proto3" json:"urns,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ConstructRequest_PropertyDependencies) Reset() { *m = ConstructRequest_PropertyDependencies{} }
func (m *ConstructRequest_PropertyDependencies) String() string { return proto.CompactTextString(m) }
func (*ConstructRequest_PropertyDependencies) ProtoMessage() {}
func (*ConstructRequest_PropertyDependencies) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{22, 0}
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
}
func (m *ConstructRequest_PropertyDependencies) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConstructRequest_PropertyDependencies.Unmarshal(m, b)
}
func (m *ConstructRequest_PropertyDependencies) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConstructRequest_PropertyDependencies.Marshal(b, m, deterministic)
}
func (m *ConstructRequest_PropertyDependencies) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConstructRequest_PropertyDependencies.Merge(m, src)
}
func (m *ConstructRequest_PropertyDependencies) XXX_Size() int {
return xxx_messageInfo_ConstructRequest_PropertyDependencies.Size(m)
}
func (m *ConstructRequest_PropertyDependencies) XXX_DiscardUnknown() {
xxx_messageInfo_ConstructRequest_PropertyDependencies.DiscardUnknown(m)
}
var xxx_messageInfo_ConstructRequest_PropertyDependencies proto.InternalMessageInfo
func (m *ConstructRequest_PropertyDependencies) GetUrns() []string {
if m != nil {
return m.Urns
}
return nil
}
type ConstructResponse struct {
Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"`
State *_struct.Struct `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
StateDependencies map[string]*ConstructResponse_PropertyDependencies `protobuf:"bytes,3,rep,name=stateDependencies,proto3" json:"stateDependencies,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ConstructResponse) Reset() { *m = ConstructResponse{} }
func (m *ConstructResponse) String() string { return proto.CompactTextString(m) }
func (*ConstructResponse) ProtoMessage() {}
func (*ConstructResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{23}
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
}
func (m *ConstructResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConstructResponse.Unmarshal(m, b)
}
func (m *ConstructResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConstructResponse.Marshal(b, m, deterministic)
}
func (m *ConstructResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConstructResponse.Merge(m, src)
}
func (m *ConstructResponse) XXX_Size() int {
return xxx_messageInfo_ConstructResponse.Size(m)
}
func (m *ConstructResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ConstructResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ConstructResponse proto.InternalMessageInfo
func (m *ConstructResponse) GetUrn() string {
if m != nil {
return m.Urn
}
return ""
}
func (m *ConstructResponse) GetState() *_struct.Struct {
if m != nil {
return m.State
}
return nil
}
func (m *ConstructResponse) GetStateDependencies() map[string]*ConstructResponse_PropertyDependencies {
if m != nil {
return m.StateDependencies
}
return nil
}
// PropertyDependencies describes the resources that a particular property depends on.
type ConstructResponse_PropertyDependencies struct {
Urns []string `protobuf:"bytes,1,rep,name=urns,proto3" json:"urns,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ConstructResponse_PropertyDependencies) Reset() {
*m = ConstructResponse_PropertyDependencies{}
}
func (m *ConstructResponse_PropertyDependencies) String() string { return proto.CompactTextString(m) }
func (*ConstructResponse_PropertyDependencies) ProtoMessage() {}
func (*ConstructResponse_PropertyDependencies) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{23, 0}
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
}
func (m *ConstructResponse_PropertyDependencies) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConstructResponse_PropertyDependencies.Unmarshal(m, b)
}
func (m *ConstructResponse_PropertyDependencies) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ConstructResponse_PropertyDependencies.Marshal(b, m, deterministic)
}
func (m *ConstructResponse_PropertyDependencies) XXX_Merge(src proto.Message) {
xxx_messageInfo_ConstructResponse_PropertyDependencies.Merge(m, src)
}
func (m *ConstructResponse_PropertyDependencies) XXX_Size() int {
return xxx_messageInfo_ConstructResponse_PropertyDependencies.Size(m)
}
func (m *ConstructResponse_PropertyDependencies) XXX_DiscardUnknown() {
xxx_messageInfo_ConstructResponse_PropertyDependencies.DiscardUnknown(m)
}
var xxx_messageInfo_ConstructResponse_PropertyDependencies proto.InternalMessageInfo
func (m *ConstructResponse_PropertyDependencies) GetUrns() []string {
if m != nil {
return m.Urns
}
return nil
}
// ErrorResourceInitFailed is sent as a Detail `ResourceProvider.{Create, Update}` fail because a
// resource was created successfully, but failed to initialize.
type ErrorResourceInitFailed struct {
2020-02-28 12:53:47 +01:00
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties,proto3" json:"properties,omitempty"`
Reasons []string `protobuf:"bytes,3,rep,name=reasons,proto3" json:"reasons,omitempty"`
Inputs *_struct.Struct `protobuf:"bytes,4,opt,name=inputs,proto3" json:"inputs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ErrorResourceInitFailed) Reset() { *m = ErrorResourceInitFailed{} }
func (m *ErrorResourceInitFailed) String() string { return proto.CompactTextString(m) }
func (*ErrorResourceInitFailed) ProtoMessage() {}
func (*ErrorResourceInitFailed) Descriptor() ([]byte, []int) {
return fileDescriptor_c6a9f3c02af3d1c8, []int{24}
}
2020-02-28 12:53:47 +01: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)
}
2020-02-28 12:53:47 +01:00
func (m *ErrorResourceInitFailed) XXX_Merge(src proto.Message) {
xxx_messageInfo_ErrorResourceInitFailed.Merge(m, 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
func (m *ErrorResourceInitFailed) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ErrorResourceInitFailed) GetProperties() *_struct.Struct {
if m != nil {
return m.Properties
}
return nil
}
func (m *ErrorResourceInitFailed) GetReasons() []string {
if m != nil {
return m.Reasons
}
return nil
}
func (m *ErrorResourceInitFailed) GetInputs() *_struct.Struct {
if m != nil {
return m.Inputs
}
return nil
}
func init() {
2020-02-28 12:53:47 +01:00
proto.RegisterEnum("pulumirpc.PropertyDiff_Kind", PropertyDiff_Kind_name, PropertyDiff_Kind_value)
proto.RegisterEnum("pulumirpc.DiffResponse_DiffChanges", DiffResponse_DiffChanges_name, DiffResponse_DiffChanges_value)
proto.RegisterType((*GetSchemaRequest)(nil), "pulumirpc.GetSchemaRequest")
proto.RegisterType((*GetSchemaResponse)(nil), "pulumirpc.GetSchemaResponse")
proto.RegisterType((*ConfigureRequest)(nil), "pulumirpc.ConfigureRequest")
proto.RegisterMapType((map[string]string)(nil), "pulumirpc.ConfigureRequest.VariablesEntry")
2019-04-12 20:27:18 +02:00
proto.RegisterType((*ConfigureResponse)(nil), "pulumirpc.ConfigureResponse")
proto.RegisterType((*ConfigureErrorMissingKeys)(nil), "pulumirpc.ConfigureErrorMissingKeys")
proto.RegisterType((*ConfigureErrorMissingKeys_MissingKey)(nil), "pulumirpc.ConfigureErrorMissingKeys.MissingKey")
proto.RegisterType((*InvokeRequest)(nil), "pulumirpc.InvokeRequest")
proto.RegisterType((*InvokeResponse)(nil), "pulumirpc.InvokeResponse")
proto.RegisterType((*CallRequest)(nil), "pulumirpc.CallRequest")
proto.RegisterMapType((map[string]*CallRequest_ArgumentDependencies)(nil), "pulumirpc.CallRequest.ArgDependenciesEntry")
proto.RegisterMapType((map[string]string)(nil), "pulumirpc.CallRequest.ConfigEntry")
proto.RegisterType((*CallRequest_ArgumentDependencies)(nil), "pulumirpc.CallRequest.ArgumentDependencies")
proto.RegisterType((*CallResponse)(nil), "pulumirpc.CallResponse")
proto.RegisterMapType((map[string]*CallResponse_ReturnDependencies)(nil), "pulumirpc.CallResponse.ReturnDependenciesEntry")
proto.RegisterType((*CallResponse_ReturnDependencies)(nil), "pulumirpc.CallResponse.ReturnDependencies")
proto.RegisterType((*CheckRequest)(nil), "pulumirpc.CheckRequest")
proto.RegisterType((*CheckResponse)(nil), "pulumirpc.CheckResponse")
proto.RegisterType((*CheckFailure)(nil), "pulumirpc.CheckFailure")
proto.RegisterType((*DiffRequest)(nil), "pulumirpc.DiffRequest")
Defer all diffs to resource providers. (#2849) Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
2019-07-01 21:34:19 +02:00
proto.RegisterType((*PropertyDiff)(nil), "pulumirpc.PropertyDiff")
proto.RegisterType((*DiffResponse)(nil), "pulumirpc.DiffResponse")
Defer all diffs to resource providers. (#2849) Thse changes make a subtle but critical adjustment to the process the Pulumi engine uses to determine whether or not a difference exists between a resource's actual and desired states, and adjusts the way this difference is calculated and displayed accordingly. Today, the Pulumi engine get the first chance to decide whether or not there is a difference between a resource's actual and desired states. It does this by comparing the current set of inputs for a resource (i.e. the inputs from the running Pulumi program) with the last set of inputs used to update the resource. If there is no difference between the old and new inputs, the engine decides that no change is necessary without consulting the resource's provider. Only if there are changes does the engine consult the resource's provider for more information about the difference. This can be problematic for a number of reasons: - Not all providers do input-input comparison; some do input-state comparison - Not all providers are able to update the last deployed set of inputs when performing a refresh - Some providers--either intentionally or due to bugs--may see changes in resources whose inputs have not changed All of these situations are confusing at the very least, and the first is problematic with respect to correctness. Furthermore, the display code only renders diffs it observes rather than rendering the diffs observed by the provider, which can obscure the actual changes detected at runtime. These changes address both of these issues: - Rather than comparing the current inputs against the last inputs before calling a resource provider's Diff function, the engine calls the Diff function in all cases. - Providers may now return a list of properties that differ between the requested and actual state and the way in which they differ. This information will then be used by the CLI to render the diff appropriately. A provider may also indicate that a particular diff is between old and new inputs rather than old state and new inputs. Fixes #2453.
2019-07-01 21:34:19 +02:00
proto.RegisterMapType((map[string]*PropertyDiff)(nil), "pulumirpc.DiffResponse.DetailedDiffEntry")
proto.RegisterType((*CreateRequest)(nil), "pulumirpc.CreateRequest")
proto.RegisterType((*CreateResponse)(nil), "pulumirpc.CreateResponse")
proto.RegisterType((*ReadRequest)(nil), "pulumirpc.ReadRequest")
proto.RegisterType((*ReadResponse)(nil), "pulumirpc.ReadResponse")
proto.RegisterType((*UpdateRequest)(nil), "pulumirpc.UpdateRequest")
proto.RegisterType((*UpdateResponse)(nil), "pulumirpc.UpdateResponse")
proto.RegisterType((*DeleteRequest)(nil), "pulumirpc.DeleteRequest")
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
proto.RegisterType((*ConstructRequest)(nil), "pulumirpc.ConstructRequest")
proto.RegisterMapType((map[string]string)(nil), "pulumirpc.ConstructRequest.ConfigEntry")
proto.RegisterMapType((map[string]*ConstructRequest_PropertyDependencies)(nil), "pulumirpc.ConstructRequest.InputDependenciesEntry")
proto.RegisterMapType((map[string]string)(nil), "pulumirpc.ConstructRequest.ProvidersEntry")
proto.RegisterType((*ConstructRequest_PropertyDependencies)(nil), "pulumirpc.ConstructRequest.PropertyDependencies")
proto.RegisterType((*ConstructResponse)(nil), "pulumirpc.ConstructResponse")
proto.RegisterMapType((map[string]*ConstructResponse_PropertyDependencies)(nil), "pulumirpc.ConstructResponse.StateDependenciesEntry")
proto.RegisterType((*ConstructResponse_PropertyDependencies)(nil), "pulumirpc.ConstructResponse.PropertyDependencies")
proto.RegisterType((*ErrorResourceInitFailed)(nil), "pulumirpc.ErrorResourceInitFailed")
2020-02-28 12:53:47 +01:00
}
func init() { proto.RegisterFile("provider.proto", fileDescriptor_c6a9f3c02af3d1c8) }
var fileDescriptor_c6a9f3c02af3d1c8 = []byte{
// 1894 bytes of a gzipped FileDescriptorProto
0x1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0x99, 0xeb, 0x4b, 0x77, 0x5b, 0xa1, 0xc5, 0xe7, 0xd0, 0x79,
0x86, 0xe9, 0x29, 0xff, 0x8d, 0x74, 0x1c, 0x4e, 0xa2, 0xa5, 0x22, 0xbe, 0xad, 0x5e, 0xfb, 0x72,
0x76, 0x7b, 0xe3, 0x4d, 0x9d, 0x33, 0x3e, 0xf8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd3, 0x3f,
0xb3, 0xcf, 0xa7, 0x1a, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
2020-02-28 12:53:47 +01:00
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
2020-02-28 12:53:47 +01:00
const _ = grpc.SupportPackageIsVersion6
2020-02-28 12:53:47 +01:00
// ResourceProviderClient is the client API for ResourceProvider service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ResourceProviderClient interface {
// GetSchema fetches the schema for this resource provider.
GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*GetSchemaResponse, error)
// CheckConfig validates the configuration for this resource provider.
CheckConfig(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
// DiffConfig checks the impact a hypothetical change to this provider's configuration will have on the provider.
DiffConfig(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error)
// Configure configures the resource provider with "globals" that control its behavior.
2019-04-12 20:27:18 +02:00
Configure(ctx context.Context, in *ConfigureRequest, opts ...grpc.CallOption) (*ConfigureResponse, error)
// Invoke dynamically executes a built-in function in the provider.
Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error)
// StreamInvoke dynamically executes a built-in function in the provider, which returns a stream
// of responses.
StreamInvoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (ResourceProvider_StreamInvokeClient, error)
// Call dynamically executes a method in the provider associated with a component resource.
Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error)
// 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.
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)
// 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 "transactional").
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
// 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)
// Update updates an existing resource with new values.
Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
// Delete tears down an existing resource with the given ID. If it fails, the resource is assumed to still exist.
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error)
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
// Construct creates a new instance of the provided component resource and returns its state.
Construct(ctx context.Context, in *ConstructRequest, opts ...grpc.CallOption) (*ConstructResponse, error)
// Cancel signals the provider to abort all outstanding resource operations.
Cancel(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
// GetPluginInfo returns generic information about this plugin, like its version.
GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error)
}
type resourceProviderClient struct {
2020-02-28 12:53:47 +01:00
cc grpc.ClientConnInterface
}
2020-02-28 12:53:47 +01:00
func NewResourceProviderClient(cc grpc.ClientConnInterface) ResourceProviderClient {
return &resourceProviderClient{cc}
}
func (c *resourceProviderClient) GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*GetSchemaResponse, error) {
out := new(GetSchemaResponse)
2020-02-28 12:53:47 +01:00
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/GetSchema", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceProviderClient) CheckConfig(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) {
out := new(CheckResponse)
2020-02-28 12:53:47 +01:00
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/CheckConfig", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceProviderClient) DiffConfig(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error) {
out := new(DiffResponse)
2020-02-28 12:53:47 +01:00
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/DiffConfig", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2019-04-12 20:27:18 +02:00
func (c *resourceProviderClient) Configure(ctx context.Context, in *ConfigureRequest, opts ...grpc.CallOption) (*ConfigureResponse, error) {
out := new(ConfigureResponse)
2020-02-28 12:53:47 +01:00
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Configure", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceProviderClient) Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error) {
out := new(InvokeResponse)
2020-02-28 12:53:47 +01:00
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Invoke", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceProviderClient) StreamInvoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (ResourceProvider_StreamInvokeClient, error) {
2020-02-28 12:53:47 +01:00
stream, err := c.cc.NewStream(ctx, &_ResourceProvider_serviceDesc.Streams[0], "/pulumirpc.ResourceProvider/StreamInvoke", opts...)
if err != nil {
return nil, err
}
x := &resourceProviderStreamInvokeClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type ResourceProvider_StreamInvokeClient interface {
Recv() (*InvokeResponse, error)
grpc.ClientStream
}
type resourceProviderStreamInvokeClient struct {
grpc.ClientStream
}
func (x *resourceProviderStreamInvokeClient) Recv() (*InvokeResponse, error) {
m := new(InvokeResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *resourceProviderClient) Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error) {
out := new(CallResponse)
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Call", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceProviderClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) {
out := new(CheckResponse)
2020-02-28 12:53:47 +01:00
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Check", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceProviderClient) Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error) {
out := new(DiffResponse)
2020-02-28 12:53:47 +01:00
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Diff", in, out, 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 23:50:02 +01:00
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceProviderClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) {
out := new(CreateResponse)
2020-02-28 12:53:47 +01:00
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceProviderClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) {
out := new(ReadResponse)
2020-02-28 12:53:47 +01:00
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Read", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceProviderClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) {
out := new(UpdateResponse)
2020-02-28 12:53:47 +01:00
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceProviderClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
2020-02-28 12:53:47 +01:00
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
func (c *resourceProviderClient) Construct(ctx context.Context, in *ConstructRequest, opts ...grpc.CallOption) (*ConstructResponse, error) {
out := new(ConstructResponse)
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Construct", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceProviderClient) Cancel(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
2020-02-28 12:53:47 +01:00
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Cancel", in, out, 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) {
out := new(PluginInfo)
2020-02-28 12:53:47 +01:00
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/GetPluginInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2020-02-28 12:53:47 +01:00
// ResourceProviderServer is the server API for ResourceProvider service.
type ResourceProviderServer interface {
// GetSchema fetches the schema for this resource provider.
GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error)
// CheckConfig validates the configuration for this resource provider.
CheckConfig(context.Context, *CheckRequest) (*CheckResponse, error)
// DiffConfig checks the impact a hypothetical change to this provider's configuration will have on the provider.
DiffConfig(context.Context, *DiffRequest) (*DiffResponse, error)
// Configure configures the resource provider with "globals" that control its behavior.
2019-04-12 20:27:18 +02:00
Configure(context.Context, *ConfigureRequest) (*ConfigureResponse, error)
// Invoke dynamically executes a built-in function in the provider.
Invoke(context.Context, *InvokeRequest) (*InvokeResponse, error)
// StreamInvoke dynamically executes a built-in function in the provider, which returns a stream
// of responses.
StreamInvoke(*InvokeRequest, ResourceProvider_StreamInvokeServer) error
// Call dynamically executes a method in the provider associated with a component resource.
Call(context.Context, *CallRequest) (*CallResponse, error)
// 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.
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)
// 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 "transactional").
Create(context.Context, *CreateRequest) (*CreateResponse, error)
// 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)
// Update updates an existing resource with new values.
Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
// Delete tears down an existing resource with the given ID. If it fails, the resource is assumed to still exist.
Delete(context.Context, *DeleteRequest) (*empty.Empty, error)
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
// Construct creates a new instance of the provided component resource and returns its state.
Construct(context.Context, *ConstructRequest) (*ConstructResponse, error)
// Cancel signals the provider to abort all outstanding resource operations.
Cancel(context.Context, *empty.Empty) (*empty.Empty, error)
// GetPluginInfo returns generic information about this plugin, like its version.
GetPluginInfo(context.Context, *empty.Empty) (*PluginInfo, error)
}
2020-02-28 12:53:47 +01:00
// UnimplementedResourceProviderServer can be embedded to have forward compatible implementations.
type UnimplementedResourceProviderServer struct {
}
func (*UnimplementedResourceProviderServer) GetSchema(ctx context.Context, req *GetSchemaRequest) (*GetSchemaResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSchema not implemented")
}
func (*UnimplementedResourceProviderServer) CheckConfig(ctx context.Context, req *CheckRequest) (*CheckResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckConfig not implemented")
}
func (*UnimplementedResourceProviderServer) DiffConfig(ctx context.Context, req *DiffRequest) (*DiffResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DiffConfig not implemented")
}
func (*UnimplementedResourceProviderServer) Configure(ctx context.Context, req *ConfigureRequest) (*ConfigureResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Configure not implemented")
}
func (*UnimplementedResourceProviderServer) Invoke(ctx context.Context, req *InvokeRequest) (*InvokeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
}
func (*UnimplementedResourceProviderServer) StreamInvoke(req *InvokeRequest, srv ResourceProvider_StreamInvokeServer) error {
return status.Errorf(codes.Unimplemented, "method StreamInvoke not implemented")
}
func (*UnimplementedResourceProviderServer) Call(ctx context.Context, req *CallRequest) (*CallResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Call not implemented")
}
2020-02-28 12:53:47 +01:00
func (*UnimplementedResourceProviderServer) Check(ctx context.Context, req *CheckRequest) (*CheckResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Check not implemented")
}
func (*UnimplementedResourceProviderServer) Diff(ctx context.Context, req *DiffRequest) (*DiffResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Diff not implemented")
}
func (*UnimplementedResourceProviderServer) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (*UnimplementedResourceProviderServer) Read(ctx context.Context, req *ReadRequest) (*ReadResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Read not implemented")
}
func (*UnimplementedResourceProviderServer) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (*UnimplementedResourceProviderServer) Delete(ctx context.Context, req *DeleteRequest) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
func (*UnimplementedResourceProviderServer) Construct(ctx context.Context, req *ConstructRequest) (*ConstructResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Construct not implemented")
}
2020-02-28 12:53:47 +01:00
func (*UnimplementedResourceProviderServer) Cancel(ctx context.Context, req *empty.Empty) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Cancel not implemented")
}
func (*UnimplementedResourceProviderServer) GetPluginInfo(ctx context.Context, req *empty.Empty) (*PluginInfo, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPluginInfo not implemented")
}
func RegisterResourceProviderServer(s *grpc.Server, srv ResourceProviderServer) {
s.RegisterService(&_ResourceProvider_serviceDesc, srv)
}
func _ResourceProvider_GetSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSchemaRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ResourceProviderServer).GetSchema(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.ResourceProvider/GetSchema",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceProviderServer).GetSchema(ctx, req.(*GetSchemaRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ResourceProvider_CheckConfig_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).CheckConfig(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.ResourceProvider/CheckConfig",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceProviderServer).CheckConfig(ctx, req.(*CheckRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ResourceProvider_DiffConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DiffRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ResourceProviderServer).DiffConfig(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.ResourceProvider/DiffConfig",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceProviderServer).DiffConfig(ctx, req.(*DiffRequest))
}
return interceptor(ctx, in, info, handler)
}
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,
FullMethod: "/pulumirpc.ResourceProvider/Configure",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceProviderServer).Configure(ctx, req.(*ConfigureRequest))
}
return interceptor(ctx, in, info, handler)
}
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)
}
func _ResourceProvider_StreamInvoke_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(InvokeRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(ResourceProviderServer).StreamInvoke(m, &resourceProviderStreamInvokeServer{stream})
}
type ResourceProvider_StreamInvokeServer interface {
Send(*InvokeResponse) error
grpc.ServerStream
}
type resourceProviderStreamInvokeServer struct {
grpc.ServerStream
}
func (x *resourceProviderStreamInvokeServer) Send(m *InvokeResponse) error {
return x.ServerStream.SendMsg(m)
}
func _ResourceProvider_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CallRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ResourceProviderServer).Call(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.ResourceProvider/Call",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceProviderServer).Call(ctx, req.(*CallRequest))
}
return interceptor(ctx, in, info, handler)
}
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,
FullMethod: "/pulumirpc.ResourceProvider/Check",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceProviderServer).Check(ctx, req.(*CheckRequest))
}
return interceptor(ctx, in, info, handler)
}
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 23:50:02 +01:00
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
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 23:50:02 +01:00
}
info := &grpc.UnaryServerInfo{
Server: srv,
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 23:50:02 +01:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
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 23:50:02 +01:00
}
return interceptor(ctx, in, info, handler)
}
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,
FullMethod: "/pulumirpc.ResourceProvider/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceProviderServer).Create(ctx, req.(*CreateRequest))
}
return interceptor(ctx, in, info, handler)
}
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)
}
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 02:32:59 +02:00
in := new(UpdateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ResourceProviderServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.ResourceProvider/Update",
}
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 02:32:59 +02:00
return srv.(ResourceProviderServer).Update(ctx, req.(*UpdateRequest))
}
return interceptor(ctx, in, info, handler)
}
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,
FullMethod: "/pulumirpc.ResourceProvider/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceProviderServer).Delete(ctx, req.(*DeleteRequest))
}
return interceptor(ctx, in, info, handler)
}
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
func _ResourceProvider_Construct_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ConstructRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ResourceProviderServer).Construct(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.ResourceProvider/Construct",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceProviderServer).Construct(ctx, req.(*ConstructRequest))
}
return interceptor(ctx, in, info, handler)
}
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)
}
func _ResourceProvider_GetPluginInfo_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).GetPluginInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.ResourceProvider/GetPluginInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceProviderServer).GetPluginInfo(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _ResourceProvider_serviceDesc = grpc.ServiceDesc{
ServiceName: "pulumirpc.ResourceProvider",
HandlerType: (*ResourceProviderServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetSchema",
Handler: _ResourceProvider_GetSchema_Handler,
},
{
MethodName: "CheckConfig",
Handler: _ResourceProvider_CheckConfig_Handler,
},
{
MethodName: "DiffConfig",
Handler: _ResourceProvider_DiffConfig_Handler,
},
{
MethodName: "Configure",
Handler: _ResourceProvider_Configure_Handler,
},
{
MethodName: "Invoke",
Handler: _ResourceProvider_Invoke_Handler,
},
{
MethodName: "Call",
Handler: _ResourceProvider_Call_Handler,
},
{
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 23:50:02 +01: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 23:50:02 +01:00
},
{
MethodName: "Create",
Handler: _ResourceProvider_Create_Handler,
},
{
MethodName: "Read",
Handler: _ResourceProvider_Read_Handler,
},
{
MethodName: "Update",
Handler: _ResourceProvider_Update_Handler,
},
{
MethodName: "Delete",
Handler: _ResourceProvider_Delete_Handler,
},
Initial support for remote component construction. (#5280) These changes add initial support for the construction of remote components. For now, this support is limited to the NodeJS SDK; follow-up changes will implement support for the other SDKs. Remote components are component resources that are constructed and managed by plugins rather than by Pulumi programs. In this sense, they are a bit like cloud resources, and are supported by the same distribution and plugin loading mechanisms and described by the same schema system. The construction of a remote component is initiated by a `RegisterResourceRequest` with the new `remote` field set to `true`. When the resource monitor receives such a request, it loads the plugin that implements the component resource and calls the `Construct` method added to the resource provider interface as part of these changes. This method accepts the information necessary to construct the component and its children: the component's name, type, resource options, inputs, and input dependencies. It is responsible for dispatching to the appropriate component factory to create the component, then returning its URN, resolved output properties, and output property dependencies. The dependency information is necessary to support features such as delete-before-replace, which rely on precise dependency information for custom resources. These changes also add initial support for more conveniently implementing resource providers in NodeJS. The interface used to implement such a provider is similar to the dynamic provider interface (and may be unified with that interface in the future). An example of a NodeJS program constructing a remote component resource also implemented in NodeJS can be found in `tests/construct_component/nodejs`. This is the core of #2430.
2020-09-08 04:33:55 +02:00
{
MethodName: "Construct",
Handler: _ResourceProvider_Construct_Handler,
},
{
MethodName: "Cancel",
Handler: _ResourceProvider_Cancel_Handler,
},
{
MethodName: "GetPluginInfo",
Handler: _ResourceProvider_GetPluginInfo_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "StreamInvoke",
Handler: _ResourceProvider_StreamInvoke_Handler,
ServerStreams: true,
},
},
Metadata: "provider.proto",
}