Skip to content

Commit

Permalink
Update subnets data source (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-lobur authored Jul 5, 2023
1 parent 8f1d9a7 commit 133dd00
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
data "aws_region" "default" {}

data "aws_subnet" "default" {
id = data.aws_subnet_ids.all.ids[0]
id = data.aws_subnets.all.ids[0]
}

data "aws_vpc" "default" {
default = true
}

data "aws_subnet_ids" "all" {
vpc_id = data.aws_vpc.default.id
data "aws_subnets" "all" {
filter {
name = "vpc-id"
values = [data.aws_vpc.default.id]
}
}

provider "aws" {
Expand Down

0 comments on commit 133dd00

Please sign in to comment.