Skip to content

Commit 01d310d

Browse files
committed
new config for resource test
1 parent 2207d40 commit 01d310d

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

internal/acctest/data.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,31 @@ terraform {
6060
return config
6161
}
6262

63+
func (td *TestData) MetadataConfig() string {
64+
config := fmt.Sprintf(`
65+
resource %[1]q %[2]q {}
66+
`, td.TerraformResourceType, td.ResourceLabel)
67+
68+
config = fmt.Sprintf(`
69+
terraform {
70+
provider_meta "awscc" {
71+
user_agent = [{
72+
name = "my-test-module"
73+
version = "0.0.1"
74+
comment = "testing user-agent comment"
75+
},
76+
{
77+
name = "2nd-user-agent"
78+
version = "0.0.1"
79+
comment = "2nd user agent"
80+
}
81+
]
82+
}
83+
}
84+
` + config)
85+
return config
86+
}
87+
6388
// DataSourceWithEmptyResourceConfig returns a Terraform configuration for the data source and its respective resource.
6489
func (td *TestData) DataSourceWithEmptyResourceConfig() string {
6590
return td.EmptyConfig() + fmt.Sprintf(`

internal/aws/ec2/__debug_bin

43 MB
Binary file not shown.

internal/aws/ec2/vpc_resource_gen_test.go

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)