A Google Cloud Firebase Android application instance
To get more information about AndroidApp, see:
resource "google_firebase_android_app" "basic" {
provider = google-beta
project = "my-project-name"
display_name = "Display Name Basic"
package_name = "android.package.app"
sha1_hashes = ["2145bdf698b8715039bd0e83f2069bed435ac21c"]
sha256_hashes = ["2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc"]
}
resource "google_firebase_android_app" "default" {
provider = google-beta
project = "my-project-name"
display_name = "Display Name"
package_name = "android.package.app"
sha1_hashes = ["2145bdf698b8715039bd0e83f2069bed435ac21c"]
sha256_hashes = ["2145bdf698b8715039bd0e83f2069bed435ac21ca1b2c3d4e5f6123456789abc"]
api_key_id = google_apikeys_key.android.uid
}
resource "google_apikeys_key" "android" {
provider = google-beta
name = "api-key"
display_name = "Display Name"
project = "my-project-name"
restrictions {
android_key_restrictions {
allowed_applications {
package_name = "android.package.app"
sha1_fingerprint = "2145bdf698b8715039bd0e83f2069bed435ac21c"
}
}
}
}
The following arguments are supported:
display_name
-
(Required)
The user-assigned display name of the AndroidApp.
package_name
-
(Required)
The canonical package name of the Android app as would appear in the Google Play
Developer Console.
sha1_hashes
-
(Optional)
The SHA1 certificate hashes for the AndroidApp.
sha256_hashes
-
(Optional)
The SHA256 certificate hashes for the AndroidApp.
api_key_id
-
(Optional)
The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the AndroidApp.
If apiKeyId is not set during creation, then Firebase automatically associates an apiKeyId with the AndroidApp.
This auto-associated key may be an existing valid key or, if no valid key exists, a new one will be provisioned.
project
- (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
deletion_policy
- (Optional) (Optional) Set to ABANDON
to allow the AndroidApp to be untracked from terraform state
rather than deleted upon terraform destroy
. This is useful because the AndroidApp may be
serving traffic. Set to DELETE
to delete the AndroidApp. Defaults to DELETE
.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format projects/{{project}}/androidApps/{{app_id}}
name
-
The fully qualified resource name of the AndroidApp, for example:
projects/projectId/androidApps/appId
app_id
-
The globally unique, Firebase-assigned identifier of the AndroidApp.
This identifier should be treated as an opaque token, as the data format is not specified.
etag
-
This checksum is computed by the server based on the value of other fields, and it may be sent
with update requests to ensure the client has an up-to-date value before proceeding.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.AndroidApp can be imported using any of these accepted formats:
{{project}} projects/{{project}}/androidApps/{{app_id}}
projects/{{project}}/androidApps/{{app_id}}
{{project}}/{{project}}/{{app_id}}
androidApps/{{app_id}}
{{app_id}}
In Terraform v1.5.0 and later, use an import
block to import AndroidApp using one of the formats above. For example:
import {
id = "{{project}} projects/{{project}}/androidApps/{{app_id}}"
to = google_firebase_android_app.default
}
When using the terraform import
command, AndroidApp can be imported using one of the formats above. For example:
$ terraform import google_firebase_android_app.default {{project}} projects/{{project}}/androidApps/{{app_id}}
$ terraform import google_firebase_android_app.default projects/{{project}}/androidApps/{{app_id}}
$ terraform import google_firebase_android_app.default {{project}}/{{project}}/{{app_id}}
$ terraform import google_firebase_android_app.default androidApps/{{app_id}}
$ terraform import google_firebase_android_app.default {{app_id}}
This resource supports User Project Overrides.