Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix config for data source tests #14400

Merged
merged 2 commits into from
Jul 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions aws/data_source_aws_eip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ resource "aws_eip" "test" {
data "aws_eip" "test" {
filter {
name = "tag:Name"
values = ["${aws_eip.test.tags.Name}"]
values = [aws_eip.test.tags.Name]
}
}
`, rName)
Expand All @@ -214,7 +214,7 @@ resource "aws_eip" "test" {
}

data "aws_eip" "test" {
id = "${aws_eip.test.id}"
id = aws_eip.test.id
}
`

Expand All @@ -226,7 +226,7 @@ provider "aws" {
resource "aws_eip" "test" {}

data "aws_eip" "test" {
public_ip = "${aws_eip.test.public_ip}"
public_ip = aws_eip.test.public_ip
}
`

Expand All @@ -236,7 +236,7 @@ resource "aws_eip" "test" {
}

data "aws_eip" "test" {
public_ip = "${aws_eip.test.public_ip}"
public_ip = aws_eip.test.public_ip
}
`

Expand All @@ -252,7 +252,7 @@ resource "aws_eip" "test" {

data "aws_eip" "test" {
tags = {
Name = "${aws_eip.test.tags["Name"]}"
Name = aws_eip.test.tags["Name"]
}
}
`, rName)
Expand All @@ -264,27 +264,27 @@ resource "aws_vpc" "test" {
}

resource "aws_subnet" "test" {
vpc_id = "${aws_vpc.test.id}"
vpc_id = aws_vpc.test.id
cidr_block = "10.1.0.0/24"
}

resource "aws_internet_gateway" "test" {
vpc_id = "${aws_vpc.test.id}"
vpc_id = aws_vpc.test.id
}

resource "aws_network_interface" "test" {
subnet_id = "${aws_subnet.test.id}"
subnet_id = aws_subnet.test.id
}

resource "aws_eip" "test" {
vpc = true
network_interface = "${aws_network_interface.test.id}"
vpc = true
network_interface = aws_network_interface.test.id
}

data "aws_eip" "test" {
filter {
name = "network-interface-id"
values = ["${aws_eip.test.network_interface}"]
values = [aws_eip.test.network_interface]
}
}
`
Expand All @@ -306,13 +306,13 @@ resource "aws_vpc" "test" {
}

resource "aws_subnet" "test" {
availability_zone = "${data.aws_availability_zones.available.names[0]}"
vpc_id = "${aws_vpc.test.id}"
cidr_block = "10.2.0.0/24"
availability_zone = data.aws_availability_zones.available.names[0]
vpc_id = aws_vpc.test.id
cidr_block = "10.2.0.0/24"
}

resource "aws_internet_gateway" "test" {
vpc_id = "${aws_vpc.test.id}"
vpc_id = aws_vpc.test.id
}

data "aws_ami" "test" {
Expand All @@ -325,20 +325,20 @@ data "aws_ami" "test" {
}

resource "aws_instance" "test" {
ami = "${data.aws_ami.test.id}"
subnet_id = "${aws_subnet.test.id}"
ami = data.aws_ami.test.id
subnet_id = aws_subnet.test.id
instance_type = "t2.micro"
}

resource "aws_eip" "test" {
vpc = true
instance = "${aws_instance.test.id}"
vpc = true
instance = aws_instance.test.id
}

data "aws_eip" "test" {
filter {
name = "instance-id"
values = ["${aws_eip.test.instance}"]
name = "instance-id"
values = [aws_eip.test.instance]
}
}
`
2 changes: 1 addition & 1 deletion aws/data_source_aws_eks_cluster_auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ func testAccCheckAwsEksClusterAuthToken(n string) resource.TestCheckFunc {

const testAccCheckAwsEksClusterAuthConfig_basic = `
data "aws_eks_cluster_auth" "test" {
name = "foobar"
name = "foobar"
}
`
2 changes: 1 addition & 1 deletion aws/data_source_aws_eks_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func testAccAWSEksClusterDataSourceConfig_Basic(rName string) string {
%[1]s

data "aws_eks_cluster" "test" {
name = "${aws_eks_cluster.test.name}"
name = aws_eks_cluster.test.name
}
`, testAccAWSEksClusterConfig_Logging(rName, []string{"api", "audit"}))
}
2 changes: 1 addition & 1 deletion aws/data_source_aws_elastic_beanstalk_application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func testAccAwsElasticBeanstalkApplicationDataSourceConfig_Basic(rName string) s
%s

data "aws_elastic_beanstalk_application" "test" {
name = "${aws_elastic_beanstalk_application.tftest.name}"
name = aws_elastic_beanstalk_application.tftest.name
}
`, testAccBeanstalkAppConfigWithMaxAge(rName))
}
4 changes: 2 additions & 2 deletions aws/data_source_aws_elastic_beanstalk_solution_stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func testAccCheckAwsElasticBeanstalkSolutionStackDataSourceID(n string) resource

const testAccCheckAwsElasticBeanstalkSolutionStackDataSourceConfig = `
data "aws_elastic_beanstalk_solution_stack" "multi_docker" {
most_recent = true
name_regex = "^64bit Amazon Linux (.*) Multi-container Docker (.*)$"
most_recent = true
name_regex = "^64bit Amazon Linux (.*) Multi-container Docker (.*)$"
}
`
10 changes: 5 additions & 5 deletions aws/data_source_aws_elasticache_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ func TestAccAWSDataElasticacheCluster_basic(t *testing.T) {
func testAccAWSElastiCacheClusterConfigWithDataSource(rName string) string {
return fmt.Sprintf(`
resource "aws_elasticache_cluster" "test" {
cluster_id = %[1]q
engine = "memcached"
node_type = "cache.t3.small"
num_cache_nodes = 1
port = 11211
cluster_id = %[1]q
engine = "memcached"
node_type = "cache.t3.small"
num_cache_nodes = 1
port = 11211
}

data "aws_elasticache_cluster" "test" {
Expand Down
Loading