@@ -53,9 +53,9 @@ type SSHKey struct {
5353
5454// MFAConfig represents a user's MFA configuration
5555type MFAConfig struct {
56- Exclusion bool `json:"exclusion,omitempty"`
57- ExclusionUntil string `json:"exclusionUntil ,omitempty"`
58- Configured bool `json:"configured,omitempty"`
56+ Exclusion bool `json:"exclusion,omitempty"`
57+ ExclusionDays int `json:"exclusionDays ,omitempty"`
58+ Configured bool `json:"configured,omitempty"`
5959}
6060
6161// MFAEnrollment represents a user's MFA enrollment status
@@ -543,26 +543,29 @@ func ResourceUser() *schema.Resource {
543543 "mfa" : {
544544 Type : schema .TypeList ,
545545 Optional : true ,
546- Computed : true ,
547546 MaxItems : 1 ,
548547 Elem : & schema.Resource {
549548 Schema : map [string ]* schema.Schema {
550549 "exclusion" : {
551- Type : schema .TypeBool ,
552- Optional : true ,
553- Default : false ,
550+ Type : schema .TypeBool ,
551+ Optional : true ,
552+ Default : false ,
553+ Description : "Whether the user is excluded from MFA requirements" ,
554554 },
555- "exclusion_until " : {
556- Type : schema .TypeString ,
557- Optional : true ,
558- Computed : true ,
555+ "exclusion_days " : {
556+ Type : schema .TypeInt ,
557+ Optional : true ,
558+ Description : "Number of days the user is excluded from MFA requirements" ,
559559 },
560560 "configured" : {
561- Type : schema .TypeBool ,
562- Computed : true ,
561+ Type : schema .TypeBool ,
562+ Optional : true ,
563+ Computed : true ,
564+ Description : "Whether MFA is configured for the user" ,
563565 },
564566 },
565567 },
568+ Description : "MFA configuration for the user" ,
566569 },
567570 "state" : {
568571 Type : schema .TypeString ,
@@ -834,8 +837,8 @@ func resourceUserCreate(ctx context.Context, d *schema.ResourceData, meta any) d
834837 if len (mfaList ) > 0 {
835838 mfaMap := mfaList [0 ].(map [string ]any )
836839 user .MFA = MFAConfig {
837- Exclusion : mfaMap ["exclusion" ].(bool ),
838- ExclusionUntil : mfaMap ["exclusion_until " ].(string ),
840+ Exclusion : mfaMap ["exclusion" ].(bool ),
841+ ExclusionDays : mfaMap ["exclusion_days " ].(int ),
839842 }
840843 }
841844 }
@@ -1327,9 +1330,9 @@ func resourceUserRead(ctx context.Context, d *schema.ResourceData, meta any) dia
13271330 if user .MFA .Configured || user .MFA .Exclusion {
13281331 mfaConfig := []map [string ]any {
13291332 {
1330- "exclusion" : user .MFA .Exclusion ,
1331- "exclusion_until " : user .MFA .ExclusionUntil ,
1332- "configured" : user .MFA .Configured ,
1333+ "exclusion" : user .MFA .Exclusion ,
1334+ "exclusion_days " : user .MFA .ExclusionDays ,
1335+ "configured" : user .MFA .Configured ,
13331336 },
13341337 }
13351338 if err := d .Set ("mfa" , mfaConfig ); err != nil {
@@ -1570,8 +1573,8 @@ func resourceUserUpdate(ctx context.Context, d *schema.ResourceData, meta any) d
15701573 if len (mfaList ) > 0 {
15711574 mfaMap := mfaList [0 ].(map [string ]any )
15721575 user .MFA = MFAConfig {
1573- Exclusion : mfaMap ["exclusion" ].(bool ),
1574- ExclusionUntil : mfaMap ["exclusion_until " ].(string ),
1576+ Exclusion : mfaMap ["exclusion" ].(bool ),
1577+ ExclusionDays : mfaMap ["exclusion_days " ].(int ),
15751578 }
15761579 }
15771580 }
0 commit comments