comment fixes
This commit is contained in:
parent
a681124301
commit
89b2c6f21e
|
@ -610,7 +610,6 @@ func (s *GRPCProviderServer) ApplyResourceChange(_ context.Context, req *proto.A
|
||||||
Type: req.TypeName,
|
Type: req.TypeName,
|
||||||
}
|
}
|
||||||
|
|
||||||
//priorState := terraform.NewInstanceStateShimmedFromValue(priorStateVal, res.SchemaVersion)
|
|
||||||
priorState, err := res.ShimInstanceStateFromValue(priorStateVal)
|
priorState, err := res.ShimInstanceStateFromValue(priorStateVal)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)
|
resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)
|
||||||
|
|
|
@ -450,11 +450,6 @@ func (d *InstanceDiff) Apply(attrs map[string]string, schema *configschema.Block
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *InstanceDiff) applyDiff(attrs map[string]string, schema *configschema.Block) (map[string]string, error) {
|
func (d *InstanceDiff) applyDiff(attrs map[string]string, schema *configschema.Block) (map[string]string, error) {
|
||||||
// We always build a new value here, even if the given diff is "empty",
|
|
||||||
// because we might be planning to create a new instance that happens
|
|
||||||
// to have no attributes set, and so we want to produce an empty object
|
|
||||||
// rather than just echoing back the null old value.
|
|
||||||
|
|
||||||
// Rather applying the diff to mutate the attrs, we'll copy new values into
|
// Rather applying the diff to mutate the attrs, we'll copy new values into
|
||||||
// here to avoid the possibility of leaving stale values.
|
// here to avoid the possibility of leaving stale values.
|
||||||
result := map[string]string{}
|
result := map[string]string{}
|
||||||
|
@ -513,7 +508,6 @@ func (d *InstanceDiff) applyAttrDiff(attrName string, oldAttrs map[string]string
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// skip "id", as we already handled it
|
|
||||||
if attrName == "id" {
|
if attrName == "id" {
|
||||||
if old == "" {
|
if old == "" {
|
||||||
result["id"] = config.UnknownVariableValue
|
result["id"] = config.UnknownVariableValue
|
||||||
|
|
Loading…
Reference in New Issue