mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
website: null_resource isn't a type of provisioner
This page is useful, but it's easier to tell what it's for if we put it next to the page about connections.
This commit is contained in:
parent
dfcd2fb00c
commit
b4042947d1
@ -1,24 +1,25 @@
|
|||||||
---
|
---
|
||||||
layout: "docs"
|
layout: "docs"
|
||||||
page_title: "Provisioners: null_resource"
|
page_title: "Provisioners Without a Resource"
|
||||||
sidebar_current: "docs-provisioners-null-resource"
|
sidebar_current: "docs-provisioners-null-resource"
|
||||||
description: |-
|
description: |-
|
||||||
The `null_resource` is a resource allows you to configure provisioners that
|
The `null_resource` is a resource allows you to configure provisioners that
|
||||||
are not directly associated with a single existing resource.
|
are not directly associated with a single existing resource.
|
||||||
---
|
---
|
||||||
|
|
||||||
# null\_resource
|
# Provisioners Without a Resource
|
||||||
|
|
||||||
The `null_resource` is a resource that allows you to configure provisioners
|
[null]: /docs/providers/null/resource.html
|
||||||
that are not directly associated with a single existing resource.
|
|
||||||
|
|
||||||
A `null_resource` behaves exactly like any other resource, so you configure
|
If you need to run provisioners that aren't directly associated with a specific
|
||||||
[provisioners](/docs/provisioners/index.html), [connection
|
resource, you can associate them with a `null_resource`.
|
||||||
details](/docs/provisioners/connection.html), and other meta-parameters in the
|
|
||||||
same way you would on any other resource.
|
|
||||||
|
|
||||||
This allows fine-grained control over when provisioners run in the dependency
|
Instances of [`null_resource`][null] are treated like normal resources, but they
|
||||||
graph.
|
don't do anything. Like with any other resource, you can configure
|
||||||
|
[provisioners](/docs/provisioners/index.html) and [connection
|
||||||
|
details](/docs/provisioners/connection.html) on a `null_resource`. You can also
|
||||||
|
use its `triggers` argument and any meta-arguments to control exactly where in
|
||||||
|
the dependency graph its provisioners will run.
|
||||||
|
|
||||||
## Example usage
|
## Example usage
|
||||||
|
|
||||||
@ -31,7 +32,7 @@ resource "aws_instance" "cluster" {
|
|||||||
|
|
||||||
resource "null_resource" "cluster" {
|
resource "null_resource" "cluster" {
|
||||||
# Changes to any instance of the cluster requires re-provisioning
|
# Changes to any instance of the cluster requires re-provisioning
|
||||||
triggers {
|
triggers = {
|
||||||
cluster_instance_ids = "${join(",", aws_instance.cluster.*.id)}"
|
cluster_instance_ids = "${join(",", aws_instance.cluster.*.id)}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,8 +53,9 @@ resource "null_resource" "cluster" {
|
|||||||
|
|
||||||
## Argument Reference
|
## Argument Reference
|
||||||
|
|
||||||
In addition to all the resource configuration available, `null_resource` supports the following specific configuration options:
|
In addition to meta-arguments supported by all resources, `null_resource`
|
||||||
|
supports the following specific arguments:
|
||||||
|
|
||||||
* `triggers` - A mapping of values which should trigger a rerun of this set of
|
* `triggers` - A map of values which should cause this set of provisioners to
|
||||||
provisioners. Values are meant to be interpolated references to variables or
|
re-run. Values are meant to be interpolated references to variables or
|
||||||
attributes of other resources.
|
attributes of other resources.
|
||||||
|
@ -327,6 +327,10 @@
|
|||||||
<a href="/docs/provisioners/connection.html">Provisioner Connections</a>
|
<a href="/docs/provisioners/connection.html">Provisioner Connections</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-provisioners-null-resource") %>>
|
||||||
|
<a href="/docs/provisioners/null_resource.html">Provisioners Without a Resource</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-provisioners-chef") %>>
|
<li<%= sidebar_current("docs-provisioners-chef") %>>
|
||||||
<a href="/docs/provisioners/chef.html">chef Provisioner</a>
|
<a href="/docs/provisioners/chef.html">chef Provisioner</a>
|
||||||
</li>
|
</li>
|
||||||
@ -343,10 +347,6 @@
|
|||||||
<a href="/docs/provisioners/local-exec.html">local-exec Provisioner</a>
|
<a href="/docs/provisioners/local-exec.html">local-exec Provisioner</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-provisioners-null-resource") %>>
|
|
||||||
<a href="/docs/provisioners/null_resource.html">null_resource Provisioner</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-provisioners-remote") %>>
|
<li<%= sidebar_current("docs-provisioners-remote") %>>
|
||||||
<a href="/docs/provisioners/remote-exec.html">remote-exec Provisioner</a>
|
<a href="/docs/provisioners/remote-exec.html">remote-exec Provisioner</a>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user