Skip to content

Commit

Permalink
WIP aws_subnet data source tests
Browse files Browse the repository at this point in the history
  • Loading branch information
apparentlymart committed Jun 19, 2016
1 parent a782a9a commit 393c6aa
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions builtin/providers/aws/data_source_aws_subnet_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package aws

import (
"testing"

"github.com/hashicorp/terraform/helper/resource"
//"github.com/hashicorp/terraform/terraform"
)

func TestAccDataSourceAwsSubnet(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccDataSourceAwsSubnetConfig,
},
},
})
}

const testAccDataSourceAwsSubnetConfig = `
resource "aws_vpc" "test" {
cidr_block = "172.16.0.0/16"
}
resource "aws_subnet" "test" {
vpc_id = "${aws_vpc.test.id}"
cidr_block = "172.16.1.0/24"
}
data "aws_subnet" "test" {
id = "${aws_subnet.test.id}"
}
`

0 comments on commit 393c6aa

Please sign in to comment.