@@ -198,6 +198,31 @@ However, existing tokens still grant access.`,
198
198
Required : true ,
199
199
Description : `The OIDC issuer URI. Must be a valid URI using the 'https' scheme.` ,
200
200
},
201
+ "web_sso_config" : {
202
+ Type : schema .TypeList ,
203
+ Computed : true ,
204
+ Optional : true ,
205
+ Description : `Configuration for web single sign-on for the OIDC provider. Here, web sign-in refers to console sign-in and gcloud sign-in through the browser.` ,
206
+ MaxItems : 1 ,
207
+ Elem : & schema.Resource {
208
+ Schema : map [string ]* schema.Schema {
209
+ "assertion_claims_behavior" : {
210
+ Type : schema .TypeString ,
211
+ Required : true ,
212
+ ValidateFunc : validateEnum ([]string {"ONLY_ID_TOKEN_CLAIMS" }),
213
+ Description : `The behavior for how OIDC Claims are included in the 'assertion' object used for attribute mapping and attribute condition.
214
+ * ONLY_ID_TOKEN_CLAIMS: Only include ID Token Claims. Possible values: ["ONLY_ID_TOKEN_CLAIMS"]` ,
215
+ },
216
+ "response_type" : {
217
+ Type : schema .TypeString ,
218
+ Required : true ,
219
+ ValidateFunc : validateEnum ([]string {"ID_TOKEN" }),
220
+ Description : `The Response Type to request for in the OIDC Authorization Request for web sign-in.
221
+ * ID_TOKEN: The 'response_type=id_token' selection uses the Implicit Flow for web sign-in. Possible values: ["ID_TOKEN"]` ,
222
+ },
223
+ },
224
+ },
225
+ },
201
226
},
202
227
},
203
228
ExactlyOneOf : []string {"saml" , "oidc" },
@@ -646,6 +671,8 @@ func flattenIAMWorkforcePoolWorkforcePoolProviderOidc(v interface{}, d *schema.R
646
671
flattenIAMWorkforcePoolWorkforcePoolProviderOidcIssuerUri (original ["issuerUri" ], d , config )
647
672
transformed ["client_id" ] =
648
673
flattenIAMWorkforcePoolWorkforcePoolProviderOidcClientId (original ["clientId" ], d , config )
674
+ transformed ["web_sso_config" ] =
675
+ flattenIAMWorkforcePoolWorkforcePoolProviderOidcWebSsoConfig (original ["webSsoConfig" ], d , config )
649
676
return []interface {}{transformed }
650
677
}
651
678
func flattenIAMWorkforcePoolWorkforcePoolProviderOidcIssuerUri (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
@@ -656,6 +683,29 @@ func flattenIAMWorkforcePoolWorkforcePoolProviderOidcClientId(v interface{}, d *
656
683
return v
657
684
}
658
685
686
+ func flattenIAMWorkforcePoolWorkforcePoolProviderOidcWebSsoConfig (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
687
+ if v == nil {
688
+ return nil
689
+ }
690
+ original := v .(map [string ]interface {})
691
+ if len (original ) == 0 {
692
+ return nil
693
+ }
694
+ transformed := make (map [string ]interface {})
695
+ transformed ["response_type" ] =
696
+ flattenIAMWorkforcePoolWorkforcePoolProviderOidcWebSsoConfigResponseType (original ["responseType" ], d , config )
697
+ transformed ["assertion_claims_behavior" ] =
698
+ flattenIAMWorkforcePoolWorkforcePoolProviderOidcWebSsoConfigAssertionClaimsBehavior (original ["assertionClaimsBehavior" ], d , config )
699
+ return []interface {}{transformed }
700
+ }
701
+ func flattenIAMWorkforcePoolWorkforcePoolProviderOidcWebSsoConfigResponseType (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
702
+ return v
703
+ }
704
+
705
+ func flattenIAMWorkforcePoolWorkforcePoolProviderOidcWebSsoConfigAssertionClaimsBehavior (v interface {}, d * schema.ResourceData , config * Config ) interface {} {
706
+ return v
707
+ }
708
+
659
709
func expandIAMWorkforcePoolWorkforcePoolProviderDisplayName (v interface {}, d TerraformResourceData , config * Config ) (interface {}, error ) {
660
710
return v , nil
661
711
}
@@ -729,6 +779,13 @@ func expandIAMWorkforcePoolWorkforcePoolProviderOidc(v interface{}, d TerraformR
729
779
transformed ["clientId" ] = transformedClientId
730
780
}
731
781
782
+ transformedWebSsoConfig , err := expandIAMWorkforcePoolWorkforcePoolProviderOidcWebSsoConfig (original ["web_sso_config" ], d , config )
783
+ if err != nil {
784
+ return nil , err
785
+ } else if val := reflect .ValueOf (transformedWebSsoConfig ); val .IsValid () && ! isEmptyValue (val ) {
786
+ transformed ["webSsoConfig" ] = transformedWebSsoConfig
787
+ }
788
+
732
789
return transformed , nil
733
790
}
734
791
@@ -740,6 +797,40 @@ func expandIAMWorkforcePoolWorkforcePoolProviderOidcClientId(v interface{}, d Te
740
797
return v , nil
741
798
}
742
799
800
+ func expandIAMWorkforcePoolWorkforcePoolProviderOidcWebSsoConfig (v interface {}, d TerraformResourceData , config * Config ) (interface {}, error ) {
801
+ l := v .([]interface {})
802
+ if len (l ) == 0 || l [0 ] == nil {
803
+ return nil , nil
804
+ }
805
+ raw := l [0 ]
806
+ original := raw .(map [string ]interface {})
807
+ transformed := make (map [string ]interface {})
808
+
809
+ transformedResponseType , err := expandIAMWorkforcePoolWorkforcePoolProviderOidcWebSsoConfigResponseType (original ["response_type" ], d , config )
810
+ if err != nil {
811
+ return nil , err
812
+ } else if val := reflect .ValueOf (transformedResponseType ); val .IsValid () && ! isEmptyValue (val ) {
813
+ transformed ["responseType" ] = transformedResponseType
814
+ }
815
+
816
+ transformedAssertionClaimsBehavior , err := expandIAMWorkforcePoolWorkforcePoolProviderOidcWebSsoConfigAssertionClaimsBehavior (original ["assertion_claims_behavior" ], d , config )
817
+ if err != nil {
818
+ return nil , err
819
+ } else if val := reflect .ValueOf (transformedAssertionClaimsBehavior ); val .IsValid () && ! isEmptyValue (val ) {
820
+ transformed ["assertionClaimsBehavior" ] = transformedAssertionClaimsBehavior
821
+ }
822
+
823
+ return transformed , nil
824
+ }
825
+
826
+ func expandIAMWorkforcePoolWorkforcePoolProviderOidcWebSsoConfigResponseType (v interface {}, d TerraformResourceData , config * Config ) (interface {}, error ) {
827
+ return v , nil
828
+ }
829
+
830
+ func expandIAMWorkforcePoolWorkforcePoolProviderOidcWebSsoConfigAssertionClaimsBehavior (v interface {}, d TerraformResourceData , config * Config ) (interface {}, error ) {
831
+ return v , nil
832
+ }
833
+
743
834
func resourceIAMWorkforcePoolWorkforcePoolProviderDecoder (d * schema.ResourceData , meta interface {}, res map [string ]interface {}) (map [string ]interface {}, error ) {
744
835
if v := res ["state" ]; v == "DELETED" {
745
836
return nil , nil
0 commit comments