Difference between revisions of "Terraform resource: time sleep"
Jump to navigation
Jump to search
(Created page with "https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep {{sleep}}") Tags: Mobile web edit, Mobile edit |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep | https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep | ||
+ | == Official examples == | ||
+ | <pre> | ||
+ | resource "aws_ram_resource_association" "example" { | ||
+ | resource_arn = aws_subnet.example.arn | ||
+ | resource_share_arn = aws_ram_resource_share.example.arn | ||
+ | } | ||
+ | # AWS resources shared via Resource Access Manager can take a few seconds to | ||
+ | # propagate across AWS accounts after RAM returns a successful association. | ||
+ | resource "time_sleep" "ram_resource_propagation" { | ||
+ | create_duration = "60s" | ||
+ | triggers = { | ||
+ | # This sets up a proper dependency on the RAM association | ||
+ | subnet_arn = aws_ram_resource_association.example.resource_arn | ||
+ | subnet_id = aws_subnet.example.id | ||
+ | } | ||
+ | } | ||
− | {{sleep}} | + | resource "aws_db_subnet_group" "example" { |
+ | name = "example" | ||
+ | |||
+ | # Read the Subnet identifier "through" the time_sleep resource to ensure a | ||
+ | # proper dependency and that both will change together. | ||
+ | subnet_ids = [time_sleep.ram_resource_propagation.triggers["subnet_id"]] | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | * [[Terraform EKS module]] | ||
+ | * [[Terraform AKS module]] | ||
+ | * [[Terraform provider: time]] | ||
+ | |||
+ | == See also == | ||
+ | * {{sleep}} | ||
+ | * {{tf}} | ||
+ | |||
+ | [[Category:Terraform]] |
Latest revision as of 16:45, 15 July 2024
https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/sleep
Official examples[edit]
resource "aws_ram_resource_association" "example" { resource_arn = aws_subnet.example.arn resource_share_arn = aws_ram_resource_share.example.arn } # AWS resources shared via Resource Access Manager can take a few seconds to # propagate across AWS accounts after RAM returns a successful association. resource "time_sleep" "ram_resource_propagation" { create_duration = "60s" triggers = { # This sets up a proper dependency on the RAM association subnet_arn = aws_ram_resource_association.example.resource_arn subnet_id = aws_subnet.example.id } } resource "aws_db_subnet_group" "example" { name = "example" # Read the Subnet identifier "through" the time_sleep resource to ensure a # proper dependency and that both will change together. subnet_ids = [time_sleep.ram_resource_propagation.triggers["subnet_id"]] }
See also[edit]
sleep, infinity
, Terraform resource: time_sleep- Terraform, OpenTofu, Terrakube.org, Installation, Terraform AWS, Terraform GCP, Terraform commands, Terraform Cloud, Terraform Enterprise (TFE), HCL, HIL, meta-arguments, providers, modules, resource, provisioners, data sources, backends: remote backends, examples, configuration files, state files, variables, types, Terraform Registry, conditionals:
depends_on
, functions, Blocks, dynamic blocks, errors, Terragrunt, Terraformer, Terratest, Terraform certifications, Terraform map type, Terraform Associate, Terraform: list type,TF_VAR_, TF_LOG
, Terraform provider versioning, Terraform Style Conventions, Required version, Terraform plugin, Terraform Named Values, tags, Changelog,tfsec, tflint
, Operators, Expressions:for, splat
, Debugging, Namespaces, Terraform Landing Zones, CDKTF, Atmos
Advertising: