1 min read

Development Routing



  1. Clone https://github.com/poqcommerce/Poq.Terraform.git repo
  2. Go to dev/apim/poqapiuat/
  3. Create apimpoqapiuat[yourclientname]bfcrev_1.tf file with following content:
module "yourclientname_bfc" {
source = "../../../modules/bfc/apim_bfc_routing"
apim = azurerm_api_management.poqapiuat
api_name = "yourclientname"
api_display_name = "Your Client Name (BFC)"
path = "clients/yourclientname"
service_url = "https://poq-yourclientname-dev-weu-app.azurewebsites.net"
# Optional args
description = "Standard BFC routing for Your Client Name"
verbs = ["DELETE", "GET", "PATCH", "POST", "PUT"]
  1. Replace yourClientName with proper client name everywhere in the file following the same naming convention, for ex: yourclientname -> amazingclient; Your Client Name -> Amazing Client
  2. Create PR
  3. Merge PR
  4. Apply terraform scripts. In order for terraform scripts to take action they need to be applied. We are still in the process of defining how to better setup this process. If you have access to terraform console you can apply scripts by yourself, if you do not have access you should reach out to your Poq contact to apply scripts for you.
Congratulations, you have successfully created routing for the Development environment.
We advise to test APIM routing right away once it has been created. As a prerequisite for such a test you need to have infrastructure setup and API deployed. Then in order to make sure that APIM routing is working as expected you can use an example request to /shop endpoint for example:

curl -X GET "https://dev.poq.io/clients/yourclientname/shop" -H "accept: text/plain" -H "Poq-App-Identifier: yourAppIdentifier"

See Next