@@ -565,6 +565,19 @@ func TestAccRecord_updatedWithRegions(t *testing.T) {
565
565
),
566
566
),
567
567
},
568
+ {
569
+ Config : testAccRecordUpdatedWithNoRegions (rString ),
570
+ Check : resource .ComposeTestCheckFunc (
571
+ testAccCheckRecordExists ("ns1_record.it" , & record ),
572
+ testAccCheckRecordDomain (& record , domainName ),
573
+ testAccCheckRecordTTL (& record , 60 ),
574
+ testAccCheckRecordUseClientSubnet (& record , true ),
575
+ testAccCheckRecordRegionName (& record , []string {}),
576
+ testAccCheckRecordAnswerRdata (
577
+ t , & record , 0 , []string {fmt .Sprintf ("test1.%s" , zoneName )},
578
+ ),
579
+ ),
580
+ },
568
581
{
569
582
ResourceName : "ns1_record.it" ,
570
583
ImportState : true ,
@@ -1961,6 +1974,38 @@ resource "ns1_zone" "test" {
1961
1974
` , rString )
1962
1975
}
1963
1976
1977
+ func testAccRecordUpdatedWithNoRegions (rString string ) string {
1978
+ return fmt .Sprintf (`
1979
+ resource "ns1_record" "it" {
1980
+ zone = "${ns1_zone.test.zone}"
1981
+ domain = "test.${ns1_zone.test.zone}"
1982
+ type = "CNAME"
1983
+ ttl = 60
1984
+
1985
+ answers {
1986
+ answer = "test1.${ns1_zone.test.zone}"
1987
+ }
1988
+
1989
+ filters {
1990
+ filter = "geotarget_country"
1991
+ }
1992
+
1993
+ filters {
1994
+ filter = "select_first_n"
1995
+ config = {N=1}
1996
+ }
1997
+
1998
+ filters {
1999
+ filter = "up"
2000
+ }
2001
+ }
2002
+
2003
+ resource "ns1_zone" "test" {
2004
+ zone = "terraform-test-%s.io"
2005
+ }
2006
+ ` , rString )
2007
+ }
2008
+
1964
2009
// zone and domain have leading and trailing dots and should fail validation.
1965
2010
func testAccRecordInvalid (rString string ) string {
1966
2011
return fmt .Sprintf (`
0 commit comments