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

The provider provider.azurerm does not support data source "azurerm_express_route_circuit_peering" #13670

Open
akhassanov opened this issue Oct 8, 2021 · 1 comment

Comments

@akhassanov
Copy link

akhassanov commented Oct 8, 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 v1.0.8
on windows_amd64

  • provider registry.terraform.io/hashicorp/azurerm v2.80.0

Affected Resource(s)

  • azurerm_express_route_circuit_peering

Terraform Configuration Files

data "azurerm_express_route_circuit_peering" "this" {
peering_type = "AzurePrivatePeering"
express_route_circuit_name = var.er_name
resource_group_name = var.er_rg_name
}

Debug Output

Panic Output

Expected Behaviour

I expect to be able to use data.azurerm_express_route_circuit_peering.this.id to create Express route Connection

Actual Behaviour

Error: Invalid data source

│ on data.tf line 6, in data "azurerm_express_route_circuit_peering" "this":
│ 6: data "azurerm_express_route_circuit_peering" "this" {

│ The provider hashicorp/azurerm does not support data source "azurerm_express_route_circuit_peering".

│ Did you intend to use the managed resource type "azurerm_express_route_circuit_peering"? If so, declare this
│ using a "resource" block instead of a "data" block.

Steps to Reproduce

terraform init
terraform plan
terraform apply

Important Factoids

none

References

  • #0000
@ShuheiUda
Copy link

data source "azurerm_express_route_circuit_peering" is really needed.

When connecting ExpressRoute Gateway and ExpressRoute Circuit, express_route_circuit_peering_id is required.
We can't create "azurerm_express_route_circuit_peering" via terraform because some ExpressRoute provider (mainly L3 provider) create peering settings from provider side. (If create peerings via terraform, it will be failed because of duplicate.)

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/express_route_connection#express_route_circuit_peering_id

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

4 participants