OuterSrc / terraform-azurerm-caf

Terraform supermodule for the Terraform platform engineering for Azure
http://aka.ms/caf/terraform
MIT License
0 stars 0 forks source link

Bug report-Logic App API Connectors #5

Open ml-justinhewitt opened 1 year ago

ml-justinhewitt commented 1 year ago

Is there an existing issue for this?

Community Note

Version of the module you are using

v0.0.5

Rover Version

No response

Terraform Version

No response

AzureRM Provider Version

No response

Affected Resource(s)/Data Source(s)

logic-sga3t-mia-01 and logic-sga3p-mia-01

Terraform Configuration Files

logic_app_workflow = {
  logic1 = {
    name               = "logic-sga3t-mia-01"
    resource_group_key = "solution1_region1"

        connections = {
      sql_1 = {
        connectionId   = "/subscriptions/3410ed7b-7970-49b7-8faf-59efadfc2ea5/resourceGroups/rg-sga3t-mia-solution/providers/Microsoft.Web/connections/sql-1"
        connectionName = "sql-1"
        id             = "/subscriptions/3410ed7b-7970-49b7-8faf-59efadfc2ea5/providers/Microsoft.Web/locations/uksouth/managedApis/sql"
      }
      sqldw = {
        connectionId   = "/subscriptions/3410ed7b-7970-49b7-8faf-59efadfc2ea5/resourceGroups/rg-sga3t-mia-solution/providers/Microsoft.Web/connections/sqldw-5"
        connectionName = "sqldw-5"
        id             = "/subscriptions/3410ed7b-7970-49b7-8faf-59efadfc2ea5/providers/Microsoft.Web/locations/uksouth/managedApis/sqldw"
      }
    }
  }
}

Expected Behaviour

Logic App API connections should be able to be coded. After discussing issue with colleague, agreed to log issue

Actual Behaviour

It appears this only allows existing Logic App API connections to be coded and errors if API connections don't already exist:

│ Error: updating Logic App Workflow Workflow: (Name "logic-sga3t-mia-01" / Resource Group "rg-sga3t-mia-solution"): logic.WorkflowsClient#CreateOrUpdate: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="MultipleErrorsOccurred" Message="Multiple errors occurred: 'NotFound,NotFound'." Details=[{"code":"ApiConnectionNotFound","message":"The API connection 'sql-1' could not be found."},{"code":"ApiConnectionNotFound","message":"The API connection 'sqldw-5' could not be found."}] │ │ with module.caf.module.logic_app_workflow["logic1"].azurerm_logic_app_workflow.la, │ on .terraform/modules/caf/modules/logic_app/workflow/module.tf line 12, in resource "azurerm_logic_app_workflow" "la": │ 12: resource "azurerm_logic_app_workflow" "la" {

Steps to Reproduce

No response

Important Factoids

No response

References

No response