@@ -41,6 +41,31 @@ func TestAccBigtableAppProfile_update(t *testing.T) {
4141 })
4242}
4343
44+ func TestAccBigtableAppProfile_ignoreWarnings (t * testing.T ) {
45+ // bigtable instance does not use the shared HTTP client, this test creates an instance
46+ skipIfVcr (t )
47+ t .Parallel ()
48+
49+ instanceName := fmt .Sprintf ("tf-test-%s" , randString (t , 10 ))
50+
51+ vcrTest (t , resource.TestCase {
52+ PreCheck : func () { testAccPreCheck (t ) },
53+ Providers : testAccProviders ,
54+ CheckDestroy : testAccCheckBigtableAppProfileDestroyProducer (t ),
55+ Steps : []resource.TestStep {
56+ {
57+ Config : testAccBigtableAppProfile_warningsProduced (instanceName ),
58+ },
59+ {
60+ ResourceName : "google_bigtable_app_profile.gae-profile1" ,
61+ ImportState : true ,
62+ ImportStateVerify : true ,
63+ ImportStateVerifyIgnore : []string {"ignore_warnings" },
64+ },
65+ },
66+ })
67+ }
68+
4469func testAccBigtableAppProfile_update1 (instanceName string ) string {
4570 return fmt .Sprintf (`
4671resource "google_bigtable_instance" "instance" {
@@ -97,3 +122,67 @@ resource "google_bigtable_app_profile" "ap" {
97122}
98123` , instanceName , instanceName , instanceName )
99124}
125+
126+ func testAccBigtableAppProfile_warningsProduced (instanceName string ) string {
127+ return fmt .Sprintf (`
128+ resource "google_bigtable_instance" "instance" {
129+ name = "%s"
130+ instance_type = "PRODUCTION"
131+ cluster {
132+ cluster_id = "%s1"
133+ zone = "us-central1-b"
134+ num_nodes = 3
135+ }
136+
137+ cluster {
138+ cluster_id = "%s2"
139+ zone = "us-west1-a"
140+ num_nodes = 3
141+ }
142+
143+ cluster {
144+ cluster_id = "%s3"
145+ zone = "us-west1-b"
146+ num_nodes = 3
147+ }
148+
149+ deletion_protection = false
150+ }
151+
152+ resource "google_bigtable_app_profile" "gae-profile1" {
153+ instance = google_bigtable_instance.instance.id
154+ app_profile_id = "bigtableinstance-sample1"
155+
156+ single_cluster_routing {
157+ cluster_id = "%s1"
158+ allow_transactional_writes = true
159+ }
160+
161+ ignore_warnings = true
162+ }
163+
164+ resource "google_bigtable_app_profile" "gae-profile2" {
165+ instance = google_bigtable_instance.instance.id
166+ app_profile_id = "bigtableinstance-sample2"
167+
168+ single_cluster_routing {
169+ cluster_id = "%s2"
170+ allow_transactional_writes = true
171+ }
172+
173+ ignore_warnings = true
174+ }
175+
176+ resource "google_bigtable_app_profile" "gae-profile3" {
177+ instance = google_bigtable_instance.instance.id
178+ app_profile_id = "bigtableinstance-sample3"
179+
180+ single_cluster_routing {
181+ cluster_id = "%s3"
182+ allow_transactional_writes = true
183+ }
184+
185+ ignore_warnings = true
186+ }
187+ ` , instanceName , instanceName , instanceName , instanceName , instanceName , instanceName , instanceName )
188+ }
0 commit comments