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

Support for "scm_ip_restriction" and "scm_use_main_ip_restriction" in site_config for azurerm_logic_app_standard #18800

Closed
1 task done
mg-8 opened this issue Oct 17, 2022 · 3 comments · Fixed by #18853
Closed
1 task done
Milestone

Comments

@mg-8
Copy link

mg-8 commented Oct 17, 2022

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

Description

Allow "scm_ip_restriction" block and "scm_use_main_ip_restriction" attribute in site_config{} for azurerm_logic_app_standard to be managed through Terraform similar to azurerm_windows_function_app

New or Affected Resource(s)/Data Source(s)

azurerm_logic_app_standard

Potential Terraform Configuration

resource "azurerm_logic_app_standard" "this" {
  name                       = var.logic_app.name
  resource_group_name        = var.resource_group.name
  location                   = var.resource_group.location
  app_service_plan_id        = var.logic_app.app_service_plan_id
  storage_account_name       = azurerm_storage_account.this.name
  storage_account_access_key = sensitive(azurerm_storage_account.this.primary_access_key)
  https_only                 = true
  client_certificate_mode    = "Required"
  virtual_network_subnet_id  = data.azurerm_subnet.vnet_integration.id

  identity {
    type = "SystemAssigned"
  }

  site_config {
    elastic_instance_minimum    = var.logic_app.elastic_instance_minimum
    pre_warmed_instance_count   = var.logic_app.pre_warmed_instance_count
    use_32_bit_worker_process   = var.logic_app.use_32_bit_worker_process
    http2_enabled               = true
    vnet_route_all_enabled      = true
    scm_use_main_ip_restriction = var.logic_app.scm_use_main_ip_restriction

    dynamic "ip_restriction" {
      for_each = { for k, v in var.logic_app.ip_restriction == null ? [] : var.logic_app.ip_restriction : k => v }

      content {
        action                    = ip_restriction.value.action
        ip_address                = ip_restriction.value.ip_address
        name                      = ip_restriction.value.name
        priority                  = ip_restriction.value.priority
        service_tag               = ip_restriction.value.service_tag
        virtual_network_subnet_id = ip_restriction.value.virtual_network_subnet_id

        dynamic "headers" {
          for_each = ip_restriction.value.headers == null ? [] : [1]

          content {
            x_azure_fdid      = ip_restriction.value.headers.x_azure_fdid
            x_fd_health_probe = ip_restriction.value.headers.x_fd_health_probe
            x_forwarded_for   = ip_restriction.value.headers.x_forwarded_for
            x_forwarded_host  = ip_restriction.value.headers.x_forwarded_host
          }
        }
      }
    }

    dynamic "scm_ip_restriction" {
      for_each = { for k, v in var.logic_app.scm_ip_restriction == null ? [] : var.logic_app.scm_ip_restriction : k => v }

      content {
        action                    = scm_ip_restriction.value.action
        ip_address                = scm_ip_restriction.value.ip_address
        name                      = scm_ip_restriction.value.name
        priority                  = scm_ip_restriction.value.priority
        service_tag               = scm_ip_restriction.value.service_tag
        virtual_network_subnet_id = scm_ip_restriction.value.virtual_network_subnet_id

        dynamic "headers" {
          for_each = scm_ip_restriction.value.headers == null ? [] : [1]

          content {
            x_azure_fdid      = scm_ip_restriction.value.headers.x_azure_fdid
            x_fd_health_probe = scm_ip_restriction.value.headers.x_fd_health_probe
            x_forwarded_for   = scm_ip_restriction.value.headers.x_forwarded_for
            x_forwarded_host  = scm_ip_restriction.value.headers.x_forwarded_host
          }
        }
      }
    }
  }

  lifecycle {
    ignore_changes = [
      tags,
    ]
  }
}

References

No response

@mg-8
Copy link
Author

mg-8 commented Oct 20, 2022

Thanks heaps @ziyeqf :)

@github-actions github-actions bot added this to the v3.29.0 milestone Oct 24, 2022
@github-actions
Copy link

This functionality has been released in v3.29.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

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 Nov 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant