@@ -25,16 +25,16 @@ func WriteGroups(groups []*gl.Group, w io.Writer, groupRefs groupRefMap) error {
2525 if g .Description != "" {
2626 body .SetAttributeValue ("description" , cty .StringVal (g .Description ))
2727 }
28- if g .Visibility != "" {
28+ if g .Visibility != gl . PublicVisibility {
2929 body .SetAttributeValue ("visibility_level" , cty .StringVal (string (g .Visibility )))
3030 }
3131 if g .ParentID != 0 {
3232 setGroupIDAttribute (body , "parent_id" , g .ParentID , groupRefs )
3333 }
34- if g .LFSEnabled {
34+ if ! g .LFSEnabled {
3535 body .SetAttributeValue ("lfs_enabled" , cty .BoolVal (g .LFSEnabled ))
3636 }
37- if g .RequestAccessEnabled {
37+ if ! g .RequestAccessEnabled {
3838 body .SetAttributeValue ("request_access_enabled" , cty .BoolVal (g .RequestAccessEnabled ))
3939 }
4040 if g .MembershipLock {
@@ -46,13 +46,13 @@ func WriteGroups(groups []*gl.Group, w io.Writer, groupRefs groupRefMap) error {
4646 if g .RequireTwoFactorAuth {
4747 body .SetAttributeValue ("require_two_factor_authentication" , cty .BoolVal (g .RequireTwoFactorAuth ))
4848 }
49- if g .TwoFactorGracePeriod != 0 {
49+ if g .TwoFactorGracePeriod != 48 {
5050 body .SetAttributeValue ("two_factor_grace_period" , cty .NumberIntVal (g .TwoFactorGracePeriod ))
5151 }
52- if g .ProjectCreationLevel != "" {
52+ if g .ProjectCreationLevel != gl . DeveloperProjectCreation {
5353 body .SetAttributeValue ("project_creation_level" , cty .StringVal (string (g .ProjectCreationLevel )))
5454 }
55- if g .SubGroupCreationLevel != "" {
55+ if g .SubGroupCreationLevel != gl . MaintainerSubGroupCreationLevelValue {
5656 body .SetAttributeValue ("subgroup_creation_level" , cty .StringVal (string (g .SubGroupCreationLevel )))
5757 }
5858 if g .AutoDevopsEnabled {
@@ -67,13 +67,13 @@ func WriteGroups(groups []*gl.Group, w io.Writer, groupRefs groupRefMap) error {
6767 if g .PreventForkingOutsideGroup {
6868 body .SetAttributeValue ("prevent_forking_outside_group" , cty .BoolVal (g .PreventForkingOutsideGroup ))
6969 }
70- if g .SharedRunnersSetting != "" {
70+ if g .SharedRunnersSetting != gl . EnabledSharedRunnersSettingValue {
7171 body .SetAttributeValue ("shared_runners_setting" , cty .StringVal (string (g .SharedRunnersSetting )))
7272 }
7373 if g .DefaultBranch != "" {
7474 body .SetAttributeValue ("default_branch" , cty .StringVal (g .DefaultBranch ))
7575 }
76- if g .WikiAccessLevel != "" {
76+ if g .WikiAccessLevel != gl . EnabledAccessControl {
7777 body .SetAttributeValue ("wiki_access_level" , cty .StringVal (string (g .WikiAccessLevel )))
7878 }
7979 if g .IPRestrictionRanges != "" {
0 commit comments