@@ -27,16 +27,16 @@ func TestAccFirebaseDataConnectService_Update(t *testing.T) {
27
27
CheckDestroy : testAccCheckFirebaseDataConnectServiceDestroyProducer (t ),
28
28
Steps : []resource.TestStep {
29
29
{
30
- Config : testAccFirebaseDataConnectService_update (context , "Original display name" ),
30
+ Config : testAccFirebaseDataConnectService_update (context , "Original display name" , "DEFAULT" ),
31
31
},
32
32
{
33
33
ResourceName : "google_firebase_data_connect_service.default" ,
34
34
ImportState : true ,
35
35
ImportStateVerify : true ,
36
- ImportStateVerifyIgnore : []string {"annotations" , "labels" , "location" , "service_id" , "terraform_labels" },
36
+ ImportStateVerifyIgnore : []string {"annotations" , "labels" , "location" , "service_id" , "terraform_labels" , "deletion_policy" },
37
37
},
38
38
{
39
- Config : testAccFirebaseDataConnectService_update (context , "Updated display name" ),
39
+ Config : testAccFirebaseDataConnectService_update (context , "Updated display name" , "FORCE" ),
40
40
ConfigPlanChecks : resource.ConfigPlanChecks {
41
41
PreApply : []plancheck.PlanCheck {
42
42
plancheck .ExpectResourceAction ("google_firebase_data_connect_service.default" , plancheck .ResourceActionUpdate ),
@@ -47,15 +47,15 @@ func TestAccFirebaseDataConnectService_Update(t *testing.T) {
47
47
ResourceName : "google_firebase_data_connect_service.default" ,
48
48
ImportState : true ,
49
49
ImportStateVerify : true ,
50
- ImportStateVerifyIgnore : []string {"annotations" , "labels" , "location" , "service_id" , "terraform_labels" },
50
+ ImportStateVerifyIgnore : []string {"annotations" , "labels" , "location" , "service_id" , "terraform_labels" , "deletion_policy" },
51
51
},
52
52
},
53
53
})
54
54
}
55
55
56
- // TODO(b/394642094): Cover force deletion once it's supported
57
- func testAccFirebaseDataConnectService_update (context map [string ]interface {}, display_name string ) string {
56
+ func testAccFirebaseDataConnectService_update (context map [string ]interface {}, display_name string , deletion_policy string ) string {
58
57
context ["display_name" ] = display_name
58
+ context ["deletion_policy" ] = deletion_policy
59
59
return acctest .Nprintf (`
60
60
# Enable Firebase Data Connect API
61
61
resource "google_project_service" "fdc" {
@@ -70,6 +70,7 @@ resource "google_firebase_data_connect_service" "default" {
70
70
location = "us-central1"
71
71
service_id = "tf-fdc-%{random_suffix}"
72
72
display_name = "%{display_name}"
73
+ deletion_policy = "%{deletion_policy}"
73
74
74
75
depends_on = [google_project_service.fdc]
75
76
}
0 commit comments