This change modifies the existing resource provider RPC interface slightly. Instead of the Create API returning the bag of output properties, we will rely on the Get API to do so. As a result, this change takes an initial whack at implementing Get on all existing AWS resources. The Get API needs to return a fully populated structure containing all inputs and outputs. Believe it or not, this is actually part of pulumi/lumi#90. This was done because just returning output properties is insufficient. Any input properties that weren't supplied may have default values, for example, and it is wholly reasonable to expect Lumi scripts to depend on those values in addition to output values. This isn't fully functional in its current form, because doing this change turned up many other related changes required to enable output properties. For instance, at the moment resource properties are defined in terms of `resource.URN`s, and yet unfortunately the provider side knows nothing of URNs (instead preferring to deal in `resource.ID`s). I am going to handle that in a subsequent isolated change, since it will have far-reaching implications beyond just modifying create and get.
32 lines
1,019 B
Go
32 lines
1,019 B
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 convutil
|
|
|
|
func Int64PToFloat64P(v *int64) *float64 {
|
|
if v == nil {
|
|
return nil
|
|
}
|
|
cv := float64(*v)
|
|
return &cv
|
|
}
|
|
|
|
func Float64PToInt64P(v *float64) *int64 {
|
|
if v == nil {
|
|
return nil
|
|
}
|
|
cv := int64(*v)
|
|
return &cv
|
|
}
|