Terraform
Jump to navigation
Jump to search
↑ https://www.hashicorp.com/blog/announcing-providers-in-the-new-terraform-registry
↑ https://www.hashicorp.com/blog/hashicorp-terraform-module-registry
↑ https://www.terraform.io/docs/commands/index.html
wikipedia:Terraform (software) (July 2014) is an open-source infrastructure as code software.
- Terraform Registry (Jan 2020) [1]
- Terraform Cloud (September 2019)
- Terraform Enterprise
- Terraform Module Registry (2017) [2]
Contents
Technical characteristics[edit]
- Hashicorp Configuration Language (HCL)2 based
- Terraform types:
strings, number, bool, list, maps, set, tuple, object, any and null
(Terraform 0.12)
Supported platforms/providers[edit]
- AWS: AWS EKS, GCP, IBM Cloud, DigitalOcean, Azure: Azure Stack, AzureRM, OpenStack, ServiceNow, F5 Networks, Nutanix, Tecent Cloud, Helm, Oracle OCI, Brightbox, RightScale, Linode, SkyTap, UCloud, Hedvig, Zabbix, Rollbar
Installation[edit]
- macOS:
brew install terraform
. - Ubuntu:
snap install terraform
orsnap install terraform-snap
- Linux:
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common curl
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get -qq update && sudo apt-get install terraform && terraform -v
Ref: https://learn.hashicorp.com/tutorials/terraform/install-cli
Terraform commands[edit]
terraform init
terraform console
terraform fmt
terraform fmt -check
terraform validate
terraform import
terraform plan
terraform apply
terraform remote config
terraform destroy
terraform show
terraform login
terraform add
(1.1.0, xx/2021)
Common Terraform commands[3][edit]
Activities[edit]
- Create you first AWS instances with Terraform tutorial: https://learn.hashicorp.com/tutorials/terraform/aws-build?in=terraform/aws-get-started
- Read Terraform blog: https://www.hashicorp.com/blog/category/terraform/
- Read Stackoverflow questions: https://stackoverflow.com/questions/tagged/terraform?tab=Votes
- 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
- Review some Terraform examples
Related terms[edit]
- HCL and HCL2
- Terraform: Meta-Arguments:
count
parameter for iterations,depends_on
- Terraform conditional expressions
- Terraform functions:
templatefile
,join
,output
, Splat expression - Terraform data sources, Terraform providers, Terraform modules
- Terraform resources: https://www.terraform.io/docs/language/resources/index.html
- Remote state backends to manage Terraform state
- Terragrunt, Terraformer, terratest
- Releases: https://github.com/hashicorp/terraform/releases
artifacts:reports:terraform
- Terraform Cloud Operator
- Terraform examples: Terraform: Hello world.tf
- Terraform Associate: Understand secret management in state files
- Terraform deprecated commands
- CLI Configuration File
- Terraform VCS
See also[edit]
- RDS:
aws_db_instance
- ECS:
aws_ecs_service
,aws_appautoscaling_target
,aws_appautoscaling_policy
- Misc:
aws_cloudfront_distribution
,aws_cloudfront_origin_access_identity
,cidr_block
,aws codedeploy app
,aws_nat_gateway
,aws_internet_gateway
,aws_kms_key
,aws_rds_cluster
,ecs_task_definition
,aws_subnet
,aws db subnet group
,aws_rds_cluster
,aws_s3_bucket
,aws_ecs_task_definition
,aws_codebuild source credential
,aws_s3_bucket_Jump to_navigationJump_to_search
,gitlab_deploy_token
,aws_acm_certificate
,aws_vpn_connection
,aws_ec2_client_vpn_endpoint, Terraform resources: aws_backup, aws organizations account
terraform
[fmt
|apply
|show
|state
|init | plan | console | output
|validate
|destroy
|debug
|import
|providers
|get
|graph
|workspaces
|resource
|login
|-var-file
|state mv
|state pull
|state push
|state replace-provider
|state rm
|force-unlock
|env
|tfe
|--version
|remote-exec
|delete on termination
| deprecated commands |terraform --help
]- Terraform, 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, splat expression, 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, Changelog - IaC: Terraform, Chef, cdist, capistrano, Harrow, puppet, Ansible, CFEngine, Cloud Deployment Manager, pulumi, juju, SaltStack, Azure Resource Manager (ARM), Google Deployment Manager, AWS CloudFormation, Pulumi, Heat, Spacelift