Code Monkey home page Code Monkey logo

iac-with-terraform's Introduction

IAC-with-Terraform

Terraform is an open-source infrastructure as code software tool created by HashiCorp. It allows users to define and provision infrastructure using a simple, human-readable language called HashiCorp Configuration Language (HCL), and to manage popular service providers as well as custom in-house solutions.

To run Terraform, you will first need to install it on your system. This can typically be done by downloading the appropriate binary for your system from the Terraform website (https://developer.hashicorp.com/terraform/downloads), and then adding it to your system's PATH.

Once Terraform is installed, you can run it by executing the "terraform" command in your command line interface (CLI).

  1. terraform init The terraform init command is used to initialize a new or existing Terraform working directory. It downloads and installs the required providers and modules as specified in your configuration files.
terraform init
  1. terraform fmt The terraform fmt command is used to format your Terraform configuration files in a standardized way. It ensures that your files are properly indented and have consistent spacing.
terraform fmt
  1. terraform plan The terraform plan command is used to create an execution plan. It shows you what changes Terraform will make to your infrastructure. It's a dry run of the terraform apply command.
terraform plan
  1. terraform validate The terraform validate command is used to validate the syntax of the Terraform configuration files. It checks whether the configuration files are properly formatted and whether they adhere to the provider's requirements.
terraform validate
  1. terraform apply The terraform apply command is used to apply the changes to your infrastructure. It creates, modifies, or deletes resources as needed to match your desired state.
terraform apply
  1. terraform destroy The terraform destroy command is used to destroy the resources that Terraform manages. It will delete all the resources that were created by the terraform apply command.
terraform destroy
  1. terraform state The terraform state command is used to manage the Terraform state file. It allows you to inspect, modify, and remove resources from the state file.
terraform state list
terraform state show <resource_name>
  1. terraform output The terraform output command is used to print the values of the output variables defined in the Terraform configuration files. This can be useful to inspect the output of a terraform apply command.
terraform output <output_variable_name>
  1. terraform import The terraform import command is used to import existing resources into the Terraform state file. It allows you to manage existing resources that were not created by Terraform.
terraform import <resource_type>.<resource_name> <resource_id>
  1. terraform providers The terraform providers command is used to list the installed providers and their versions. It also allows you to install or upgrade a provider.
 terraform providers
 terraform init -upgrade
 

iac-with-terraform's People

Contributors

krishh2512 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.