如何解决如何使用Ansible将Swagger部署到Azure API管理?
我当前正在使用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 举报,一经查实,本站将立刻删除。