# ionoscloud\_vpn\_ipsec\_gateway

The **VPN IPSec Gateway data source** can be used to search for and return an existing IPSec Gateway. You can provide a string for the name parameter which will be compared with provisioned IPSec Gateways. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

## Example Usage

### By ID

```hcl
data "ionoscloud_vpn_ipsec_gateway" "example" {
  id = "gateway_id"
  location = "gateway_location"
}
```

### By Name

Needs to have the resource be previously created, or a depends\_on clause to ensure that the resource is created before this data source is called.

```hcl
data "ionoscloud_vpn_ipsec_gateway" "example" {
  name     = "ipsec-gateway"
  location = "gateway_location"
}
```

## Argument Reference

* `id` - (Optional) ID of an existing IPSec Gateway that you want to search for.
* `name` - (Optional) Name of an existing IPSec Gateway that you want to search for.
* `location` - (Optional) The location of the IPSec Gateway. Supported locations: de/fra, de/fra/2, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.

## Attributes Reference

The following attributes are returned by the datasource:

* `id` - The unique ID of the IPSec Gateway.
* `name` - The name of the IPSec Gateway.
* `gateway_ip` - Public IP address to be assigned to the gateway.
* `description` - (Optional)\[string] The human-readable description of the IPSec Gateway.
* `connections` - The network connection for your gateway.
  * `datacenter_id` - The datacenter to connect your VPN Gateway to.
  * `lan_id` - The numeric LAN ID to connect your VPN Gateway to.
  * `ipv4_cidr` - The VPN Gateway IPv4 address in CIDR notation. This is the private gateway address for LAN clients to route traffic over the VPN Gateway, this should be within the subnet already assigned to the LAN.
  * `ipv6_cidr` - The VPN Gateway IPv6 address in CIDR notation. This is the private gateway address for LAN clients to route traffic over the VPN Gateway, this should be within the subnet already assigned to the LAN.
* `version` - The IKE version that is permitted for the VPN tunnels.
* `maintenance_window` - A weekly 4 hour-long window, during which maintenance might occur.
  * `time` - Start of the maintenance window in UTC time.
  * `day_of_the_week` - The name of the week day.
* `tier` - Gateway performance options.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/terraform-provider/data-sources/vpn_ipsec_gateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
