File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
third_party/terraform/services/storageinsights Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 2323base_url : ' projects/{{project}}/locations/{{location}}/reportConfigs'
2424self_link : ' projects/{{project}}/locations/{{location}}/reportConfigs/{{name}}'
2525create_url : ' projects/{{project}}/locations/{{location}}/reportConfigs'
26+ delete_url : projects/{{project}}/locations/{{location}}/reportConfigs/{{name}}?force={{force_destroy}}
2627update_verb : ' PATCH'
2728update_mask : true
2829timeouts :
@@ -35,6 +36,8 @@ examples:
3536 primary_resource_id : ' config'
3637 vars :
3738 bucket_name : ' my-bucket'
39+ ignore_read_extra :
40+ - ' force_destroy'
3841parameters :
3942 - name : ' location'
4043 type : String
@@ -44,6 +47,12 @@ parameters:
4447 url_param_only : true
4548 required : true
4649 immutable : true
50+ virtual_fields :
51+ - name : ' force_destroy'
52+ description : |
53+ If set, all the inventory report details associated with this report configuration are deleted.
54+ type : Boolean
55+ default_value : false
4756properties :
4857 - name : ' name'
4958 type : String
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ func TestAccStorageInsightsReportConfig_update(t *testing.T) {
3737 ResourceName : "google_storage_insights_report_config.config" ,
3838 ImportState : true ,
3939 ImportStateVerify : true ,
40- ImportStateVerifyIgnore : []string {"location" },
40+ ImportStateVerifyIgnore : []string {"location" , "force_destroy" },
4141 },
4242 },
4343 })
@@ -70,7 +70,7 @@ func TestAccStorageInsightsReportConfig_parquet(t *testing.T) {
7070 ResourceName : "google_storage_insights_report_config.config" ,
7171 ImportState : true ,
7272 ImportStateVerify : true ,
73- ImportStateVerifyIgnore : []string {"location" },
73+ ImportStateVerifyIgnore : []string {"location" , "force_destroy" },
7474 },
7575 },
7676 })
@@ -167,6 +167,7 @@ resource "google_storage_insights_report_config" "config" {
167167 depends_on = [
168168 google_storage_bucket_iam_member.admin,
169169 ]
170+ force_destroy = true
170171}
171172
172173resource "google_storage_bucket" "report_bucket" {
@@ -275,6 +276,7 @@ resource "google_storage_insights_report_config" "config" {
275276 depends_on = [
276277 google_storage_bucket_iam_member.admin,
277278 ]
279+ force_destroy = true
278280}
279281
280282resource "google_storage_bucket" "report_bucket" {
You can’t perform that action at this time.
0 commit comments