> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/tools-terraform/docs/data-sources/vpn_wireguard_peer.md).

# Data Source: ionoscloud\_vpn\_wireguard\_gateway

Provides information about a specific IONOS CLOUD VPN WireGuard Gateway.

The `ionoscloud_vpn_wireguard_gateway` data source provides information about a specific IONOS CLOUD VPN WireGuard Gateway. You can use this data source to retrieve details of a WireGuard Gateway for use in other resources and configurations.

## Example Usage

```hcl
data "ionoscloud_vpn_wireguard_peer" "example" {
  location = "de/fra"
  gateway_id = "example-gateway"
  name = "example-peer"
}

output "vpn_wireguard_peer_public_key" {
  value = data.vpn_wireguard_peer.example.public_key
}
```

## Argument Reference

The following arguments are supported:

* `gateway_id` - (Required)\[String] The ID of the WireGuard Gateway.
* `location` - (Optional)\[String] The location of the WireGuard Gateway. Supported locations: de/fra, de/fra/1, de/fra/2, de/txl, es/vit, gb/bhx, gb/lhr, us/ewr, us/las, us/mci, fr/par.
* `name` - (Optional)\[String] The name of the WireGuard Peer.
* `id` - (Optional)\[String] The ID of the WireGuard Peer.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `id` - The unique ID of the WireGuard Peer.
* `name` - The name of the WireGuard Peer.
* `description` - The description of the WireGuard Peer.
* `public_key` - WireGuard public key of the connecting peer.
* `status` - The current status of the WireGuard Peer.
* `endpoint` - The endpoint of the WireGuard Peer.
  * `host` - Hostname or IPV4 address that the WireGuard Server will connect to.
  * `port` - Port that the WireGuard Server will connect to. Default: 51820
* `allowed_ips` - The subnet CIDRs that are allowed to connect to the WireGuard Gateway.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ionos.com/cloud/tools-terraform/docs/data-sources/vpn_wireguard_peer.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
