Hello, I’m trying to debug an issue introduced by...
# azure
b
Hello, I’m trying to debug an issue introduced by the
terraform azurerm - v2.34.0
provider. I downgraded to
@pulumi/azure - v3.28.0
which uses
terraform azurerm v2.33.0
according to https://github.com/pulumi/pulumi-azure/blob/master/CHANGELOG.md But I still got the same error message
Copy code
error: azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace resource 'log-f-stack-s-a-sb' has a problem: expected daily_quota_gb to be at least (0.000000), got -1.000000
The
daily_quota_gb
property was not present before`terraform azurerm v2.34.0` so I wonder why I still got this error. Terraform changelog: https://github.com/terraform-providers/terraform-provider-azurerm/releases/tag/v2.34.0
azurerm_log_analytics_workspace
 - support for the 
daily_quota_gb
 property (#8861)
I can also confirm this with this commit which in only present in v2.34
b
Hey @boundless-airport-99052 So this issue is this line:
Copy code
if workspaceCapping := resp.WorkspaceCapping; workspaceCapping != nil {
		d.Set("daily_quota_gb", resp.WorkspaceCapping.DailyQuotaGb)
	} else {
		d.Set("daily_quota_gb", utils.Float(-1))
	}
notice it's being set to -1 here
b
hi paul
b
the way around this for you would be to use ignoreChanges on that property
then we can open an issue and help work through it
b
the code you mentioned is pulumi or terrform code?
b
TF code
we don't have any explicit mapping of that field
wait a minute, I linked to the wrong code but it's still the same issue:
Copy code
"daily_quota_gb": {
				Type:             schema.TypeFloat,
				Optional:         true,
				Default:          -1.0,
				DiffSuppressFunc: dailyQuotaGbDiffSuppressFunc,
				ValidateFunc:     validation.FloatAtLeast(0),
			},
b
you’re right
which is not in terraform v2.33
it’s why I try dowgraded to @pulumi/azure - v3.28.0
b
I am on master and see this in the provider
b
is pulumi using the terraform master branch?
b
nope this code was added 27 days ago
that's the commit that added it
which was released in v2.39.0 of AzureRM TF provide
b
yes
b
agreed - this is the bug for sure
so setting ignoreChanges on this should work for you for now till we can fix it up
b
Yes, but if I use @pulumi/azure v3.28, I should use terraform v2.33, isn’t it?
b
those are correct versions
yes
b
(Note that I didn’t set the
dailyQuotaGb
in the pulumi code. But this property is returned by azure - I try to add the
ignoreChanges
property and I still got this error)
I created a new pulumi project (
@pulumi/azure v3.32.0
) with a new AnalyticsWorkspace resource. I was able to reproduce the error message. Then I downgraded to
@pulumi/azure v3.28.0
and I didn’t have the error anymore 👍 But on my real project, after having downgraded to
@pulumi/azure v3.28.0
I still got the error 🤔 The only difference I see is that in my real project the AnalyticsWorkspace resource already exists. Do you have any idea?
b
mmmhhhh that's super weird! If azure is returning that then it's a potential breakage in their API - can you set the value to 0 for now?
or whatever makes sense for your project to ensure you are not blocked
b
I set the verbose to
9
and got this:
Copy code
I1207 14:37:59.165317   71348 rpc.go:247] Unmarshaling property for RPC[Provider[azure, 0xc0013b7c80].Check(urn:pulumi:sandbox::foundations::maif:subscription$azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace::log-f-stack-s-a-sb).inputs]: __defaults={[{dailyQuotaGb} {internetIngestionEnabled} {internetQueryEnabled} {location}]}
I1207 14:37:59.165358   71348 rpc.go:247] Unmarshaling property for RPC[Provider[azure, 0xc0013b7c80].Check(urn:pulumi:sandbox::foundations::maif:subscription$azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace::log-f-stack-s-a-sb).inputs]: dailyQuotaGb={-1}
I1207 14:37:59.165376   71348 rpc.go:247] Unmarshaling property for RPC[Provider[azure, 0xc0013b7c80].Check(urn:pulumi:sandbox::foundations::maif:subscription$azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace::log-f-stack-s-a-sb).inputs]: internetIngestionEnabled={true}
I1207 14:37:59.165390   71348 rpc.go:247] Unmarshaling property for RPC[Provider[azure, 0xc0013b7c80].Check(urn:pulumi:sandbox::foundations::maif:subscription$azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace::log-f-stack-s-a-sb).inputs]: internetQueryEnabled={true}
I1207 14:37:59.165403   71348 rpc.go:247] Unmarshaling property for RPC[Provider[azure, 0xc0013b7c80].Check(urn:pulumi:sandbox::foundations::maif:subscription$azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace::log-f-stack-s-a-sb).inputs]: location={francecentral}
I1207 14:37:59.165413   71348 rpc.go:247] Unmarshaling property for RPC[Provider[azure, 0xc0013b7c80].Check(urn:pulumi:sandbox::foundations::maif:subscription$azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace::log-f-stack-s-a-sb).inputs]: name={log-f-stack-s-a-sb-yh}
I1207 14:37:59.165439   71348 rpc.go:247] Unmarshaling property for RPC[Provider[azure, 0xc0013b7c80].Check(urn:pulumi:sandbox::foundations::maif:subscription$azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace::log-f-stack-s-a-sb).inputs]: resourceGroupName={rg-cloud-platform}
I1207 14:37:59.165465   71348 rpc.go:247] Unmarshaling property for RPC[Provider[azure, 0xc0013b7c80].Check(urn:pulumi:sandbox::foundations::maif:subscription$azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace::log-f-stack-s-a-sb).inputs]: retentionInDays={30}
I1207 14:37:59.165488   71348 rpc.go:247] Unmarshaling property for RPC[Provider[azure, 0xc0013b7c80].Check(urn:pulumi:sandbox::foundations::maif:subscription$azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace::log-f-stack-s-a-sb).inputs]: sku={PerGB2018}
I1207 14:37:59.165509   71348 provider_plugin.go:574] Provider[azure, 0xc0013b7c80].Check(urn:pulumi:sandbox::foundations::maif:subscription$azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace::log-f-stack-s-a-sb) success: inputs=#9 failures=#1
I1207 14:37:59.165530   71348 eventsink.go:86] eventSink::Error(<{%reset%}>azure:operationalinsights/analyticsWorkspace:AnalyticsWorkspace resource 'log-f-stack-s-a-sb' has a problem: expected daily_quota_gb to be at least (0.000000), got -1.000000<{%reset%}>)
How can I debug it more?
I also checkout the tag
v2.28.0
of
terraform-provider-azurerm
and no code mention
daily_quota_gb
in my
node_modules
folder, I grep for
dailyQuotaGb
or `daily_quota_qb`and didn’t find anything neither
I set the value to 100000, so I’m not blocked anymore. I will open an issue on terraform BUT I don’t understand why I got the error after having downgrade to @pulumi/azure v3.28.0. Do you have any idea? How can I debug this?
b
Open an issue on pulumi-azure and we can look into it
it seems to be an issue on our side TBH
b
great, I’ll do
thanks for your time
I also created this: https://github.com/pulumi/pulumi-azure/issues/784 (which is related)