Skip to content

Commit

Permalink
nit: removing comments/defaults/forcenew from the state migration
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Mar 19, 2024
1 parent 4dcd7ef commit 073b3c5
Showing 1 changed file with 0 additions and 64 deletions.
64 changes: 0 additions & 64 deletions internal/services/automanage/migration/configuration_v0_to_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,17 @@ func (ConfigurationV0ToV1) Schema() map[string]*pluginsdk.Schema {
"name": {
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
},

"resource_group_name": {
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
},

"location": {
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
},

// "Antimalware/Enable": boolean, true if block exists
// "Antimalware/EnableRealTimeProtection": boolean,
// "Antimalware/RunScheduledScan": boolean,
// "Antimalware/ScanType": string ("Quick", "Full"),
// "Antimalware/ScanDay": int (0-8) Ex: 0 - daily, 1 - Sunday, 2 - Monday, .... 7 - Saturday, 8 - Disabled,
// "Antimalware/ScanTimeInMinutes": int (0 - 1440),
// "Antimalware/Exclusions/Extensions": string (extensions separated by semicolon. Ex: ".ext1;.ext2"),
// "Antimalware/Exclusions/Paths": string (Paths separated by semicolon. Ex: "c:\excluded-path-1;c:\excluded-path-2"),
// "Antimalware/Exclusions/Processes": string (Processes separated by semicolon. Ex: "proc1.exe;proc2.exe"),
"antimalware": {
Type: pluginsdk.TypeList,
Optional: true,
Expand All @@ -51,27 +38,22 @@ func (ConfigurationV0ToV1) Schema() map[string]*pluginsdk.Schema {
"real_time_protection_enabled": {
Type: pluginsdk.TypeBool,
Optional: true,
Default: false,
},
"scheduled_scan_enabled": {
Type: pluginsdk.TypeBool,
Optional: true,
Default: false,
},
"scheduled_scan_type": {
Type: pluginsdk.TypeString,
Optional: true,
Default: "Quick",
},
"scheduled_scan_day": {
Type: pluginsdk.TypeInt,
Optional: true,
Default: 8,
},
"scheduled_scan_time_in_minutes": {
Type: pluginsdk.TypeInt,
Optional: true,
Default: 0,
},
"exclusions": {
Type: pluginsdk.TypeList,
Expand All @@ -97,9 +79,6 @@ func (ConfigurationV0ToV1) Schema() map[string]*pluginsdk.Schema {
},
},
},

// "AzureSecurityBaseline/Enable": boolean, true if block exists
// "AzureSecurityBaseline/AssignmentType": string ("ApplyAndAutoCorrect", "ApplyAndMonitor", "Audit", "DeployAndAutoCorrect"),
"azure_security_baseline": {
Type: pluginsdk.TypeList,
Optional: true,
Expand All @@ -109,27 +88,10 @@ func (ConfigurationV0ToV1) Schema() map[string]*pluginsdk.Schema {
"assignment_type": {
Type: pluginsdk.TypeString,
Optional: true,
Default: "ApplyAndAutoCorrect",
},
},
},
},

// "Backup/Enable": boolean, true if block exists
// "Backup/PolicyName": string (length 3 - 150, begin with alphanumeric char, only contain alphanumeric chars and hyphens),
// "Backup/TimeZone": timezone,
// "Backup/InstantRpRetentionRangeInDays": int (1 - 5 if ScheduleRunFrequency is Daily, 5 if ScheduleRunFrequency is Weekly),
// "Backup/SchedulePolicy/ScheduleRunFrequency": string ("Daily", "Weekly"),
// "Backup/SchedulePolicy/ScheduleRunTimes": list of DateTime,
// "Backup/SchedulePolicy/ScheduleRunDays": list of strings (["Sunday", "Monday", "Wednesday", "Thursday", "Friday", "Saturday"]),
// "Backup/SchedulePolicy/SchedulePolicyType": string ("SimpleSchedulePolicy"),
// "Backup/RetentionPolicy/RetentionPolicyType": string ("LongTermRetentionPolicy"),
// "Backup/RetentionPolicy/DailySchedule/RetentionTimes": list of DateTime,
// "Backup/RetentionPolicy/DailySchedule/RetentionDuration/Count": int (7 - 9999),
// "Backup/RetentionPolicy/DailySchedule/RetentionDuration/DurationType": string ("Days"),
// "Backup/RetentionPolicy/WeeklySchedule/RetentionTimes":, list of DateTime
// "Backup/RetentionPolicy/WeeklySchedule/RetentionDuration/Count":, int (1 - 5163)
// "Backup/RetentionPolicy/WeeklySchedule/RetentionDuration/DurationType": string ("Weeks"),
"backup": {
Type: pluginsdk.TypeList,
Optional: true,
Expand All @@ -143,12 +105,10 @@ func (ConfigurationV0ToV1) Schema() map[string]*pluginsdk.Schema {
"time_zone": {
Type: pluginsdk.TypeString,
Optional: true,
Default: "UTC",
},
"instant_rp_retention_range_in_days": {
Type: pluginsdk.TypeInt,
Optional: true,
Default: 5,
},
"schedule_policy": {
Type: pluginsdk.TypeList,
Expand All @@ -159,12 +119,10 @@ func (ConfigurationV0ToV1) Schema() map[string]*pluginsdk.Schema {
"schedule_run_frequency": {
Type: pluginsdk.TypeString,
Optional: true,
Default: "Daily",
},
"schedule_run_times": {
Type: pluginsdk.TypeList,
Optional: true,

Elem: &pluginsdk.Schema{
Type: pluginsdk.TypeString,
},
Expand All @@ -179,7 +137,6 @@ func (ConfigurationV0ToV1) Schema() map[string]*pluginsdk.Schema {
"schedule_policy_type": {
Type: pluginsdk.TypeString,
Optional: true,
Default: "SimpleSchedulePolicy",
},
},
},
Expand All @@ -193,7 +150,6 @@ func (ConfigurationV0ToV1) Schema() map[string]*pluginsdk.Schema {
"retention_policy_type": {
Type: pluginsdk.TypeString,
Optional: true,
Default: "LongTermRetentionPolicy",
},
"daily_schedule": {
Type: pluginsdk.TypeList,
Expand Down Expand Up @@ -221,7 +177,6 @@ func (ConfigurationV0ToV1) Schema() map[string]*pluginsdk.Schema {
"duration_type": {
Type: pluginsdk.TypeString,
Optional: true,
Default: "Days",
},
},
},
Expand Down Expand Up @@ -255,7 +210,6 @@ func (ConfigurationV0ToV1) Schema() map[string]*pluginsdk.Schema {
"duration_type": {
Type: pluginsdk.TypeString,
Optional: true,
Default: "Weeks",
},
},
},
Expand All @@ -269,48 +223,30 @@ func (ConfigurationV0ToV1) Schema() map[string]*pluginsdk.Schema {
},
},
},

// "AutomationAccount/Enable": boolean,
"automation_account_enabled": {
Type: pluginsdk.TypeBool,
Optional: true,
Default: false,
},

// "BootDiagnostics/Enable": boolean,
"boot_diagnostics_enabled": {
Type: pluginsdk.TypeBool,
Optional: true,
Default: false,
},

// "DefenderForCloud/Enable": boolean,
"defender_for_cloud_enabled": {
Type: pluginsdk.TypeBool,
Optional: true,
Default: false,
},
// "GuestConfiguration/Enable": boolean,
"guest_configuration_enabled": {
Type: pluginsdk.TypeBool,
Optional: true,
Default: false,
},

// "LogAnalytics/Enable": boolean,
"log_analytics_enabled": {
Type: pluginsdk.TypeBool,
Optional: true,
Default: false,
},

// "Alerts/AutomanageStatusChanges/Enable": boolean,
"status_change_alert_enabled": {
Type: pluginsdk.TypeBool,
Optional: true,
Default: false,
},

"tags": {
Type: pluginsdk.TypeMap,
Optional: true,
Expand Down

0 comments on commit 073b3c5

Please sign in to comment.