Terraform-创建Azure事件网格订阅-可以吗?

时间:2019-10-25 16:04:02

标签: azure terraform azure-eventgrid

我一直在Terraform中努力在Azure事件网格中创建事件订阅

每个屏幕截图......

EVENT SUBSCRIPTION DETAILS
NAME : EventGrid-Sub1
(don't need to change Event Schema) 

TOPIC DETAILS
Event Grid Domain
Topic Resource: EDG-SBX-EventGrid1
Domain Type: EventGrid-DomainTopic1 

ENDPOINT DETAILS
Endpoint Type: Event Hubs
Endpoint : eh-sbx-Ingestion 

我一直在使用这些作为参考,但似乎不仅有点像鸡蛋和鸡蛋,而且缺少碎片?

https://www.terraform.io/docs/providers/azurerm/r/eventgrid_event_subscription.html https://www.terraform.io/docs/providers/azurerm/r/eventgrid_topic.html

有人在Terraform中工作吗?

预先感谢

Azure Screenshot on Event Grids / Create Event Subscription screen

1 个答案:

答案 0 :(得分:0)

@ nmca70有几种方法可以实现此目的:

  1. 从最终部署中创建一个ARM模板,然后使用Terraform运行该ARM模板:

https://www.terraform.io/docs/providers/azurerm/r/template_deployment.html

  1. 按以下顺序创建资源:

示例:

fixed=TRUE

希望这会有所帮助!