GoConqr has a new look! Let us know what you think.

Flashcards

8 Terraform remote state

Archimed Nemes Kodekloud Terraform basics Easy English 16 cards

Cards in this deck (16)

  1. 1What is name of feature that prevents using terraform apply command in two terminals simulataneouslystate locking
  2. 2What is advantage of remote state backendTerraform load and upload statefile
    and state locking is supported
  3. 3What do we need for remote backend with s3?s3 bucket and dynamo db table
  4. 4Why Dynamo DB table is needed?In order to implement state locking
  5. 5What should we keep note of after creation of S3 and Dynamo DB table?Bucket name
    Key
    Region
    Dynamo DB table name
  6. 6Configure remote bakcend stateCreate separate terraform.tf file
    terraform {
    backend "s3" {
    bucket ="kodekloud -terraform -state -bucket01"
    key ="finance/ terraform.tfstate "
    region region ="us -west-1"
    dynamodb_table = "state -locking"
    }
    }
  7. 7What does key represent?The folder in which state file is stored
  8. 8What we should do after copying ocnfiguration to remote backend?delete tf state file
    rm-rf terraform.tfstate
  9. 9What is terraform state general commandterraform state [options][args]
  10. 10What are subcommands?list
    mv
    pull
    rm
    show
  11. 11List resources recoreded within TF state fileterraform state list
  12. 12List aws s3 bucket named finance-1111 in TF state fileterraform state list aws_s3_bucket.finance-1111
  13. 13Display detailed information about aws s3 bucket finance-1111 in state fileterraform state show aws_s3_bucket.finance-1111
  14. 14Rename state-locking dyname table to state-locking-db using terraform stateterraform state mv aws_dynamodb_table.state-locking aws_dynamodb_table.state-locking-db
    then rename it config file (main.tf)
  15. 15View the contents of remote state fileterraform state pull
  16. 16Remove resource fro terrasorm stateterraform state rm ADDRESS
    (example aws_s3_bucket.finance-1111)
    then remove from config file

Information

Description
Easy Kodekloud Terraform basics Flashcards on 8 Terraform remote state, created by Archimed Nemes on 18/12/2022.
Created by
Archimed Nemes
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?