Skip to content

Commit

Permalink
add storage_autogrow property
Browse files Browse the repository at this point in the history
  • Loading branch information
r0bnet committed Sep 12, 2019
1 parent c6fe70b commit ffdb781
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions azurerm/resource_arm_mariadb_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@ func resourceArmMariaDbServer() *schema.Resource {
string(mariadb.Disabled),
}, false),
},

"storage_autogrow": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{
string(mariadb.StorageAutogrowEnabled),
string(mariadb.StorageAutogrowDisabled),
}, false),
},
},
},
},
Expand Down Expand Up @@ -400,11 +409,13 @@ func expandAzureRmMariaDbStorageProfile(d *schema.ResourceData) *mariadb.Storage
backupRetentionDays := storageprofile["backup_retention_days"].(int)
geoRedundantBackup := storageprofile["geo_redundant_backup"].(string)
storageMB := storageprofile["storage_mb"].(int)
autoGrow := storageprofile["storage_autogrow"].(string)

return &mariadb.StorageProfile{
BackupRetentionDays: utils.Int32(int32(backupRetentionDays)),
GeoRedundantBackup: mariadb.GeoRedundantBackup(geoRedundantBackup),
StorageMB: utils.Int32(int32(storageMB)),
StorageAutogrow: mariadb.StorageAutogrow(autoGrow),
}
}

Expand Down Expand Up @@ -449,5 +460,7 @@ func flattenMariaDbStorageProfile(storage *mariadb.StorageProfile) []interface{}

values["geo_redundant_backup"] = string(storage.GeoRedundantBackup)

values["storage_autogrow"] = string(storage.StorageAutogrow)

return []interface{}{values}
}

0 comments on commit ffdb781

Please sign in to comment.