terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

Associating VM to Application Security Group is failing

Open JanIsaksson opened this issue 3 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Community Note

  • Please vote on this issue by adding a :thumbsup: 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 Version

v1.2.7

AzureRM Provider Version

3.10.0

Affected Resource(s)/Data Source(s)

VM and ASG

Terraform Configuration Files

# 
# Associating VMs with Application Security Groups is not currently working in Terraform
#
/*
resource "azurerm_network_interface_application_security_group_association" "web-asg-assign" {
  for_each = var.adf-vm
  network_interface_id          = module.vm-yoda-web[each.key].nic-vm.id
  application_security_group_id = module.yoda-infra-int-devtest.asgs["web"].id
}
*/

Debug Output/Panic Output

C:\Users\jais\Azure\repo\yoda>terraform apply "myplan"
azurerm_network_interface_application_security_group_association.web-asg-assign["vm1"]: Creating...
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to azurerm_network_interface_application_security_group_association.web-asg-assign["vm1"], provider "provider[\"registry.terraform.io/hashicorp/azurerm\"]" produced an unexpected new value:
│ Root resource was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Expected Behaviour

A VM that is associated to the ASG

Actual Behaviour

Error!

Steps to Reproduce

terraform plan terraform apply

Important Factoids

No

References

None

JanIsaksson avatar Aug 11 '22 13:08 JanIsaksson