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

azurerm_point_to_site_vpn_gateway should have 1 or more "connection_configuration" blocks #23967

Closed
1 task done
jouyang-peraton opened this issue Nov 20, 2023 · 4 comments
Closed
1 task done

Comments

@jouyang-peraton
Copy link

jouyang-peraton commented Nov 20, 2023

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 and review the contribution guide to help.

Description

azurerm_point_to_site_vpn_gateway should have 1 or more "connection_configuration" blocks and a list of policy group names should be included in this block.

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

azurerm_point_to_site_vpn_gateway

Potential Terraform Configuration

resource "azurerm_point_to_site_vpn_gateway" "gateway" {
  name                        = "${var.resource_prefix}-p2s-gtwy"
  location                    = azurerm_resource_group.this.location
  resource_group_name         = azurerm_resource_group.this.name
  virtual_hub_id              = azurerm_virtual_hub.this.id
  vpn_server_configuration_id = azurerm_vpn_server_configuration.config.id
  scale_unit  = var.p2s_vpn_scale_unit
  dns_servers = [module.dnsforwarder.container_ipv4_address]

    dynamic "connection_configuration" {
    for_each = var.vpn_group_members
    iterator = config
    content {
      name = config.key
      //split tunneling option
      internet_security_enabled = config.value.disable_split_tunneling
      policy_group_names =config.value.group_name_list

      vpn_client_address_pool {
        address_prefixes = config.value.client_vpn_address_prefix
      }
      route {
        associated_route_table_id = azurerm_virtual_hub.this.default_route_table_id
        propagated_route_table {
          ids = (
            var.propagated_to_default_routetable ? [azurerm_virtual_hub.this.default_route_table_id] : [local.non_rt_id]
          )
          labels = local.labels
        }
      }
    }
  }
}

References

No response

@neil-yechenwei
Copy link
Contributor

Thanks for raising this issue. This is the basic example for the usage of this resource. For more usage problem, suggest to ask and answer questions through the Terraform Azure Provider Community Forum.

@jouyang-peraton
Copy link
Author

jouyang-peraton commented Dec 5, 2023

this resource needs to support 1 or more connection_configuration blocks
Error: Too many connection_configuration blocks

│ on connectivity.tf line 110, in resource "azurerm_point_to_site_vpn_gateway" "gateway":
│ 110: content {

│ No more than 1 "connection_configuration" blocks are allowed

@rcskosir
Copy link
Contributor

Thanks for taking the time to submit this issue. It looks like this has been resolved as of #23936. As such, I am going to mark this issue as closed. If that is not the case, please provide additional information including the version in which you are still experiencing this issue, thanks!

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 Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants