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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data source azurerm_network_service_tags does not work properly for AzureFrontDoor #12046

Open
tesharp opened this issue Jun 3, 2021 · 2 comments

Comments

@tesharp
Copy link
Contributor

tesharp commented Jun 3, 2021

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.15.4
on windows_amd64
+ provider registry.terraform.io/hashicorp/azurerm v2.60.0

Affected Resource(s)

  • azurerm_network_service_tags

Terraform Configuration Files

data "azurerm_network_service_tags" "frontdoor" {
  location        = azurerm_resource_group.main.location
  service         = "AzureFrontDoor.Backend"
  location_filter = " "
}

Debug Output

Panic Output

Expected Behaviour

Getting all IP's for AzureFrontDoor.Backend

Actual Behaviour

Getting error:

Error: specified service tag AzureFrontDoor.Backend not found globally

isServiceTagOf function in https://github.com/terraform-providers/terraform-provider-azurerm/blob/1aaa389743ff39c281367a8ad85b7b94540b4206/azurerm/internal/services/network/network_service_tags_data_source.go#L107 that match service tag to returned value from Azure makes the assumtion that name does not contain any dot, and if it does the last part is region. So for AzureFrontDoor.Backend it is unable to match the name to service.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@wbreza
Copy link

wbreza commented Aug 10, 2021

@tesharp - I ran into this same issue today and agree there is a bug. I did however find a workaround for my use case.

data "azurerm_network_service_tags" "service_tags" {
  location        = var.region
  service         = "AzureFrontDoor"
}

Omitting the Backend from the full service names appears to match on the first returned list of the AzureFrontDoor service names which happens to be Backend right now.

@jamesw4
Copy link

jamesw4 commented Jul 19, 2023

Any update on this? Ran in to this exact issue today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants