Skip to content

Commit

Permalink
fix: azure ccm connector no billing export (#637)
Browse files Browse the repository at this point in the history
Co-authored-by: K Rohit Reddy <rohit.reddy@harness.io>
  • Loading branch information
rssnyder and Rohit-Kaliki committed Jul 31, 2023
1 parent f0360ff commit b27000b
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions internal/service/platform/connector/azure_cloud_cost.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,17 @@ func readConnectorAzureCloudCost(d *schema.ResourceData, connector *nextgen.Conn
d.Set("features_enabled", connector.AzureCloudCost.FeaturesEnabled)
d.Set("tenant_id", connector.AzureCloudCost.TenantId)
d.Set("subscription_id", connector.AzureCloudCost.SubscriptionId)
d.Set("billing_export_spec", []interface{}{
map[string]interface{}{
"storage_account_name": connector.AzureCloudCost.BillingExportSpec.StorageAccountName,
"container_name": connector.AzureCloudCost.BillingExportSpec.ContainerName,
"directory_name": connector.AzureCloudCost.BillingExportSpec.DirectoryName,
"report_name": connector.AzureCloudCost.BillingExportSpec.ReportName,
"subscription_id": connector.AzureCloudCost.BillingExportSpec.SubscriptionId,
},
})
if isFeatureEnabled("BILLING", connector.AzureCloudCost.FeaturesEnabled) {
d.Set("billing_export_spec", []interface{}{
map[string]interface{}{
"storage_account_name": connector.AzureCloudCost.BillingExportSpec.StorageAccountName,
"container_name": connector.AzureCloudCost.BillingExportSpec.ContainerName,
"directory_name": connector.AzureCloudCost.BillingExportSpec.DirectoryName,
"report_name": connector.AzureCloudCost.BillingExportSpec.ReportName,
"subscription_id": connector.AzureCloudCost.BillingExportSpec.SubscriptionId,
},
})
}

return nil
}

0 comments on commit b27000b

Please sign in to comment.