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

Expected value "1" to be "azurerm_automation_variable_int", actual type is "azurerm_automation_variable_bool" #8953

Closed
timbehh opened this issue Oct 20, 2020 · 2 comments · Fixed by #12511

Comments

@timbehh
Copy link

timbehh commented Oct 20, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform v0.13.4
+ provider registry.terraform.io/hashicorp/azurerm v2.32.0

Affected Resource(s)

  • azurerm_automation_variable_int`

Terraform Configuration Files

provider "azurerm" {
  version         = "=2.32.0"
  subscription_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  features {}
}

resource "azurerm_automation_variable_int" "serverStartThreshold" {
  name                    = "WVD-Scaling-serverStartThreshold"
  resource_group_name     = "wvd-oln-prd-automation-we"
  automation_account_name = "wvd-oln-prd-automation"
  value                   = 1
}

Debug Output

https://gist.github.com/timbehh/7d07bd9194c083266ffeefa88aa7eefa

Panic Output

Expected Behavior

Automation Account variable of type integer with value 1 is created and terraform apply finishes successfully.

Actual Behavior

azurerm_automation_variable_int.serverStartThreshold: Refreshing state... [id=/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/wvd-oln-prd-automation-we/providers/Microsoft.Automation/automationAccounts/wvd-oln-prd-automation/variables/WVD-Scaling-serverStartThreshold]

Error: Expected value "1" to be "azurerm_automation_variable_int", actual type is "azurerm_automation_variable_bool"

When applying for the first time, the variable is created successfully. Immediatly after that the apply fails with the shown error. Subsequent applies fail with the shown error.
The behavior is the same when using the value 0.
The behavior does not occur when using the value 2.

My interpretation:
When getting the variable from azure the values 0 and 1 are interpreted as boolean instead of integer.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

ritesh-modi pushed a commit to ritesh-modi/terraform-provider-azurerm that referenced this issue Oct 20, 2020
…_count both for default as well as other node pools
ritesh-modi pushed a commit to ritesh-modi/terraform-provider-azurerm that referenced this issue Oct 20, 2020
…_count both for default as well as other node pools
ritesh-modi pushed a commit to ritesh-modi/terraform-provider-azurerm that referenced this issue Oct 20, 2020
…_count both for default as well as other node pools
ritesh-modi pushed a commit to ritesh-modi/terraform-provider-azurerm that referenced this issue Oct 20, 2020
…_count both for default as well as other node pools
@jackofallops jackofallops added this to the v2.67.0 milestone Jul 8, 2021
@github-actions
Copy link

github-actions bot commented Jul 9, 2021

This functionality has been released in v2.67.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Aug 9, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants