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 report- logic_app.tf provides map for base_tag variable, private_endpoints expects a bool #1977

Open
1 task done
arne21a opened this issue May 17, 2024 · 0 comments · May be fixed by #1974 or #1978
Open
1 task done

Bug report- logic_app.tf provides map for base_tag variable, private_endpoints expects a bool #1977

arne21a opened this issue May 17, 2024 · 0 comments · May be fixed by #1974 or #1978
Assignees
Labels
bug Something isn't working
Milestone

Comments

@arne21a
Copy link
Contributor

arne21a commented May 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues

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

Version of the module you are using

5.7.11

Rover Version

aztfmod/rover:1.4.6-2305.1807

Terraform Version

v1.4.6 on linux_arm64

AzureRM Provider Version

3.75.0

Affected Resource(s)/Data Source(s)

azurerm_logic_app_standard, private_endpoint

Terraform Configuration Files

logic_app_standard = {
  las1 = {
    name                 = "logicapp2"
    resource_group_key   = "la_test"
    app_service_plan_key = "asp1"
    storage_account_key  = "sa1"
    version              = "~4"
    private_endpoints = {
      pe_la = {
        private_service_connection = {
          name = "pe_la_sc"
          subresource_names = ["sites"]
        }
        name = "pe_la"
        vnet_key   = "vnet"
        subnet_key = "private_endpoints_sn"
        lz_key     = "sandbox_level3"
        tags = {
          private-link-stage = "prod"
        }
      }
  }
}

Expected Behaviour

The provided example works.

Actual Behaviour

The module call logic_app.tf contains this line:

  base_tags          = try(local.global_settings.inherit_tags, false) ? local.resource_groups[each.value.resource_group_key].tags : {}

The value of base_tags is passed to the private link module by the logic_app_standard module without modification.

The private_link module expects base_tags to be a bool.

variable "base_tags" {
  description = "Base tags for the resource to be inherited from the resource group."
  type        = bool
}

this leads to this error:

│ Error: Invalid value for input variable
│ 
│   on ../../terraform-azurerm-caf/modules/logic_app/standard/private_endpoint.tf line 19, in module "private_endpoint":
│   19:   base_tags           = var.base_tags
│ 
│ The given value is not suitable for module.solution.module.logic_app_standard["las1"].module.private_endpoint["pe_la"].var.base_tags declared at ../../terraform-azurerm-caf/modules/networking/private_endpoint/variables.tf:27,1-21: bool required.
╵
Terraform plan return code: 1

This fixes the problem:

  base_tags          = try(local.global_settings.inherit_tags, false) 

I will provide a PR later

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@arne21a arne21a added the bug Something isn't working label May 17, 2024
arne21a added a commit to flender-group/terraform-azurerm-caf that referenced this issue May 17, 2024
arne21a added a commit to flender-group/terraform-azurerm-caf that referenced this issue May 17, 2024
@arnaudlh arnaudlh linked a pull request May 18, 2024 that will close this issue
6 tasks
@arnaudlh arnaudlh added this to 2405 May 18, 2024
@arnaudlh arnaudlh added this to the 5.7.12 milestone May 18, 2024
@arnaudlh arnaudlh linked a pull request Jun 3, 2024 that will close this issue
6 tasks
@arnaudlh arnaudlh modified the milestones: 5.7.12, 5.7.13 Jun 14, 2024
@arnaudlh arnaudlh modified the milestones: 5.7.13, 5.7.14 Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
2 participants