objchange

package
v3.0.0-...-18a6489 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2023 License: Apache-2.0, MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Code copied from https://github.com/hashicorp/terraform.git by go generate; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PlannedDataResourceObject

func PlannedDataResourceObject(schema *configschema.Block, config cty.Value) cty.Value

PlannedDataResourceObject is similar to proposedNewBlock but tailored for planning data resources in particular. Specifically, it replaces the values of any Computed attributes not set in the configuration with an unknown value, which serves as a placeholder for a value to be filled in by the provider when the data resource is finally read.

Data resources are different because the planning of them is handled entirely within Terraform Core and not subject to customization by the provider. This function is, in effect, producing an equivalent result to passing the proposedNewBlock result into a provider's PlanResourceChange function, assuming a fixed implementation of PlanResourceChange that just fills in unknown values as needed.

func ProposedNew

func ProposedNew(schema *configschema.Block, prior, config cty.Value) cty.Value

ProposedNew constructs a proposed new object value by combining the computed attribute values from "prior" with the configured attribute values from "config".

Both value must conform to the given schema's implied type, or this function will panic.

The prior value must be wholly known, but the config value may be unknown or have nested unknown values.

The merging of the two objects includes the attributes of any nested blocks, which will be correlated in a manner appropriate for their nesting mode. Note in particular that the correlation for blocks backed by sets is a heuristic based on matching non-computed attribute values and so it may produce strange results with more "extreme" cases, such as a nested set block where _all_ attributes are computed.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL