Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Azure.Provisioning.OperationalInsights DailyQuotaInGB generated as string instead of int #48249

Open
MattParkerDev opened this issue Feb 12, 2025 · 1 comment
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Provisioning question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@MattParkerDev
Copy link

Library name and version

Azure.Provisioning.OperationalInsights

Describe the bug

When defining a log analytics workspace like this:

var logAnalyticsWorkspace = new OperationalInsightsWorkspace("logAnalyticsWorkspace")
{
	Name = $"log-sample-dev",
	Location = "australiaeast",
	Identity = new ManagedServiceIdentity { ManagedServiceIdentityType = ManagedServiceIdentityType.SystemAssigned },
	Sku = new OperationalInsightsWorkspaceSku { Name = OperationalInsightsWorkspaceSkuName.PerGB2018 },
	WorkspaceCapping = new OperationalInsightsWorkspaceCapping { DailyQuotaInGB = 1 }
};

The generated bicep results in:

resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
  name: 'log-sample-dev'
  location: 'australiaeast'
  identity: {
    type: 'SystemAssigned'
  }
  properties: {
    sku: {
      name: 'PerGB2018'
    }
    workspaceCapping: {
      dailyQuotaGb: '1' <-------------
    }
  }
}

dailyQuotaGb should be an int, instead of a string.

DailyQuotaInGB is actually defined as a double in the SDK, probably needs to be changed to int :)

private BicepValue<double>? _dailyQuotaInGB;

Expected behavior

dailyQuotaGb should be an int in the output bicep

Actual behavior

dailyQuotaGb is a string in the output bicep

Reproduction Steps

var logAnalyticsWorkspace = new OperationalInsightsWorkspace("logAnalyticsWorkspace")
{
	Name = $"log-sample-dev",
	Location = "australiaeast",
	Identity = new ManagedServiceIdentity { ManagedServiceIdentityType = ManagedServiceIdentityType.SystemAssigned },
	Sku = new OperationalInsightsWorkspaceSku { Name = OperationalInsightsWorkspaceSkuName.PerGB2018 },
	WorkspaceCapping = new OperationalInsightsWorkspaceCapping { DailyQuotaInGB = 1 }
};

var infrastructure = new Infrastructure();
infrastructure.Add(logAnalyticsWorkspace);
var provisioningPlan = infrastructure.Build();
provisioningPlan.Save("./");

Environment

No response

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor Monitor, Monitor Ingestion, Monitor Query needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 12, 2025
Copy link

Thank you for your feedback. Tagging and routing to the team member best able to assist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Provisioning question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants