Movatterモバイル変換


[0]ホーム

URL:


HashiConf 2025Don't miss the live stream of HashiConf Day 2 happening now View live stream

Write Terraform Configuration

Learn Terraform configuration language by example. Write configurations to manage multiple pieces of infrastructure and iterate over structured data. Deploy and manage related infrastructure by referring to resources in other configurations.

20 tutorials
  • 11min
    Define infrastructure with Terraform resources
    Create an EC2 instance, then use the Terraform Registry to create a security group to make it publicly accessible. Learn how Terraform resources define infrastructure as code through arguments, attributes, and dependencies.
    • Terraform
    • Video
  • 20min
    Customize Terraform configuration with variables
    Use Terraform input variables, including lists, maps, strings, and booleans, to parameterize your Terraform configuration.
    • Terraform
  • 13min
    Protect sensitive input variables
    Protect sensitive values from accidental exposure using Terraform sensitive input variables. Provision a web application with Terraform, and mark input variables as sensitive to restrict when Terraform prints them out to the console.
    • Terraform
  • 10min
    Simplify Terraform configuration with locals
    Create Terraform local values with expressions to name resources and reduce configuration duplication. Then, combine local values and variables.
    • Terraform
  • 10min
    Output data from Terraform
    Use output values to export data about the resources Terraform manages. Hide sensitive output values.
    • Terraform
  • 14min
    Query data sources
    Use a data source to configure an EC2 instance with an appropriate AMI for the current region. Use a remote state data source to share data between Terraform projects and to support multiple availability zones.
    • Terraform
  • 10min
    Create resource dependencies
    Create an implicit dependency between an EC2 instance and its Elastic IP using variable interpolation. Create explicit dependencies on an S3 Bucket and SQS Queue with depends_on. Learn how Terraform creates independent resources in parallel.
    • Terraform
  • 10min
    Manage similar resources with count
    Create a VPC with a load balancer and EC2 instances. Use the `count` meta-argument to provision multiple resources from the same configuration.
    • Terraform
  • 15min
    Manage similar resources with for each
    Provision similar infrastructure components by iterating over a data structure with the for_each argument. Duplicate an entire VPC including a load balancer and multiple EC2 instances for each project defined in a map.
    • Terraform
  • 12min
    Perform dynamic operations with functions
    Use templatefile and lookup functions to generate dynamic user data for an EC2 instance and find a region-specific AMI.
    • Terraform
  • 11min
    Create dynamic expressions
    Use locals to assign expressions to variables for reuse, conditionals to declare if/then scenarios, and the splat expression to return attributes from complex value types.
    • Terraform
  • 11min
    Lock and upgrade provider versions
    Manage your provider versions using the dependency lock file. Use version constraints to filter provider versions compatible with your configuration. Update your lock file to use a new provider version.
    • Terraform
  • 17min
    Troubleshoot Terraform
    Interpret and fix a Terraform configuration with common configuration language errors and deploy an EC2 instance with security groups in AWS. Learn best practices for logging application errors and reporting bugs.
    • Terraform
  • 10min
    Manage Terraform versions
    Update an existing configuration to work with a newer version of Terraform. Use the required_version setting to pin the Terraform versions for your projects. Manage different versions of Terraform across your team.
    • Terraform
  • 14min
    Use configuration to move resources
    Use the configuration-driven workflow to change Terraform resource IDs. Refactor configuration to move resources into modules using the `moved` block.
    • Terraform
  • 16min
    Validate modules with custom conditions
    Add a precondition and postcondition to a module to validate downstream usage, ensuring that DNS and EBS support are enabled, and that the appropriate number of subnets are configured.
    • Terraform
  • 17min
    Customize modules with object attributes
    Refactor a local module to organize related attributes with objects and make some attributes optional for module users.
    • Terraform
  • 14min
    Use checks to validate infrastructure
    Use check blocks to define and evaluate assertions about your environment and resources.
    • Terraform
  • 18min
    Write Terraform Tests
    Write tests to validate the behavior of your Terraform module configuration.
    • Terraform
  • 37min
    Configure Terraform providers
    Source, version, configure, and authenticate Terraform providers. Use provider aliases for multiple configurations across regions and configure provider inheritance in child modules.
    • Terraform

[8]ページ先頭

©2009-2025 Movatter.jp