-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
resource_identity_platform_config_generated_test.go
69 lines (59 loc) · 1.88 KB
/
resource_identity_platform_config_generated_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// ----------------------------------------------------------------------------
//
// *** 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 google
import (
"testing"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)
func TestAccIdentityPlatformConfig_identityPlatformConfigBasicExample(t *testing.T) {
skipIfVcr(t)
t.Parallel()
context := map[string]interface{}{
"org_id": getTestOrgFromEnv(t),
"billing_acct": getTestBillingAccountFromEnv(t),
"random_suffix": randString(t, 10),
}
vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Config: testAccIdentityPlatformConfig_identityPlatformConfigBasicExample(context),
},
{
ResourceName: "google_identity_platform_config.default",
ImportState: true,
ImportStateVerify: true,
},
},
})
}
func testAccIdentityPlatformConfig_identityPlatformConfigBasicExample(context map[string]interface{}) string {
return Nprintf(`
resource "google_project" "default" {
project_id = "tf-test%{random_suffix}"
name = "tf-test%{random_suffix}"
org_id = "%{org_id}"
billing_account = "%{billing_acct}"
}
resource "google_project_service" "apigee" {
project = google_project.project.project_id
service = "identitytoolkit.googleapis.com"
}
resource "google_identity_platform_config" "default" {
project = google_project.default.project_id
autodelete_anonymous_users = true
}
`, context)
}