@@ -16,6 +16,8 @@ func flattenConnectionOptions(d ResourceData, options interface{}) []interface{}
16
16
m = flattenConnectionOptionsAuth0 (d , o )
17
17
case * management.ConnectionOptionsGoogleOAuth2 :
18
18
m = flattenConnectionOptionsGoogleOAuth2 (o )
19
+ case * management.ConnectionOptionsGoogleApps :
20
+ m = flattenConnectionOptionsGoogleApps (o )
19
21
case * management.ConnectionOptionsOAuth2 :
20
22
m = flattenConnectionOptionsOAuth2 (o )
21
23
case * management.ConnectionOptionsFacebook :
@@ -101,6 +103,21 @@ func flattenConnectionOptionsGoogleOAuth2(o *management.ConnectionOptionsGoogleO
101
103
}
102
104
}
103
105
106
+ func flattenConnectionOptionsGoogleApps (o * management.ConnectionOptionsGoogleApps ) interface {} {
107
+ return map [string ]interface {}{
108
+ "client_id" : o .GetClientID (),
109
+ "client_secret" : o .GetClientSecret (),
110
+ "domain" : o .GetDomain (),
111
+ "tenant_domain" : o .GetTenantDomain (),
112
+ "api_enable_users" : o .GetEnableUsersAPI (),
113
+ "scopes" : o .Scopes (),
114
+ "set_user_root_attributes" : o .GetSetUserAttributes (),
115
+ "non_persistent_attrs" : o .GetNonPersistentAttrs (),
116
+ "domain_aliases" : o .DomainAliases ,
117
+ "icon_url" : o .GetLogoURL (),
118
+ }
119
+ }
120
+
104
121
func flattenConnectionOptionsOAuth2 (o * management.ConnectionOptionsOAuth2 ) interface {} {
105
122
return map [string ]interface {}{
106
123
"client_id" : o .GetClientID (),
@@ -319,6 +336,8 @@ func expandConnection(d ResourceData) *management.Connection {
319
336
c .Options = expandConnectionOptionsAuth0 (d )
320
337
case management .ConnectionStrategyGoogleOAuth2 :
321
338
c .Options = expandConnectionOptionsGoogleOAuth2 (d )
339
+ case management .ConnectionStrategyGoogleApps :
340
+ c .Options = expandConnectionOptionsGoogleApps (d )
322
341
case management .ConnectionStrategyOAuth2 :
323
342
c .Options = expandConnectionOptionsOAuth2 (d )
324
343
case management .ConnectionStrategyFacebook :
@@ -443,6 +462,26 @@ func expandConnectionOptionsGoogleOAuth2(d ResourceData) *management.ConnectionO
443
462
444
463
return o
445
464
}
465
+
466
+ func expandConnectionOptionsGoogleApps (d ResourceData ) * management.ConnectionOptionsGoogleApps {
467
+
468
+ o := & management.ConnectionOptionsGoogleApps {
469
+ ClientID : String (d , "client_id" ),
470
+ ClientSecret : String (d , "client_secret" ),
471
+ Domain : String (d , "domain" ),
472
+ TenantDomain : String (d , "tenant_domain" ),
473
+ EnableUsersAPI : Bool (d , "api_enable_users" ),
474
+ SetUserAttributes : String (d , "set_user_root_attributes" ),
475
+ NonPersistentAttrs : castToListOfStrings (Set (d , "non_persistent_attrs" ).List ()),
476
+ DomainAliases : Set (d , "domain_aliases" ).List (),
477
+ LogoURL : String (d , "icon_url" ),
478
+ }
479
+
480
+ expandConnectionOptionsScopes (d , o )
481
+
482
+ return o
483
+ }
484
+
446
485
func expandConnectionOptionsOAuth2 (d ResourceData ) * management.ConnectionOptionsOAuth2 {
447
486
448
487
o := & management.ConnectionOptionsOAuth2 {
0 commit comments