是否可以与应用程序网关分开配置后端地址池 [英] Is it possible to provision backend address pool separately from application gateway

查看:10
本文介绍了是否可以与应用程序网关分开配置后端地址池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 terraform 配置我的基础架构并拥有一些共享基础架构.例如,拥有 1 个共享应用程序网关和多个应用程序特定的 Web 应用程序.

I want to provision my infrastructure with terraform and to have some shared infrastructure. For example, to have 1 shared application gateway and multiple application specific webapps sitting behind it.

是否可以通过单独的 terraform 项目进行配置?

Is it possible to provision this with separate terraform projects?

  1. 用于共享基础架构的 terraform 项目 - 创建一个空的/默认应用网关.
  2. 其他将创建 web 应用程序的项目以及为该共享应用程序 gw 的一些额外配置 - backend_address_pool、probe、backend_http_settings 等.

在文档中找不到如何做到这一点.有这个 - application_gateway 示例,其中所有内容都在 1 中提供去然后这个 - network_interface_application_gateway_backend_address_pool_association 你可以在那里建立一个关联应用 gw 和网络接口之间,但不是 webapp.

Could not find how can you do it in documentation. There is this - application_gateway example where everything is provided in 1 go and then this - network_interface_application_gateway_backend_address_pool_association where you can make a assotiation between app gw and a network interface, but not a webapp.

编辑

稍微扩展一下我想要实现的目标 - 应用程序网关将是整个非产品环境的一个应用程序网关(因此是共享的"),它可以节省成本.后面我想为多个环境配置多个应用程序,例如Accounts.DEV"、Accounts.UAT"、Calculator.Dev"等.希望这能让我的意图更加清晰.

To expand a bit on what I want to achieve - the application gateway will be one application gateway for the whole non-prod environment (hence "shared") and it is there to save the cost. Behind it I want to configure multiple applications for multiple environments, for example, "Accounts.DEV", "Accounts.UAT", "Calculator.Dev", etc. Hope this makes my intentions a bit clearer.

现在我正在尝试在共享项目中创建空的应用程序网关(使用默认池、前端配置和规则).然后,在每个应用程序部署之后运行一些额外的 az cli 逻辑(文档).

For now I am trying to create empty Application gateway in the shared project (with a default pool, front-end config and rules). And then, after each application deployment to run some extra az cli logic (documentation).

推荐答案

目前这在 terraform 中是不可能的,因为 Azure API 不允许逐步创建应用程序网关.如果这对您来说是个问题并希望改变它,请投票给 this这个功能请求.

Currently this is not possible with terraform due the fact that Azure API does not allow creating an App Gateway step by step. If this is an issue for you and would like it to change, please vote for this and this feature request.

来源:https://github.com/terraform-providers/terraform-provider-azurerm/issues/727

这篇关于是否可以与应用程序网关分开配置后端地址池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆