Hello and thank you for your answers.
@Tej_Singh_Rana , according to the error we need to specify one argument, I agree.
According to the documentation, none of these arguments are mandatory. Only filename is.
The solution of the lab, only has the filename argument.
These are my details:
Lab: Resource Dependencies
Step 9:
iac-server $ pwd
/root/terraform-projects/explicit-dependency
iac-server $ ls -lrta
total 8
drwxr-xr-x 4 root root 4096 Mar 18 21:21 …
drwxr-xr-x 2 root root 4096 Mar 18 21:21 .
main.tf (as per the solution suggested)
resource “local_file” “whale” {
filename = “/root/whale”
depends_on = [local_file.krill]
}
resource “local_file” “krill” {
filename = “/root/krill”
}
iac-server $ terraform init
Initializing the backend…
Initializing provider plugins…
- Finding latest version of hashicorp/local…
- Installing hashicorp/local v2.2.2…
- Installed hashicorp/local v2.2.2 (self-signed, key ID 34365D9472D7468F)
…
- hashicorp/local: version = “~> 2.2.2”
Terraform has been successfully initialized!
…
iac-server $ terraform plan
Error: Invalid combination of arguments
on main.tf line 5, in resource “local_file” “krill”:
5: resource “local_file” “krill” {
“content”: one of content,content_base64,sensitive_content,source
must be
specified
Error: Invalid combination of arguments
on main.tf line 5, in resource “local_file” “krill”:
5: resource “local_file” “krill” {
“sensitive_content”: one of content,content_base64,sensitive_content,source
must be specified
Error: Invalid combination of arguments
on main.tf line 5, in resource “local_file” “krill”:
5: resource “local_file” “krill” {
“content_base64”: one of content,content_base64,sensitive_content,source
must be specified
Error: Invalid combination of arguments
on main.tf line 5, in resource “local_file” “krill”:
5: resource “local_file” “krill” {
“source”: one of content,content_base64,sensitive_content,source
must be
specified
Is there any explanation why this terraform plan fails?
Thank you in advance