Skip to content

Commit e4e15b9

Browse files
Fix import formats of Firebase apps (#7959) (#14638)
Signed-off-by: Modular Magician <[email protected]>
1 parent 00b63bf commit e4e15b9

File tree

4 files changed

+21
-14
lines changed

4 files changed

+21
-14
lines changed

.changelog/7959.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
firebase: added additional import formats for app resources, removed the need to supply duplicate projects in some cases
3+
```

website/docs/r/firebase_android_app.html.markdown

+6-5
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ serving traffic. Set to `DELETE` to delete the AndroidApp. Defaults to `DELETE`.
8282

8383
In addition to the arguments listed above, the following computed attributes are exported:
8484

85-
* `id` - an identifier for the resource with format `{{name}}`
85+
* `id` - an identifier for the resource with format `projects/{{project}}/androidApps/{{app_id}}`
8686

8787
* `name` -
8888
The fully qualified resource name of the AndroidApp, for example:
@@ -112,10 +112,11 @@ This resource provides the following
112112
AndroidApp can be imported using any of these accepted formats:
113113

114114
```
115-
$ terraform import google_firebase_android_app.default projects/{{project}}/androidApps/{{appId}}
116-
$ terraform import google_firebase_android_app.default {{project}}/{{appId}}
117-
$ terraform import google_firebase_android_app.default androidApps/{{appId}}
118-
$ terraform import google_firebase_android_app.default {{appId}}
115+
$ terraform import google_firebase_android_app.default {{project}} projects/{{project}}/androidApps/{{app_id}}
116+
$ terraform import google_firebase_android_app.default projects/{{project}}/androidApps/{{app_id}}
117+
$ terraform import google_firebase_android_app.default {{project}}/{{project}}/{{app_id}}
118+
$ terraform import google_firebase_android_app.default androidApps/{{app_id}}
119+
$ terraform import google_firebase_android_app.default {{app_id}}
119120
```
120121

121122
## User Project Overrides

website/docs/r/firebase_apple_app.html.markdown

+6-5
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ serving traffic. Set to `DELETE` to delete the Apple. Defaults to `DELETE`.
9292

9393
In addition to the arguments listed above, the following computed attributes are exported:
9494

95-
* `id` - an identifier for the resource with format `{{name}}`
95+
* `id` - an identifier for the resource with format `projects/{{project}}/iosApps/{{app_id}}`
9696

9797
* `name` -
9898
The fully qualified resource name of the App, for example:
@@ -118,10 +118,11 @@ This resource provides the following
118118
AppleApp can be imported using any of these accepted formats:
119119

120120
```
121-
$ terraform import google_firebase_apple_app.default projects/{{project}}/iosApps/{{appId}}
122-
$ terraform import google_firebase_apple_app.default {{project}}/{{appId}}
123-
$ terraform import google_firebase_apple_app.default iosApps/{{appId}}
124-
$ terraform import google_firebase_apple_app.default {{appId}}
121+
$ terraform import google_firebase_apple_app.default {{project}} projects/{{project}}/iosApps/{{app_id}}
122+
$ terraform import google_firebase_apple_app.default projects/{{project}}/iosApps/{{app_id}}
123+
$ terraform import google_firebase_apple_app.default {{project}}/{{project}}/{{app_id}}
124+
$ terraform import google_firebase_apple_app.default iosApps/{{app_id}}
125+
$ terraform import google_firebase_apple_app.default {{app_id}}
125126
```
126127

127128
## User Project Overrides

website/docs/r/firebase_web_app.html.markdown

+6-4
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ serving traffic. Set to `DELETE` to delete the WebApp. Default to `ABANDON`
113113

114114
In addition to the arguments listed above, the following computed attributes are exported:
115115

116-
* `id` - an identifier for the resource with format `{{name}}`
116+
* `id` - an identifier for the resource with format `projects/{{project}}/webApps/{{app_id}}`
117117

118118
* `name` -
119119
The fully qualified resource name of the App, for example:
@@ -142,9 +142,11 @@ This resource provides the following
142142
WebApp can be imported using any of these accepted formats:
143143

144144
```
145-
$ terraform import google_firebase_web_app.default {{project}}/{{name}}
146-
$ terraform import google_firebase_web_app.default {{project}} {{name}}
147-
$ terraform import google_firebase_web_app.default {{name}}
145+
$ terraform import google_firebase_web_app.default {{project}} projects/{{project}}/webApps/{{app_id}}
146+
$ terraform import google_firebase_web_app.default projects/{{project}}/webApps/{{app_id}}
147+
$ terraform import google_firebase_web_app.default {{project}}/{{project}}/{{app_id}}
148+
$ terraform import google_firebase_web_app.default webApps/{{app_id}}
149+
$ terraform import google_firebase_web_app.default {{app_id}}
148150
```
149151

150152
## User Project Overrides

0 commit comments

Comments
 (0)