blob: 1a8592950c4b89ca99d7fbdd345a2ae2094cfdd4 [file] [log] [blame]
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
// ----------------------------------------------------------------------------
//
// *** AUTO GENERATED CODE *** Type: MMv1 ***
//
// ----------------------------------------------------------------------------
//
// This file is automatically generated by Magic Modules and manual
// changes will be clobbered when the file is regenerated.
//
// Please read more about how to change this file in
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------
package firebase_test
import (
"testing"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-provider-google-beta/google-beta/acctest"
"github.com/hashicorp/terraform-provider-google-beta/google-beta/envvar"
)
func TestAccFirebaseProject_firebaseProjectBasicExample(t *testing.T) {
t.Parallel()
context := map[string]interface{}{
"org_id": envvar.GetTestOrgFromEnv(t),
"random_suffix": acctest.RandString(t, 10),
}
acctest.VcrTest(t, resource.TestCase{
PreCheck: func() { acctest.AccTestPreCheck(t) },
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
Steps: []resource.TestStep{
{
Config: testAccFirebaseProject_firebaseProjectBasicExample(context),
},
{
ResourceName: "google_firebase_project.default",
ImportState: true,
ImportStateVerify: true,
},
},
})
}
func testAccFirebaseProject_firebaseProjectBasicExample(context map[string]interface{}) string {
return acctest.Nprintf(`
resource "google_project" "default" {
provider = google-beta
project_id = "tf-test-my-project%{random_suffix}"
name = "tf-test-my-project%{random_suffix}"
org_id = "%{org_id}"
labels = {
"firebase" = "enabled"
}
}
resource "google_firebase_project" "default" {
provider = google-beta
project = google_project.default.project_id
}
`, context)
}