Difference between revisions of "Terraform apply"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
(54 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
− | [[terraform]] apply | + | {{lowercase}} |
+ | * https://www.terraform.io/docs/cli/commands/apply.html | ||
+ | {{terraform flow}} | ||
+ | == Options == | ||
+ | * <code>[[terraform]] apply</code> | ||
+ | * <code>[[terraform apply --help]]</code> | ||
+ | * <code>[[terraform apply -auto-approve]]</code> | ||
+ | * <code>[[terraform apply -refresh-only]]</code> | ||
+ | * <code>terraform apply [[-var]]="[[image_id]]=ami-abc123"</code> | ||
+ | * <code>terraform apply [[-var]]="[[image_id]]=ami-abc123 [[-var]]="your_second_var=yourvalue"</code> | ||
+ | * <code>terraform apply [[-var-file]]="your_file[[.tfvars]]"</code> | ||
+ | * <code>[[terraform apply -destroy]]</code> | ||
+ | * <code>[[terraform apply -replace]]="aws_instance.example[0]"</code> | ||
− | + | Only apply to specific resources: | |
− | + | * <code>[[terraform apply -target]]</code> | |
− | + | [[excluded]] related term | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | < | + | == Execution examples == |
− | + | * <code>[[terraform apply: ec2 instance example (aws instance)]]</code> | |
− | + | * <code>[[terraform apply: modifying ec2 instance size]]</code> | |
− | Terraform | + | * [[Terraform apply examples with errors]] |
− | + | == Related terms == | |
− | + | * <code>[[terraform show]]</code> | |
− | + | * <code>[[main.tf]], [[variables.tf]]</code> | |
− | + | * <code>[[terraform init]]</code> | |
− | + | * <code>[[terraform destroy]]</code> | |
− | + | * [[Terraform: Hello world.tf]] | |
− | + | * <code>[[Error: failed to render]]</code> | |
− | + | * <code>[[aws cloudformation deploy]]</code> | |
− | + | * [[Deploy EKS cluster using Terraform]] | |
− | + | * <code>[[terragrunt run-all apply]]</code> | |
− | + | * [[aws instance.your instance name will be updated in-place]] | |
− | |||
− | |||
− | |||
− | </ | ||
− | |||
− | < | ||
− | terraform | ||
− | |||
− | Error: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </ | ||
− | |||
− | |||
− | * <code>[[ | ||
== See also == | == See also == | ||
− | * {{ | + | * {{main.tf}} |
− | * {{terraform}} | + | * {{terraform apply}} |
[[Category:Terraform]] | [[Category:Terraform]] |
Latest revision as of 21:07, 22 March 2023
terraform init
->terraform plan
->terraform apply
->terraform show
Options[edit]
terraform apply
terraform apply --help
terraform apply -auto-approve
terraform apply -refresh-only
terraform apply -var="image_id=ami-abc123"
terraform apply -var="image_id=ami-abc123 -var="your_second_var=yourvalue"
terraform apply -var-file="your_file.tfvars"
terraform apply -destroy
terraform apply -replace="aws_instance.example[0]"
Only apply to specific resources:
excluded related term
Execution examples[edit]
Related terms[edit]
terraform show
main.tf, variables.tf
terraform init
terraform destroy
- Terraform: Hello world.tf
Error: failed to render
aws cloudformation deploy
- Deploy EKS cluster using Terraform
terragrunt run-all apply
- aws instance.your instance name will be updated in-place
See also[edit]
Advertising: