Difference between revisions of "Terraform"

From wikieduonline
Jump to navigation Jump to search
Line 51: Line 51:
  
 
== Common Terraform commands<ref>https://www.terraform.io/docs/commands/index.html</ref> ==
 
== Common Terraform commands<ref>https://www.terraform.io/docs/commands/index.html</ref> ==
<pre>
 
    apply              Builds or changes infrastructure
 
    console            Interactive console for Terraform interpolations
 
    destroy            Destroy Terraform-managed infrastructure
 
    fmt                Rewrites config files to canonical format
 
    get                Download and install modules for the configuration
 
    graph              Create a visual graph of Terraform resources
 
    import            Import existing infrastructure into Terraform
 
    init              Initialize a new or existing Terraform configuration
 
    output            Read an output from a state file
 
    plan              Generate and show an execution plan
 
    providers          Prints a tree of the providers used in the configuration
 
    push              Upload this Terraform module to Terraform Enterprise to run
 
    refresh            Update local state file against real resources
 
    show              Inspect Terraform state or plan
 
    taint              Manually mark a resource for recreation
 
    untaint            Manually unmark a resource as tainted
 
    validate          Validates the Terraform files
 
    version            Prints the Terraform version
 
    workspace          Workspace management
 
</pre>
 
  
 +
    apply              Builds or changes infrastructure
 +
    console            Interactive console for Terraform interpolations
 +
    destroy            Destroy Terraform-managed infrastructure
 +
    fmt                Rewrites config files to canonical format
 +
    get                Download and install modules for the configuration
 +
    graph              Create a visual graph of Terraform resources
 +
    import            Import existing infrastructure into Terraform
 +
    init              Initialize a new or existing Terraform configuration
 +
    output            Read an output from a state file
 +
    plan              Generate and show an execution plan
 +
    providers          Prints a tree of the providers used in the configuration
 +
    push              Upload this Terraform module to Terraform Enterprise to run
 +
    refresh            Update local state file against real resources
 +
    show              Inspect Terraform state or plan
 +
    taint              Manually mark a resource for recreation
 +
    untaint            Manually unmark a resource as tainted
 +
    validate          Validates the Terraform files
 +
    version            Prints the Terraform version
 +
    workspace          Workspace management
 +
 +
All other commands:
 +
    0.12upgrade        Rewrites pre-0.12 module source code for v0.12
 +
    0.13upgrade        Rewrites pre-0.13 module source code for v0.13
 +
    debug              Debug output management (experimental)
 +
    force-unlock      Manually unlock the terraform state
 +
    push              Obsolete command for Terraform Enterprise legacy (v1)
 +
    state              Advanced state management
  
 
== Activities ==
 
== Activities ==

Revision as of 11:16, 11 March 2021

wikipedia:Terraform (software) (2014) is an open-source infrastructure as code software.


Technical characteristics

  • HCL2 based
  • Types: strings, number, bool, list, maps, set, tuple, object, any and null (Terraform 0.12)


Supported platforms/providers

Installation


Review version:

terraform -v
Terraform v0.13.5

Running terraform

terraform init
terraform plan
terraform apply
terraform remote config
terraform destroy

Common Terraform commands[1]

    apply              Builds or changes infrastructure
    console            Interactive console for Terraform interpolations
    destroy            Destroy Terraform-managed infrastructure
    fmt                Rewrites config files to canonical format
    get                Download and install modules for the configuration
    graph              Create a visual graph of Terraform resources
    import             Import existing infrastructure into Terraform
    init               Initialize a new or existing Terraform configuration
    output             Read an output from a state file
    plan               Generate and show an execution plan
    providers          Prints a tree of the providers used in the configuration
    push               Upload this Terraform module to Terraform Enterprise to run
    refresh            Update local state file against real resources
    show               Inspect Terraform state or plan
    taint              Manually mark a resource for recreation
    untaint            Manually unmark a resource as tainted
    validate           Validates the Terraform files
    version            Prints the Terraform version
    workspace          Workspace management

All other commands:
    0.12upgrade        Rewrites pre-0.12 module source code for v0.12
    0.13upgrade        Rewrites pre-0.13 module source code for v0.13
    debug              Debug output management (experimental)
    force-unlock       Manually unlock the terraform state
    push               Obsolete command for Terraform Enterprise legacy (v1)
    state              Advanced state management

Activities

  1. Read Terraform blog: https://www.hashicorp.com/blog/category/terraform/
  2. Read Terraform: Up & Running, 2nd edition Early Release is now available! https://blog.gruntwork.io/terraform-up-running-2nd-edition-early-release-is-now-available-b104fc29783f
  3. Terraform: Hello_world.tf
  4. Terraform, read files

Related

See also

  • https://www.terraform.io/docs/commands/index.html
  • Advertising: