9
9
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
10
10
)
11
11
12
- var (
13
- zoneID = os .Getenv ("CLOUDFLARE_ZONE_ID" )
14
- )
12
+ var zoneID = os .Getenv ("CLOUDFLARE_ZONE_ID" )
15
13
16
14
func TestAccCloudflareRegionalHostname_Basic (t * testing.T ) {
17
15
rnd := utils .GenerateRandomResourceName ()
@@ -23,14 +21,14 @@ func TestAccCloudflareRegionalHostname_Basic(t *testing.T) {
23
21
ProtoV6ProviderFactories : acctest .TestAccProtoV6ProviderFactories ,
24
22
Steps : []resource.TestStep {
25
23
{
26
- Config : testRegionalHostnameConfig (rnd , zoneName , "ca" ),
24
+ Config : testRegionalHostnameConfig (rnd , zoneName , "ca" , "dns" ),
27
25
Check : resource .ComposeTestCheckFunc (
28
26
resource .TestCheckResourceAttr (name , "hostname" , zoneName ),
29
27
resource .TestCheckResourceAttr (name , "region_key" , "ca" ),
30
28
),
31
29
},
32
30
{
33
- Config : testRegionalHostnameConfig (rnd , zoneName , "eu" ),
31
+ Config : testRegionalHostnameConfig (rnd , zoneName , "eu" , "dns" ),
34
32
Check : resource .ComposeTestCheckFunc (
35
33
resource .TestCheckResourceAttr (name , "hostname" , zoneName ),
36
34
resource .TestCheckResourceAttr (name , "region_key" , "eu" ),
@@ -40,6 +38,6 @@ func TestAccCloudflareRegionalHostname_Basic(t *testing.T) {
40
38
})
41
39
}
42
40
43
- func testRegionalHostnameConfig (name string , zoneName , regionKey string ) string {
44
- return acctest .LoadTestCase ("regionalhostnameconfig.tf" , name , zoneID , zoneName , regionKey )
41
+ func testRegionalHostnameConfig (name string , zoneName , regionKey , routing string ) string {
42
+ return acctest .LoadTestCase ("regionalhostnameconfig.tf" , name , zoneID , zoneName , regionKey , routing )
45
43
}
0 commit comments