diff --git a/README.md b/README.md index de8360e..94688dd 100644 --- a/README.md +++ b/README.md @@ -2359,6 +2359,12 @@ The benefits of Terraform over the other tools:
Explain what is "Terraform configuration"
+A configuration is a root module along with a tree of child modules that are called as dependencies from the root module. +
+ +
+What is HCL?
+HCL stands for Hashicorp Conviguration Language. It is the language Hashicorp made to use as the configuration language for a number of its tools, including terraform.
@@ -2390,6 +2396,7 @@ It keeps track of the IDs of created resources so that Terraform knows what it i terraform init scans your code to figure which providers are you using and download them. terraform plan will let you see what terraform is about to do before actually doing it. +terraform validate checks if configuration is syntactically valid and internally consistent within a directory. terraform apply will provision the resources specified in the .tf files.
@@ -2424,18 +2431,29 @@ It's a resource which was successfully created but failed during provisioning. T
What types of variables are supported in Terraform?
-String -Integer -Map -List +string +number +bool +list() +set() +map() +object({ = , ... }) +tuple([, ...])
What is a data source? In what scenarios for example would need to use it?
+Data sources lookup or compute values that can be used elsewhere in terraform configuration. + +There are quite a few cases you might need to use them: +* you want to reference resources not managed through terraform +* you want to reference resources managed by a different terraform module +* you want to cleanly compute a value with typechecking, such as with aws_iam_policy_document
What are output variables and what terraform output does?
+Output variables are named values that are sourced from the attributes of a module. They are stored in terraform state, and can be used by other modules through remote_state
@@ -2462,7 +2480,7 @@ List
Explain "State Locking"
- State locking is a mechanism that blocks an operations against a specific state file from multiple callers so as to avoid conflicting operations from different team members. Once the first caller's operation's lock is released the other team member may go ahead to + State locking is a mechanism that blocks an operations against a specific state file from multiple callers so as to avoid conflicting operations from different team members. Once the first caller's operation's lock is released the other team member may go ahead to carryout his own operation. Nevertheless Terraform will first check the state file to see if the desired resource already exist and if not it goes ahead to create it.
@@ -2472,6 +2490,17 @@ List The random provider aids in generating numeric or alphabetic characters to use as a prefix or suffix for a desired named identifier.
+
+How do you test a terraform module?
+ Many examples are acceptable, but the most common answer would likely to be using the tool terratest, and to test that a module can be initialized, can create resources, and can destroy those resources cleanly. +
+ +
+Aside from .tfvars files or CLI arguments, how can you inject dependencies from other modules?
+ The built-in terraform way would be to use remote-state to lookup the outputs from other modules. + It is also common in the community to use a tool called terragrunt to explicitly inject variables between modules. +
+ ## Docker