Spec-Zone.ru › OpenTofu 1.12

Resources

Resources are the most important element in the OpenTofu language. Each resource block describes one or more infrastructure objects, such as virtual networks, compute instances, or higher-level components such as DNS records.

This section discusses the main kind of resource, known as a "managed resource", which represents an infrastructure object managed by OpenTofu.

  • Resource Blocks documents the syntax for declaring resources.

  • Resource Behavior explains in more detail how OpenTofu handles resource declarations when applying a configuration.

  • The Meta-Arguments section documents special arguments that can be used with any managed resource type, including depends_on, count, for_each, provider, and lifecycle.

  • Provisioners are post-creation actions for a resource using the provisioner and connection blocks. Since provisioners are non-declarative and potentially unpredictable, we strongly recommend that you treat them as a last resort.

There are two other kinds of resources that play different roles within an OpenTofu configuration:

  • Data resources declare that a configuration depends on information read from a data source outside of the configuration.
  • Ephemeral resources declare transient objects that are opened only for the duration of a single OpenTofu phase, such as temporary session credentials.

Copyright (c) The OpenTofu Authors
Copyright (c) 2014 HashiCorp, Inc.
Mozilla Public License, version 2.0
https://opentofu.org/docs/v1.12/language/resources/

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API