This change fixes up a few things so that updates correctly deal with output properties. This involves a few things: 1) All outputs stored on the pre snapshot need to get propagated to the post snapshot during planning at various points. This ensures that the diffing logic doesn't need to be special cased everywhere, including both the Lumi and the provider sides. 2) Names are changed to "input" properties (using a new `lumi` tag option, `in`). These are properties that providers are expected to know nothing about, which we must treat with care during diffs. 3) We read back properties, via Get, after doing an Update just like we do after performing a Create. This ensures that if an update has a cascading impact on other properties, it will be detected. 4) Inspecting a change, prior to updating, must be done using the computed property set instead of the real one. This is to avoid mutating the resource objects ahead of actually applying a plan, which would be wrong and misleading.
26 lines
1 KiB
Go
26 lines
1 KiB
Go
// Licensed to Pulumi Corporation ("Pulumi") under one or more
|
|
// contributor license agreements. See the NOTICE file distributed with
|
|
// this work for additional information regarding copyright ownership.
|
|
// Pulumi licenses this file to You under the Apache License, Version 2.0
|
|
// (the "License"); you may not use this file except in compliance with
|
|
// the License. You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
package idl
|
|
|
|
// Resource is a marker struct to indicate that an IDL struct is a resource.
|
|
type Resource struct {
|
|
}
|
|
|
|
// NamedResource is a marker struct to indicate that an IDL struct is a named resource.
|
|
type NamedResource struct {
|
|
Name *string `lumi:"name,replaces,in"`
|
|
}
|