Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Logic App workflow should allow parameters to be any object (not just strings) #7241

Closed
rrmistry opened this issue Jun 7, 2020 · 3 comments · Fixed by #12314
Closed
Labels
enhancement service/logic upstream/terraform This issue is blocked on an upstream issue within Terraform (Terraform Core/CLI, The Plugin SDK etc)
Milestone

Comments

@rrmistry
Copy link

rrmistry commented Jun 7, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform v0.12.25
+ provider.archive v1.3.0
+ provider.azurerm v2.12.0
+ provider.null v2.1.2

Affected Resource(s)

azurerm_logic_app_workflow

Terraform Configuration Files

resource "azurerm_logic_app_workflow" "default" {
  name                = var.name
  resource_group_name = data.azurerm_resource_group.default.name
  location            = data.azurerm_resource_group.default.location
  tags                = var.az_tags
  parameters = {
    # the parameter "environment" is of type "Object" in the definition
    environment = {
      subscriptionId = data.azurerm_subscription.default.subscription_id
      tenantId       = data.azurerm_subscription.default.tenant_id
      resourceGroup  = data.azurerm_resource_group.default.name
      datacenter     = data.azurerm_resource_group.default.location
    }
  }
}

data "azurerm_subscription" "default" {}
data "azurerm_resource_group" "default" {
  name = var.az_resource_group
}

There are items we cannot control, for which we need to have object type parameters.

Logic App definitions clearly allow objects to be passed as parameters:
image

Documentation: https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language#parameters

Schema reference: https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#

Output

Error: Incorrect attribute value type

  on .terraform\modules\logicapp_dbEnvironment\main.tf line 11, in resource "azurerm_logic_app_workflow" "default":
2020-06-07T00:31:59.347Z [DEBUG] plugin: plugin process exited: path=C:\terraform\terraform-provider-azurerm_v2.12.0_x5.exe pid=23536
  11:   parameters          = 2020-06-07T00:31:59.347Z [DEBUG] plugin: plugin exited
var.parameters
    |----------------
    | var.parameters is object with 6 attributes

Inappropriate value for attribute "parameters": element "environment": string
required.

Expected Behavior

Allow objects to be passed as parameters in logic app workflows

Actual Behavior

Only string parameters are allowed in logic app workflows

Steps to Reproduce

  1. Use HCL provided above
  2. terraform apply

References

@tombuildsstuff tombuildsstuff added the upstream/terraform This issue is blocked on an upstream issue within Terraform (Terraform Core/CLI, The Plugin SDK etc) label Jun 23, 2020
@Tbohunek

This comment has been minimized.

@katbyte katbyte added this to the v2.71.0 milestone Jul 30, 2021
katbyte pushed a commit that referenced this issue Jul 30, 2021
…#12314)

Add supports for the workflow_parameters (the paramter definition),
and also make the parameters (the paramter value) to support different
kinds of types (previously it only supports String).

Fixes: #7241, #11505
@github-actions
Copy link

github-actions bot commented Aug 6, 2021

This functionality has been released in v2.71.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Sep 6, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement service/logic upstream/terraform This issue is blocked on an upstream issue within Terraform (Terraform Core/CLI, The Plugin SDK etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants