Skip to content

Commit f4327cc

Browse files
Made resources set fields used in the ID format on post-create (#12939) (#9711)
[upstream:6b8b54c99b3ecefb1ee6dbebd8c434d3910d5c96] Signed-off-by: Modular Magician <[email protected]>
1 parent 83393a0 commit f4327cc

File tree

74 files changed

+83
-231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+83
-231
lines changed

.changelog/12939.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/services/accessapproval/resource_folder_access_approval_settings.go

-3
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,6 @@ func resourceAccessApprovalFolderSettingsCreate(d *schema.ResourceData, meta int
257257
if err != nil {
258258
return fmt.Errorf("Error creating FolderSettings: %s", err)
259259
}
260-
if err := d.Set("name", flattenAccessApprovalFolderSettingsName(res["name"], d, config)); err != nil {
261-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
262-
}
263260

264261
// Store the ID now
265262
id, err := tpgresource.ReplaceVars(d, config, "folders/{{folder_id}}/accessApprovalSettings")

google-beta/services/accessapproval/resource_organization_access_approval_settings.go

-3
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,6 @@ func resourceAccessApprovalOrganizationSettingsCreate(d *schema.ResourceData, me
217217
if err != nil {
218218
return fmt.Errorf("Error creating OrganizationSettings: %s", err)
219219
}
220-
if err := d.Set("name", flattenAccessApprovalOrganizationSettingsName(res["name"], d, config)); err != nil {
221-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
222-
}
223220

224221
// Store the ID now
225222
id, err := tpgresource.ReplaceVars(d, config, "organizations/{{organization_id}}/accessApprovalSettings")

google-beta/services/accessapproval/resource_project_access_approval_settings.go

-3
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,6 @@ func resourceAccessApprovalProjectSettingsCreate(d *schema.ResourceData, meta in
235235
if err != nil {
236236
return fmt.Errorf("Error creating ProjectSettings: %s", err)
237237
}
238-
if err := d.Set("name", flattenAccessApprovalProjectSettingsName(res["name"], d, config)); err != nil {
239-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
240-
}
241238

242239
// Store the ID now
243240
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project_id}}/accessApprovalSettings")

google-beta/services/alloydb/resource_alloydb_user.go

-3
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,6 @@ func resourceAlloydbUserCreate(d *schema.ResourceData, meta interface{}) error {
150150
if err != nil {
151151
return fmt.Errorf("Error creating User: %s", err)
152152
}
153-
if err := d.Set("name", flattenAlloydbUserName(res["name"], d, config)); err != nil {
154-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
155-
}
156153

157154
// Store the ID now
158155
id, err := tpgresource.ReplaceVars(d, config, "{{cluster}}/users/{{user_id}}")

google-beta/services/apihub/resource_apihub_host_project_registration.go

-3
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,6 @@ func resourceApihubHostProjectRegistrationCreate(d *schema.ResourceData, meta in
148148
if err != nil {
149149
return fmt.Errorf("Error creating HostProjectRegistration: %s", err)
150150
}
151-
if err := d.Set("name", flattenApihubHostProjectRegistrationName(res["name"], d, config)); err != nil {
152-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
153-
}
154151

155152
// Store the ID now
156153
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/hostProjectRegistrations/{{host_project_registration_id}}")

google-beta/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_data_exchange.go

-3
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,6 @@ func resourceBigqueryAnalyticsHubDataExchangeCreate(d *schema.ResourceData, meta
228228
if err != nil {
229229
return fmt.Errorf("Error creating DataExchange: %s", err)
230230
}
231-
if err := d.Set("name", flattenBigqueryAnalyticsHubDataExchangeName(res["name"], d, config)); err != nil {
232-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
233-
}
234231

235232
// Store the ID now
236233
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}")

google-beta/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_listing.go

-3
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,6 @@ func resourceBigqueryAnalyticsHubListingCreate(d *schema.ResourceData, meta inte
336336
if err != nil {
337337
return fmt.Errorf("Error creating Listing: %s", err)
338338
}
339-
if err := d.Set("name", flattenBigqueryAnalyticsHubListingName(res["name"], d, config)); err != nil {
340-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
341-
}
342339

343340
// Store the ID now
344341
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}/listings/{{listing_id}}")

google-beta/services/bigqueryanalyticshub/resource_bigquery_analytics_hub_listing_subscription.go

-3
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,6 @@ func resourceBigqueryAnalyticsHubListingSubscriptionCreate(d *schema.ResourceDat
283283
if err != nil {
284284
return fmt.Errorf("Error creating ListingSubscription: %s", err)
285285
}
286-
if err := d.Set("name", flattenBigqueryAnalyticsHubListingSubscriptionName(res["name"], d, config)); err != nil {
287-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
288-
}
289286

290287
// Store the ID now
291288
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/subscriptions/{{subscription_id}}")

google-beta/services/bigqueryconnection/resource_bigquery_connection.go

+7
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,16 @@ func resourceBigqueryConnectionConnectionCreate(d *schema.ResourceData, meta int
459459
if err != nil {
460460
return fmt.Errorf("Error creating Connection: %s", err)
461461
}
462+
// Setting `name` field so that `id_from_name` flattener will work properly.
462463
if err := d.Set("name", flattenBigqueryConnectionConnectionName(res["name"], d, config)); err != nil {
463464
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
464465
}
466+
// connection_id is set by API when unset
467+
if tpgresource.IsEmptyValue(reflect.ValueOf(d.Get("connection_id"))) {
468+
if err := d.Set("connection_id", flattenBigqueryConnectionConnectionConnectionId(res["connection_id"], d, config)); err != nil {
469+
return fmt.Errorf(`Error setting computed identity field "connection_id": %s`, err)
470+
}
471+
}
465472

466473
// Store the ID now
467474
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/connections/{{connection_id}}")

google-beta/services/bigquerydatapolicy/resource_bigquery_datapolicy_data_policy.go

-3
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,6 @@ func resourceBigqueryDatapolicyDataPolicyCreate(d *schema.ResourceData, meta int
188188
if err != nil {
189189
return fmt.Errorf("Error creating DataPolicy: %s", err)
190190
}
191-
if err := d.Set("name", flattenBigqueryDatapolicyDataPolicyName(res["name"], d, config)); err != nil {
192-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
193-
}
194191

195192
// Store the ID now
196193
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/dataPolicies/{{data_policy_id}}")

google-beta/services/bigqueryreservation/resource_bigquery_bi_reservation.go

-3
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,6 @@ func resourceBigqueryReservationBiReservationCreate(d *schema.ResourceData, meta
183183
if err != nil {
184184
return fmt.Errorf("Error creating BiReservation: %s", err)
185185
}
186-
if err := d.Set("name", flattenBigqueryReservationBiReservationName(res["name"], d, config)); err != nil {
187-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
188-
}
189186

190187
// Store the ID now
191188
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/biReservation")

google-beta/services/bigtable/resource_bigtable_app_profile.go

-3
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,6 @@ func resourceBigtableAppProfileCreate(d *schema.ResourceData, meta interface{})
255255
if err != nil {
256256
return fmt.Errorf("Error creating AppProfile: %s", err)
257257
}
258-
if err := d.Set("name", flattenBigtableAppProfileName(res["name"], d, config)); err != nil {
259-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
260-
}
261258

262259
// Store the ID now
263260
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/instances/{{instance}}/appProfiles/{{app_profile_id}}")

google-beta/services/chronicle/resource_chronicle_data_access_label.go

-3
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,6 @@ func resourceChronicleDataAccessLabelCreate(d *schema.ResourceData, meta interfa
184184
if err != nil {
185185
return fmt.Errorf("Error creating DataAccessLabel: %s", err)
186186
}
187-
if err := d.Set("name", flattenChronicleDataAccessLabelName(res["name"], d, config)); err != nil {
188-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
189-
}
190187

191188
// Store the ID now
192189
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/instances/{{instance}}/dataAccessLabels/{{data_access_label_id}}")

google-beta/services/chronicle/resource_chronicle_data_access_scope.go

-3
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,6 @@ func resourceChronicleDataAccessScopeCreate(d *schema.ResourceData, meta interfa
324324
if err != nil {
325325
return fmt.Errorf("Error creating DataAccessScope: %s", err)
326326
}
327-
if err := d.Set("name", flattenChronicleDataAccessScopeName(res["name"], d, config)); err != nil {
328-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
329-
}
330327

331328
// Store the ID now
332329
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/instances/{{instance}}/dataAccessScopes/{{data_access_scope_id}}")

google-beta/services/chronicle/resource_chronicle_reference_list.go

-3
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,6 @@ func resourceChronicleReferenceListCreate(d *schema.ResourceData, meta interface
242242
if err != nil {
243243
return fmt.Errorf("Error creating ReferenceList: %s", err)
244244
}
245-
if err := d.Set("name", flattenChronicleReferenceListName(res["name"], d, config)); err != nil {
246-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
247-
}
248245

249246
// Store the ID now
250247
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/instances/{{instance}}/referenceLists/{{reference_list_id}}")

google-beta/services/chronicle/resource_chronicle_rule.go

+4
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,13 @@ func resourceChronicleRuleCreate(d *schema.ResourceData, meta interface{}) error
358358
if err != nil {
359359
return fmt.Errorf("Error creating Rule: %s", err)
360360
}
361+
// Setting `name` field so that `id_from_name` flattener will work properly.
361362
if err := d.Set("name", flattenChronicleRuleName(res["name"], d, config)); err != nil {
362363
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
363364
}
365+
if err := d.Set("rule_id", flattenChronicleRuleRuleId(res["ruleId"], d, config)); err != nil {
366+
return fmt.Errorf(`Error setting computed identity field "rule_id": %s`, err)
367+
}
364368

365369
// Store the ID now
366370
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/instances/{{instance}}/rules/{{rule_id}}")

google-beta/services/chronicle/resource_chronicle_watchlist.go

+7
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,16 @@ func resourceChronicleWatchlistCreate(d *schema.ResourceData, meta interface{})
263263
if err != nil {
264264
return fmt.Errorf("Error creating Watchlist: %s", err)
265265
}
266+
// Setting `name` field so that `id_from_name` flattener will work properly.
266267
if err := d.Set("name", flattenChronicleWatchlistName(res["name"], d, config)); err != nil {
267268
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
268269
}
270+
// watchlist_id is set by API when unset
271+
if tpgresource.IsEmptyValue(reflect.ValueOf(d.Get("watchlist_id"))) {
272+
if err := d.Set("watchlist_id", flattenChronicleWatchlistWatchlistId(res["watchlistId"], d, config)); err != nil {
273+
return fmt.Errorf(`Error setting computed identity field "watchlist_id": %s`, err)
274+
}
275+
}
269276

270277
// Store the ID now
271278
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/instances/{{instance}}/watchlists/{{watchlist_id}}")

google-beta/services/cloudbuild/resource_cloudbuild_trigger.go

+3
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,9 @@ func resourceCloudBuildTriggerCreate(d *schema.ResourceData, meta interface{}) e
15981598
if err != nil {
15991599
return fmt.Errorf("Error creating Trigger: %s", err)
16001600
}
1601+
if err := d.Set("trigger_id", flattenCloudBuildTriggerTriggerId(res["id"], d, config)); err != nil {
1602+
return fmt.Errorf(`Error setting computed identity field "trigger_id": %s`, err)
1603+
}
16011604

16021605
// Store the ID now
16031606
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/triggers/{{trigger_id}}")

google-beta/services/cloudquotas/resource_cloud_quotas_quota_preference.go

+6
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@ func resourceCloudQuotasQuotaPreferenceCreate(d *schema.ResourceData, meta inter
257257
if err != nil {
258258
return fmt.Errorf("Error creating QuotaPreference: %s", err)
259259
}
260+
// name is set by API when unset
261+
if tpgresource.IsEmptyValue(reflect.ValueOf(d.Get("name"))) {
262+
if err := d.Set("name", flattenCloudQuotasQuotaPreferenceName(res["name"], d, config)); err != nil {
263+
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
264+
}
265+
}
260266

261267
// Store the ID now
262268
id, err := tpgresource.ReplaceVars(d, config, "{{parent}}/locations/global/quotaPreferences/{{name}}")

google-beta/services/colab/resource_colab_schedule.go

+3
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,9 @@ func resourceColabScheduleCreate(d *schema.ResourceData, meta interface{}) error
334334
if err != nil {
335335
return fmt.Errorf("Error creating Schedule: %s", err)
336336
}
337+
if err := d.Set("name", flattenColabScheduleName(res["name"], d, config)); err != nil {
338+
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
339+
}
337340

338341
// Store the ID now
339342
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/schedules/{{name}}")

google-beta/services/compute/resource_compute_firewall_policy_with_rules.go

+3
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,9 @@ func resourceComputeFirewallPolicyWithRulesCreate(d *schema.ResourceData, meta i
690690
if err != nil {
691691
return fmt.Errorf("Error creating FirewallPolicyWithRules: %s", err)
692692
}
693+
if err := d.Set("policy_id", flattenComputeFirewallPolicyWithRulesPolicyId(res["id"], d, config)); err != nil {
694+
return fmt.Errorf(`Error setting computed identity field "policy_id": %s`, err)
695+
}
693696

694697
// Store the ID now
695698
id, err := tpgresource.ReplaceVars(d, config, "locations/global/firewallPolicies/{{policy_id}}")

google-beta/services/compute/resource_compute_organization_security_policy.go

+3
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ func resourceComputeOrganizationSecurityPolicyCreate(d *schema.ResourceData, met
161161
if err != nil {
162162
return fmt.Errorf("Error creating OrganizationSecurityPolicy: %s", err)
163163
}
164+
if err := d.Set("policy_id", flattenComputeOrganizationSecurityPolicyPolicyId(res["id"], d, config)); err != nil {
165+
return fmt.Errorf(`Error setting computed identity field "policy_id": %s`, err)
166+
}
164167

165168
// Store the ID now
166169
id, err := tpgresource.ReplaceVars(d, config, "locations/global/securityPolicies/{{policy_id}}")

google-beta/services/dataproc/resource_dataproc_autoscaling_policy.go

-3
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,6 @@ func resourceDataprocAutoscalingPolicyCreate(d *schema.ResourceData, meta interf
320320
if err != nil {
321321
return fmt.Errorf("Error creating AutoscalingPolicy: %s", err)
322322
}
323-
if err := d.Set("name", flattenDataprocAutoscalingPolicyName(res["name"], d, config)); err != nil {
324-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
325-
}
326323

327324
// Store the ID now
328325
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/autoscalingPolicies/{{policy_id}}")

google-beta/services/dataprocgdc/resource_dataproc_gdc_application_environment.go

-3
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,6 @@ func resourceDataprocGdcApplicationEnvironmentCreate(d *schema.ResourceData, met
247247
if err != nil {
248248
return fmt.Errorf("Error creating ApplicationEnvironment: %s", err)
249249
}
250-
if err := d.Set("name", flattenDataprocGdcApplicationEnvironmentName(res["name"], d, config)); err != nil {
251-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
252-
}
253250

254251
// Store the ID now
255252
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{location}}/serviceInstances/{{serviceinstance}}/applicationEnvironments/{{application_environment_id}}")

google-beta/services/firebaseappcheck/resource_firebase_app_check_app_attest_config.go

-3
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ func resourceFirebaseAppCheckAppAttestConfigCreate(d *schema.ResourceData, meta
136136
if err != nil {
137137
return fmt.Errorf("Error creating AppAttestConfig: %s", err)
138138
}
139-
if err := d.Set("name", flattenFirebaseAppCheckAppAttestConfigName(res["name"], d, config)); err != nil {
140-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
141-
}
142139

143140
// Store the ID now
144141
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/apps/{{app_id}}/appAttestConfig")

google-beta/services/firebaseappcheck/resource_firebase_app_check_device_check_config.go

-3
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,6 @@ func resourceFirebaseAppCheckDeviceCheckConfigCreate(d *schema.ResourceData, met
165165
if err != nil {
166166
return fmt.Errorf("Error creating DeviceCheckConfig: %s", err)
167167
}
168-
if err := d.Set("name", flattenFirebaseAppCheckDeviceCheckConfigName(res["name"], d, config)); err != nil {
169-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
170-
}
171168

172169
// Store the ID now
173170
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/apps/{{app_id}}/deviceCheckConfig")

google-beta/services/firebaseappcheck/resource_firebase_app_check_play_integrity_config.go

-3
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ func resourceFirebaseAppCheckPlayIntegrityConfigCreate(d *schema.ResourceData, m
136136
if err != nil {
137137
return fmt.Errorf("Error creating PlayIntegrityConfig: %s", err)
138138
}
139-
if err := d.Set("name", flattenFirebaseAppCheckPlayIntegrityConfigName(res["name"], d, config)); err != nil {
140-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
141-
}
142139

143140
// Store the ID now
144141
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/apps/{{app_id}}/playIntegrityConfig")

google-beta/services/firebaseappcheck/resource_firebase_app_check_recaptcha_enterprise_config.go

-3
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@ func resourceFirebaseAppCheckRecaptchaEnterpriseConfigCreate(d *schema.ResourceD
149149
if err != nil {
150150
return fmt.Errorf("Error creating RecaptchaEnterpriseConfig: %s", err)
151151
}
152-
if err := d.Set("name", flattenFirebaseAppCheckRecaptchaEnterpriseConfigName(res["name"], d, config)); err != nil {
153-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
154-
}
155152

156153
// Store the ID now
157154
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/apps/{{app_id}}/recaptchaEnterpriseConfig")

google-beta/services/firebaseappcheck/resource_firebase_app_check_recaptcha_v3_config.go

-3
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,6 @@ func resourceFirebaseAppCheckRecaptchaV3ConfigCreate(d *schema.ResourceData, met
154154
if err != nil {
155155
return fmt.Errorf("Error creating RecaptchaV3Config: %s", err)
156156
}
157-
if err := d.Set("name", flattenFirebaseAppCheckRecaptchaV3ConfigName(res["name"], d, config)); err != nil {
158-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
159-
}
160157

161158
// Store the ID now
162159
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/apps/{{app_id}}/recaptchaV3Config")

google-beta/services/firebaseappcheck/resource_firebase_app_check_service_config.go

-3
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,6 @@ func resourceFirebaseAppCheckServiceConfigCreate(d *schema.ResourceData, meta in
166166
if err != nil {
167167
return fmt.Errorf("Error creating ServiceConfig: %s", err)
168168
}
169-
if err := d.Set("name", flattenFirebaseAppCheckServiceConfigName(res["name"], d, config)); err != nil {
170-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
171-
}
172169

173170
// Store the ID now
174171
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/services/{{service_id}}")

google-beta/services/firebasedatabase/resource_firebase_database_instance.go

-3
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,6 @@ func resourceFirebaseDatabaseInstanceCreate(d *schema.ResourceData, meta interfa
207207
if err != nil {
208208
return fmt.Errorf("Error creating Instance: %s", err)
209209
}
210-
if err := d.Set("name", flattenFirebaseDatabaseInstanceName(res["name"], d, config)); err != nil {
211-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
212-
}
213210

214211
// Store the ID now
215212
id, err := tpgresource.ReplaceVars(d, config, "projects/{{project}}/locations/{{region}}/instances/{{instance_id}}")

google-beta/services/firebasehosting/resource_firebase_hosting_channel.go

-3
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,6 @@ func resourceFirebaseHostingChannelCreate(d *schema.ResourceData, meta interface
186186
if err != nil {
187187
return fmt.Errorf("Error creating Channel: %s", err)
188188
}
189-
if err := d.Set("name", flattenFirebaseHostingChannelName(res["name"], d, config)); err != nil {
190-
return fmt.Errorf(`Error setting computed identity field "name": %s`, err)
191-
}
192189

193190
// Store the ID now
194191
id, err := tpgresource.ReplaceVars(d, config, "sites/{{site_id}}/channels/{{channel_id}}")

0 commit comments

Comments
 (0)