Terraform: subnet id
(Redirected from Subnet id)
Jump to navigation
Jump to search
Terraform subnet_id
argument used in:
aws ec2 describe-subnets --output json | grep SubnetId
aws ec2 describe-instances | grep -i SubnetId
Contents
Examples[edit]
subnet_id = "subnet-0a72be05b421abcde"
subnet_id = element(data.aws_subnets.all_private.ids, 0)
Errors[edit]
│ 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.
Related[edit]
tf show | grep subnet_id tf show | egrep "subnet_id|connectivity_type"
See also[edit]
Advertising: