Difference between revisions of "Terraform: subnet id"

From wikieduonline
Jump to navigation Jump to search
Line 4: Line 4:
  
 
* <code>[[aws ec2 describe-instances]]  | grep -i SubnetId</code>
 
* <code>[[aws ec2 describe-instances]]  | grep -i SubnetId</code>
 +
 +
 +
<code>[[terraform plan]]</code>
 +
│ Error: Error in function call
 +
 +
│  on ../path_to_your/plan.tf line 7, in resource "[[aws_instance]]" "this":
 +
│    7:  subnet_id = element(var.subnet_ids,count.index)
 +
│    ├────────────────
 +
│    │ count.index is 0
 +
│    │ var.[[subnet_ids]] is empty list of string
 +
 +
│ Call to function "element" failed: cannot use element function with an empty list.
  
  

Revision as of 19:22, 6 September 2021

subnet_id



terraform plan

│ Error: Error in function call
│
│   on ../path_to_your/plan.tf line 7, in resource "aws_instance" "this":
│    7:   subnet_id = element(var.subnet_ids,count.index)
│     ├────────────────
│     │ count.index is 0
│     │ var.subnet_ids is empty list of string
│
│ Call to function "element" failed: cannot use element function with an empty list.


See also

Advertising: