-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
774c53d
commit 7a4139d
Showing
6 changed files
with
54 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,166 +1,67 @@ | ||
# ############## | ||
# ## Products ## | ||
# ############## | ||
############## | ||
## Products ## | ||
############## | ||
|
||
# module "apim_product_devopslab" { | ||
# source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v7.23.0" | ||
module "apim_product_blueprint" { | ||
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_product?ref=v7.23.0" | ||
|
||
# product_id = "devopslab" | ||
# display_name = "DevOpsLab Program" | ||
# description = "Product for DevOpsLab backend" | ||
product_id = "blueprint" | ||
display_name = "blueprint product" | ||
description = "Product for blueprint backend" | ||
|
||
# api_management_name = module.apim.name | ||
# resource_group_name = module.apim.resource_group_name | ||
|
||
# published = true | ||
# subscription_required = true | ||
# approval_required = false | ||
|
||
# policy_xml = file("./api_product/devopslab/_base_policy.xml") | ||
# } | ||
api_management_name = module.apim.name | ||
resource_group_name = module.apim.resource_group_name | ||
|
||
published = true | ||
subscription_required = true | ||
approval_required = false | ||
|
||
# ############## | ||
# ## APIs ## | ||
# ############## | ||
policy_xml = file("./api_product/blueprint/_base_policy.xml") | ||
} | ||
|
||
# ### webapp-python-alpha | ||
|
||
# locals { | ||
# apim_devopslab_webapp_python_alpha_api = { | ||
# # params for all api versions | ||
# display_name = "Webapp Python Alpha api" | ||
# description = "Webapp Python Alpha api" | ||
# path = "webapp-python-alpha" | ||
# subscription_required = false | ||
# service_url = "http://mock-aks/webapp-python-alpha" | ||
# api_name = "${var.env}-webapp-python-alpha-api" | ||
# } | ||
# } | ||
############## | ||
## APIs ## | ||
############## | ||
|
||
# # resource "azurerm_api_management_api_version_set" "apim_devopslab_webapp_python_alpha_api" { | ||
# # name = local.apim_devopslab_webapp_python_alpha_api.api_name | ||
# # resource_group_name = module.apim.resource_group_name | ||
# # api_management_name = module.apim.name | ||
# # display_name = local.apim_devopslab_webapp_python_alpha_api.display_name | ||
# # versioning_scheme = "Segment" | ||
# # } | ||
### status-alpha | ||
|
||
# module "apim_devopslab_webapp_python_alpha_api_v1" { | ||
# source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v7.23.0" | ||
locals { | ||
apim_blueprint_product = { | ||
# params for all api versions | ||
path = "blueprint" | ||
} | ||
} | ||
|
||
# name = local.apim_devopslab_webapp_python_alpha_api.api_name | ||
# api_management_name = module.apim.name | ||
# product_ids = [module.apim_product_devopslab.product_id] | ||
# subscription_required = local.apim_devopslab_webapp_python_alpha_api.subscription_required | ||
# # version_set_id = azurerm_api_management_api_version_set.apim_devopslab_webapp_python_alpha_api.id | ||
# # api_version = "v1" | ||
# service_url = "${local.apim_devopslab_webapp_python_alpha_api.service_url}/" | ||
# resource "azurerm_api_management_api_version_set" "apim_blueprint_product" { | ||
# name = local.apim_blueprint_product.api_name | ||
# resource_group_name = module.apim.resource_group_name | ||
|
||
# description = local.apim_devopslab_webapp_python_alpha_api.description | ||
# display_name = local.apim_devopslab_webapp_python_alpha_api.display_name | ||
# path = local.apim_devopslab_webapp_python_alpha_api.path | ||
# protocols = ["https"] | ||
|
||
# content_format = "openapi" | ||
# content_value = templatefile("./api/devopslab/webapp-python/openapi_webapp_python.json.tftpl", { | ||
# projectName = local.apim_devopslab_webapp_python_alpha_api.display_name | ||
# }) | ||
|
||
# xml_content = file("./api/devopslab/webapp-python/_base_policy.xml") | ||
# } | ||
|
||
# ### webapp-python-beta | ||
|
||
# locals { | ||
# apim_devopslab_webapp_python_beta_api = { | ||
# # params for all api versions | ||
# display_name = "Webapp Python beta api" | ||
# description = "Webapp Python beta api" | ||
# path = "webapp-python-beta" | ||
# subscription_required = false | ||
# service_url = "http://mock-aks/webapp-python-beta" | ||
# api_name = "${var.env}-webapp-python-beta-api" | ||
# } | ||
# } | ||
|
||
# # resource "azurerm_api_management_api_version_set" "apim_devopslab_webapp_python_beta_api" { | ||
# # name = local.apim_devopslab_webapp_python_beta_api.api_name | ||
# # resource_group_name = module.apim.resource_group_name | ||
# # api_management_name = module.apim.name | ||
# # display_name = local.apim_devopslab_webapp_python_beta_api.display_name | ||
# # versioning_scheme = "Segment" | ||
# # } | ||
|
||
# module "apim_devopslab_webapp_python_beta_api_v1" { | ||
# source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v7.23.0" | ||
|
||
# name = local.apim_devopslab_webapp_python_beta_api.api_name | ||
# api_management_name = module.apim.name | ||
# product_ids = [module.apim_product_devopslab.product_id] | ||
# subscription_required = local.apim_devopslab_webapp_python_beta_api.subscription_required | ||
# # version_set_id = azurerm_api_management_api_version_set.apim_devopslab_webapp_python_beta_api.id | ||
# # api_version = "v1" | ||
# service_url = "${local.apim_devopslab_webapp_python_beta_api.service_url}/" | ||
# resource_group_name = module.apim.resource_group_name | ||
|
||
# description = local.apim_devopslab_webapp_python_beta_api.description | ||
# display_name = local.apim_devopslab_webapp_python_beta_api.display_name | ||
# path = local.apim_devopslab_webapp_python_beta_api.path | ||
# protocols = ["https"] | ||
|
||
# content_format = "openapi" | ||
# content_value = templatefile("./api/devopslab/webapp-python/openapi_webapp_python.json.tftpl", { | ||
# projectName = local.apim_devopslab_webapp_python_beta_api.display_name | ||
# }) | ||
|
||
# xml_content = file("./api/devopslab/webapp-python/_base_policy.xml") | ||
# } | ||
|
||
# ### webapp-python-proxy | ||
|
||
# locals { | ||
# apim_devopslab_webapp_python_proxy_api = { | ||
# # params for all api versions | ||
# display_name = "Webapp Python proxy api" | ||
# description = "Webapp Python proxy api" | ||
# path = "webapp-python-proxy" | ||
# subscription_required = false | ||
# service_url = "http://mock-aks/webapp-python-proxy" | ||
# api_name = "${var.env}-webapp-python-proxy-api" | ||
# } | ||
# api_management_name = module.apim.name | ||
# display_name = local.apim_blueprint_product.display_name | ||
# versioning_scheme = "Segment" | ||
# } | ||
|
||
# # resource "azurerm_api_management_api_version_set" "apim_devopslab_webapp_python_proxy_api" { | ||
# # name = local.apim_devopslab_webapp_python_proxy_api.api_name | ||
# # resource_group_name = module.apim.resource_group_name | ||
# # api_management_name = module.apim.name | ||
# # display_name = local.apim_devopslab_webapp_python_proxy_api.display_name | ||
# # versioning_scheme = "Segment" | ||
# # } | ||
|
||
# module "apim_devopslab_webapp_python_proxy_api_v1" { | ||
# source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v7.23.0" | ||
|
||
# name = local.apim_devopslab_webapp_python_proxy_api.api_name | ||
# api_management_name = module.apim.name | ||
# product_ids = [module.apim_product_devopslab.product_id] | ||
# subscription_required = local.apim_devopslab_webapp_python_proxy_api.subscription_required | ||
# # version_set_id = azurerm_api_management_api_version_set.apim_devopslab_webapp_python_proxy_api.id | ||
# # api_version = "v1" | ||
# service_url = "${local.apim_devopslab_webapp_python_proxy_api.service_url}/" | ||
# resource_group_name = module.apim.resource_group_name | ||
|
||
# description = local.apim_devopslab_webapp_python_proxy_api.description | ||
# display_name = local.apim_devopslab_webapp_python_proxy_api.display_name | ||
# path = local.apim_devopslab_webapp_python_proxy_api.path | ||
# protocols = ["https"] | ||
|
||
# content_format = "openapi" | ||
# content_value = templatefile("./api/devopslab/webapp-python-proxy/openapi_webapp_python.json.tftpl", { | ||
# projectName = local.apim_devopslab_webapp_python_proxy_api.display_name | ||
# }) | ||
|
||
# xml_content = file("./api/devopslab/webapp-python-proxy/_base_policy.xml") | ||
# } | ||
module "apim_blueprint_status_v1" { | ||
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//api_management_api?ref=v7.23.0" | ||
|
||
name = "${var.env}-blueprint-status-api" | ||
api_management_name = module.apim.name | ||
product_ids = [module.apim_product_blueprint.product_id] | ||
subscription_required = false | ||
# version_set_id = azurerm_api_management_api_version_set.apim_blueprint_product.id | ||
# api_version = "v1" | ||
service_url = "http://mock-aks/status" | ||
resource_group_name = module.apim.resource_group_name | ||
|
||
description = "blueprint - status" | ||
display_name = "blueprint - status" | ||
path = local.apim_blueprint_product.path | ||
protocols = ["https"] | ||
|
||
content_format = "openapi" | ||
content_value = templatefile("./api/blueprint/status/openapi_webapp_python.json.tftpl", { | ||
projectName = "${var.env}-status-api" | ||
}) | ||
|
||
xml_content = file("./api/blueprint/status/_base_policy.xml") | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.