Skip to content

Commit

Permalink
Add Firebase WebApp resource (#3340) (#6108)
Browse files Browse the repository at this point in the history
* Add Firebase WebApp resource

Signed-off-by: Matt Morrissette <[email protected]>

* Add "config" to Firebase WebApp

* Add "google_firebase_web_app" data source

* Exclude update from async op

* Add datasource and an update test.

Add the google_firebase_web_app_config data source
Test for updating google_firebase_web_app resource

* Get import working and fix build

* Adding documentation

Docs for both web app datasources
Adding resources to the website side bar

* exclude beta data source

* removing comments

Co-authored-by: Chris Stephens <[email protected]>
Signed-off-by: Modular Magician <[email protected]>

Co-authored-by: Chris Stephens <[email protected]>
  • Loading branch information
modular-magician and chrisst authored Apr 13, 2020
1 parent 76b8e60 commit 2d0480f
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .changelog/3340.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```release-note:new-resource
firebase: `google_firebase_web_app`
```
```release-note:new-datasource
firebase: `google_firebase_web_app`
```
```release-note:new-datasource
firebase: `google_firebase_web_app_config`
```
1 change: 1 addition & 0 deletions google/data_source_google_firebase_web_app.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package google
1 change: 1 addition & 0 deletions google/data_source_google_firebase_web_app_config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package google
1 change: 1 addition & 0 deletions google/resource_firebase_web_app_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package google
48 changes: 48 additions & 0 deletions website/docs/d/datasource_firebase_web_app.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
subcategory: "Firebase"
layout: "google"
page_title: "Google: google_firebase_web_app"
sidebar_current: "docs-google-firebase-web-app"
description: |-
A Google Cloud Firebase web application instance
---

# google\_firebase\_web\_app

A Google Cloud Firebase web application instance

~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources.


## Argument Reference

The following arguments are supported:


* `app_id` -
(Required)
The app_ip of name of the Firebase webApp.


- - -


* `project` - (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.


## Attributes Reference

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

* `id` - an identifier for the resource with format `{{name}}`

* `name` -
The fully qualified resource name of the App, for example:
projects/projectId/webApps/appId

* `app_id` -
Immutable. The globally unique, Firebase-assigned identifier of the App.
This identifier should be treated as an opaque token, as the data format is not specified.

66 changes: 66 additions & 0 deletions website/docs/d/datasource_firebase_web_app_config.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
subcategory: "Firebase"
layout: "google"
page_title: "Google: google_firebase_web_app_config"
sidebar_current: "docs-google-firebase-web-app-config"
description: |-
A Google Cloud Firebase web application configuration
---

# google\_firebase\_web\_app\_config

A Google Cloud Firebase web application configuration

~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources.

To get more information about WebApp, see:

* [API documentation](https://firebase.google.com/docs/projects/api/reference/rest/v1beta1/projects.webApps)
* How-to Guides
* [Official Documentation](https://firebase.google.com/)


## Argument Reference
The following arguments are supported:

* `web_app_id` - (Required) the id of the firebase web app

- - -

* `project` - (Optional) The ID of the project in which the resource belongs. If it
is not provided, the provider project is used.

## Attributes Reference

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

* `api_key` -
The API key associated with the web App.

* `auth_domain` -
The domain Firebase Auth configures for OAuth redirects, in the format:
projectId.firebaseapp.com

* `database_url` -
The default Firebase Realtime Database URL.

* `storage_bucket` -
The default Cloud Storage for Firebase storage bucket name.

* `location_id` -
The ID of the project's default GCP resource location. The location is one of the available GCP resource
locations.
This field is omitted if the default GCP resource location has not been finalized yet. To set your project's
default GCP resource location, call defaultLocation.finalize after you add Firebase services to your project.

* `messaging_sender_id` -
The sender ID for use with Firebase Cloud Messaging.

* `measurement_id` -
The unique Google-assigned identifier of the Google Analytics web stream associated with the Firebase Web App.
Firebase SDKs use this ID to interact with Google Analytics APIs.
This field is only present if the App is linked to a web stream in a Google Analytics App + Web property.
Learn more about this ID and Google Analytics web streams in the Analytics documentation.
To generate a measurementId and link the Web App with a Google Analytics web stream,
call projects.addGoogleAnalytics.

0 comments on commit 2d0480f

Please sign in to comment.