问题描述
我当前正在使用terraform创建我的Azure API管理实例。
为此,我还以for root,dirs,files in os.walk(root_folder):
for f in files:
if os.path.splitext(f)[1] == '.py':
get_fully_name_of_the_file # like app.modules.amazon
from from_fully_name import that_instance
that_instance.my_method()
的形式上传了我的api文档。
https://www.terraform.io/docs/providers/azurerm/r/api_management_api.html
swagger.json
但是,我不想让terraform要求仅通过构建就可以完成该体系结构的部署。
部署的第二部分使用ansible来配置资源,在其中放置各种文件,等等。
但是,ansible尚不支持Azure APIM:
https://github.com/ansible-collections/azure/issues/209
是否可以使用另一个委托给resource "azurerm_api_management_api" "swagger" {
name = "my-api"
resource_group_name = var.resource_group_name
api_management_name = azurerm_api_management.apim.name
revision = "1"
display_name = "My API"
description = "API to request and add transactions."
path = ""
protocols = ["https"]
import {
content_format = "swagger-json"
content_value = file("../../web/rest/build/test/swagger.json")
}
}
的ansible模块或rest api来做到这一点?
例如https://docs.ansible.com/ansible/latest/modules/uri_module.html或https://docs.ansible.com/ansible/latest/modules/azure_rm_resource_module.html
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)