@@ -70,20 +70,11 @@ func resourceIdentityPlatformConfigCreate(d *schema.ResourceData, meta interface
70
70
return err
71
71
}
72
72
73
- obj := make (map [string ]interface {})
74
- autodeleteAnonymousUsersProp , err := expandIdentityPlatformConfigAutodeleteAnonymousUsers (d .Get ("autodelete_anonymous_users" ), d , config )
75
- if err != nil {
76
- return err
77
- } else if v , ok := d .GetOkExists ("autodelete_anonymous_users" ); ! isEmptyValue (reflect .ValueOf (autodeleteAnonymousUsersProp )) && (ok || ! reflect .DeepEqual (v , autodeleteAnonymousUsersProp )) {
78
- obj ["autodeleteAnonymousUsers" ] = autodeleteAnonymousUsersProp
79
- }
80
-
81
73
url , err := replaceVars (d , config , "{{IdentityPlatformBasePath}}projects/{{project}}/identityPlatform:initializeAuth" )
82
74
if err != nil {
83
75
return err
84
76
}
85
77
86
- log .Printf ("[DEBUG] Creating new Config: %#v" , obj )
87
78
billingProject := ""
88
79
89
80
project , err := getProject (d , config )
@@ -97,7 +88,7 @@ func resourceIdentityPlatformConfigCreate(d *schema.ResourceData, meta interface
97
88
billingProject = bp
98
89
}
99
90
100
- res , err := sendRequestWithTimeout (config , "POST" , billingProject , url , userAgent , obj , d .Timeout (schema .TimeoutCreate ))
91
+ res , err := sendRequestWithTimeout (config , "POST" , billingProject , url , userAgent , nil , d .Timeout (schema .TimeoutCreate ))
101
92
if err != nil {
102
93
return fmt .Errorf ("Error creating Config: %s" , err )
103
94
}
@@ -112,6 +103,11 @@ func resourceIdentityPlatformConfigCreate(d *schema.ResourceData, meta interface
112
103
}
113
104
d .SetId (id )
114
105
106
+ // Update the resource after initializing auth to set fields.
107
+ if err := resourceIdentityPlatformConfigUpdate (d , meta ); err != nil {
108
+ return err
109
+ }
110
+
115
111
log .Printf ("[DEBUG] Finished creating Config %q: %#v" , d .Id (), res )
116
112
117
113
return resourceIdentityPlatformConfigRead (d , meta )
0 commit comments