Example of provider options docs
data.null_data_source
The null_data_source data source implements the standard data source lifecycle but does not
interact with any external APIs.
Historically, the null_data_source was typically used to construct intermediate values to re-use elsewhere in configuration. The
same can now be achieved using locals or the terraform_data resource type in Terraform 1.4 and later.
Type:
attribute set of (submodule)
Default value:
unset
Declared in:
data.null_data_source.<name>.count
Used to create multiple instances of this resource/data.
Type:
reference or signed integer
Default value:
unset
Declared in:
data.null_data_source.<name>.depends_on
Explicit dependency references. Use this to declare hidden dependencies that OpenTofu cannot automatically infer.
Type:
list of (string or (attribute set) convertible to it)
Default value:
unset
Declared in:
data.null_data_source.<name>.for_each
Used to create multiple instances of this resource/data from a map or set.
Type:
reference or attribute set of string or list of string
Default value:
unset
Declared in:
data.null_data_source.<name>.has_computed_default
If set, its literal value will be stored and returned. If not, its value defaults to "default". This argument exists primarily for testing and has little practical use.
Type:
reference or string
Default value:
unset
Declared in:
data.null_data_source.<name>.id
This attribute is only present for some legacy compatibility issues and should not be used. It will be removed in a future version.
Type:
reference or string
Default value:
unset
Declared in:
data.null_data_source.<name>.inputs
A map of arbitrary strings that is copied into the outputs attribute, and accessible directly for interpolation.
Type:
reference or attribute set of (reference or string)
Default value:
unset
Declared in:
data.null_data_source.<name>.outputs
After the data source is "read", a copy of the inputs map.
Type:
reference or attribute set of (reference or string)
Default value:
unset
Declared in:
data.null_data_source.<name>.provider
Provider reference for selecting a non-default provider configuration.
Type:
string
Default value:
unset
Example value:
"aws.west"
Declared in:
data.null_data_source.<name>.random
A random value. This is primarily for testing and has little practical use; prefer the hashicorp/random provider for more practical random number use-cases.
Type:
reference or string
Default value:
unset
Declared in:
provider.null
Type:
attribute set of (submodule)
Default value:
unset
Declared in:
provider.null.<name>.alias
Alias for this terraform provider. Automatically set to "‹name›".
Type:
string
Default value:
unset
Declared in:
provider.null.<name>.id
ID of provider, read only. Only returns a terraform reference string.
Type:
string
Default value:
"${null.‹name›}"
Declared in:
resource.null_resource
The null_resource resource implements the standard resource lifecycle but takes no further action. On Terraform 1.4 and later, use the terraform_data resource type instead. Terraform 1.9 and later support the moved configuration block from null_resource to terraform_data.
The triggers argument allows specifying an arbitrary set of values that, when changed, will cause the resource to be replaced.
Type:
attribute set of (submodule)
Default value:
unset
Declared in:
resource.null_resource.<name>.count
Used to create multiple instances of this resource/data.
Type:
reference or signed integer
Default value:
unset
Declared in:
resource.null_resource.<name>.depends_on
Explicit dependency references. Use this to declare hidden dependencies that OpenTofu cannot automatically infer.
Type:
list of (string or (attribute set) convertible to it)
Default value:
unset
Declared in:
resource.null_resource.<name>.for_each
Used to create multiple instances of this resource/data from a map or set.
Type:
reference or attribute set of string or list of string
Default value:
unset
Declared in:
resource.null_resource.<name>.id
This is set to a random value at create time.
Type:
reference or string
Default value:
unset
Declared in:
resource.null_resource.<name>.lifecycle
Lifecycle customizations for this resource.
Type:
submodule
Default value:
unset
Declared in:
resource.null_resource.<name>.lifecycle.create_before_destroy
When true, the new replacement object is created first before destroying the old one.
Type:
boolean
Default value:
unset
resource.null_resource.<name>.lifecycle.destroy
When false, OpenTofu will "forget" the resource instead of destroying it.
Type:
boolean
Default value:
unset
resource.null_resource.<name>.lifecycle.enabled
Controls whether a resource is created and managed by OpenTofu.
When false, the resource is excluded as if it did not exist.
Type:
reference or boolean
Default value:
unset
resource.null_resource.<name>.lifecycle.ignore_changes
List of attribute names to ignore during updates, or "all" to ignore all attributes.
Type:
value "all" (singular enum) or list of string
Default value:
unset
resource.null_resource.<name>.lifecycle.postconditions
Postconditions that must be met after applying changes.
Type:
list of (submodule)
Default value:
unset
resource.null_resource.<name>.lifecycle.postconditions.*.condition
A condition expression that must evaluate to true for the check to pass.
Type:
reference or string
resource.null_resource.<name>.lifecycle.postconditions.*.error_message
Error message displayed when the condition evaluates to false.
Type:
string
resource.null_resource.<name>.lifecycle.preconditions
Preconditions that must be met before applying changes.
Type:
list of (submodule)
Default value:
unset
resource.null_resource.<name>.lifecycle.preconditions.*.condition
A condition expression that must evaluate to true for the check to pass.
Type:
reference or string
resource.null_resource.<name>.lifecycle.preconditions.*.error_message
Error message displayed when the condition evaluates to false.
Type:
string
resource.null_resource.<name>.lifecycle.prevent_destroy
When true, OpenTofu will reject any plan that would destroy this resource.
Type:
reference or boolean
Default value:
unset
resource.null_resource.<name>.lifecycle.replace_triggered_by
List of resource or attribute references that trigger replacement of this resource when changed.
Type:
list of string
Default value:
unset
resource.null_resource.<name>.provider
Provider reference for selecting a non-default provider configuration.
Type:
string
Default value:
unset
Example value:
"aws.west"
Declared in:
resource.null_resource.<name>.triggers
A map of arbitrary strings that, when changed, will force the null resource to be replaced, re-running any associated provisioners.
Type:
reference or attribute set of (reference or string)
Default value:
unset
Declared in: