Skip to content

Commit

Permalink
Rename partition_data to partition_data_enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
joshk0 committed Jul 3, 2024
1 parent 41769c3 commit e60895b
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ resource "azurerm_billing_account_cost_management_export" "test" {
recurrence_type = "Monthly"
recurrence_period_start_date = "%sT00:00:00Z"
recurrence_period_end_date = "%sT00:00:00Z"
partition_data = true
partition_data_enabled = true
export_data_storage_location {
container_id = azurerm_storage_container.test.resource_manager_id
Expand Down Expand Up @@ -219,7 +219,7 @@ resource "azurerm_billing_account_cost_management_export" "import" {
recurrence_type = azurerm_billing_account_cost_management_export.test.recurrence_type
recurrence_period_start_date = azurerm_billing_account_cost_management_export.test.recurrence_period_start_date
recurrence_period_end_date = azurerm_billing_account_cost_management_export.test.recurrence_period_start_date
partition_data = azurerm_billing_account_cost_management_export.test.partition_data
partition_data_enabled = azurerm_billing_account_cost_management_export.test.partition_data
export_data_storage_location {
container_id = azurerm_storage_container.test.resource_manager_id
Expand Down
6 changes: 3 additions & 3 deletions internal/services/costmanagement/export_resource_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (br costManagementExportBaseResource) arguments(fields map[string]*pluginsd
Default: true,
},

"partition_data": {
"partition_data_enabled": {
Type: pluginsdk.TypeBool,
Optional: true,
Required: false,
Expand Down Expand Up @@ -190,7 +190,7 @@ func (br costManagementExportBaseResource) readFunc(scopeFieldName string) sdk.R
if model := resp.Model; model != nil {
if props := model.Properties; props != nil {
if partitionData := props.PartitionData; partitionData != nil {
metadata.ResourceData.Set("partition_data", *partitionData)
metadata.ResourceData.Set("partition_data_enabled", *partitionData)
}

if schedule := props.Schedule; schedule != nil {
Expand Down Expand Up @@ -291,7 +291,7 @@ func createOrUpdateCostManagementExport(ctx context.Context, client *exports.Exp
props := exports.Export{
ETag: etag,
Properties: &exports.ExportProperties{
PartitionData: pointer.FromBool(metadata.ResourceData.Get("partition_data").(bool)),
PartitionData: pointer.FromBool(metadata.ResourceData.Get("partition_data_enabled").(bool)),
Schedule: &exports.ExportSchedule{
Recurrence: &recurrenceType,
RecurrencePeriod: &exports.ExportRecurrencePeriod{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ resource "azurerm_resource_group_cost_management_export" "test" {
recurrence_type = "Monthly"
recurrence_period_start_date = "%sT00:00:00Z"
recurrence_period_end_date = "%sT00:00:00Z"
partition_data = true
partition_data_enabled = true
export_data_storage_location {
container_id = azurerm_storage_container.test.resource_manager_id
Expand Down Expand Up @@ -173,7 +173,7 @@ resource "azurerm_resource_group_cost_management_export" "test" {
recurrence_type = "Monthly"
recurrence_period_start_date = "%sT00:00:00Z"
recurrence_period_end_date = "%sT00:00:00Z"
partition_data = true
partition_data_enabled = true
export_data_storage_location {
container_id = azurerm_storage_container.test.resource_manager_id
Expand All @@ -199,7 +199,7 @@ resource "azurerm_resource_group_cost_management_export" "import" {
recurrence_type = azurerm_resource_group_cost_management_export.test.recurrence_type
recurrence_period_start_date = azurerm_resource_group_cost_management_export.test.recurrence_period_start_date
recurrence_period_end_date = azurerm_resource_group_cost_management_export.test.recurrence_period_start_date
partition_data = azurerm_resource_group_cost_management_export.test.partition_data
partition_data_enabled = azurerm_resource_group_cost_management_export.test.partition_data
export_data_storage_location {
container_id = azurerm_storage_container.test.resource_manager_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ resource "azurerm_subscription_cost_management_export" "test" {
recurrence_type = "Monthly"
recurrence_period_start_date = "%sT00:00:00Z"
recurrence_period_end_date = "%sT00:00:00Z"
partition_data = true
partition_data_enabled = true
export_data_storage_location {
container_id = azurerm_storage_container.test.resource_manager_id
Expand Down Expand Up @@ -210,7 +210,7 @@ resource "azurerm_subscription_cost_management_export" "import" {
recurrence_type = azurerm_subscription_cost_management_export.test.recurrence_type
recurrence_period_start_date = azurerm_subscription_cost_management_export.test.recurrence_period_start_date
recurrence_period_end_date = azurerm_subscription_cost_management_export.test.recurrence_period_start_date
partition_data = azurerm_subscription_cost_management_export.test.partition_data
partition_data_enabled = azurerm_subscription_cost_management_export.test.partition_data
export_data_storage_location {
container_id = azurerm_storage_container.test.resource_manager_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ resource "azurerm_storage_container" "example" {
resource "azurerm_billing_account_cost_management_export" "example" {
name = "example"
billing_account_id = "example"
partition_data = true
partition_data_enabled = true
recurrence_type = "Monthly"
recurrence_period_start_date = "2020-08-18T00:00:00Z"
recurrence_period_end_date = "2020-09-18T00:00:00Z"
Expand All @@ -62,7 +62,7 @@ The following arguments are supported:

* `billing_account_id` - (Required) The id of the billing account on which to create an export. Changing this forces a new resource to be created.

* `partition_data` - (Optional) Whether data will be partitioned into smaller files to facilitate consumption.
* `partition_data_enabled` - (Optional) Whether data will be partitioned into smaller files to facilitate consumption.

* `recurrence_type` - (Required) How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ resource "azurerm_storage_container" "example" {
resource "azurerm_resource_group_cost_management_export" "example" {
name = "example"
resource_group_id = azurerm_resource_group.example.id
partition_data = true
partition_data_enabled = true
recurrence_type = "Monthly"
recurrence_period_start_date = "2020-08-18T00:00:00Z"
recurrence_period_end_date = "2020-09-18T00:00:00Z"
Expand All @@ -61,7 +61,7 @@ The following arguments are supported:

* `resource_group_id` - (Required) The id of the resource group on which to create an export. Changing this forces a new resource to be created.

* `partition_data` - (Optional) Whether data will be partitioned into smaller files to facilitate consumption.
* `partition_data_enabled` - (Optional) Whether data will be partitioned into smaller files to facilitate consumption.

* `recurrence_type` - (Required) How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ resource "azurerm_storage_container" "example" {
resource "azurerm_subscription_cost_management_export" "example" {
name = "example"
subscription_id = data.azurerm_subscription.example.id
partition_data = true
partition_data_enabled = true
recurrence_type = "Monthly"
recurrence_period_start_date = "2020-08-18T00:00:00Z"
recurrence_period_end_date = "2020-09-18T00:00:00Z"
Expand All @@ -63,7 +63,7 @@ The following arguments are supported:

* `subscription_id` - (Required) The id of the subscription on which to create an export. Changing this forces a new resource to be created.

* `partition_data` - (Optional) Whether data will be partitioned into smaller files to facilitate consumption.
* `partition_data_enabled` - (Optional) Whether data will be partitioned into smaller files to facilitate consumption.

* `recurrence_type` - (Required) How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`.

Expand Down

0 comments on commit e60895b

Please sign in to comment.