terraform-provider-stackitp.../docs/resources/public_ip.md
Alexander Dahmen 721e10a02f
chore(examples): Add import examples for all resources (#939)
* chore(examples): Add import examples for all resources

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

* Add guide: How to import resources

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

---------

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
2025-08-08 14:03:27 +02:00

47 lines
1.6 KiB
Markdown

---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_public_ip Resource - stackit"
subcategory: ""
description: |-
Public IP resource schema. Must have a region specified in the provider configuration.
---
# stackit_public_ip (Resource)
Public IP resource schema. Must have a `region` specified in the provider configuration.
## Example Usage
```terraform
resource "stackit_public_ip" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_interface_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
labels = {
"key" = "value"
}
}
# Only use the import statement, if you want to import an existing public ip
import {
to = stackit_public_ip.import-example
id = "${var.project_id},${var.public_ip_id}"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `project_id` (String) STACKIT project ID to which the public IP is associated.
### Optional
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `network_interface_id` (String) Associates the public IP with a network interface or a virtual IP (ID). If you are using this resource with a Kubernetes Load Balancer or any other resource which associates a network interface implicitly, use the lifecycle `ignore_changes` property in this field to prevent unintentional removal of the network interface due to drift in the Terraform state
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`public_ip_id`".
- `ip` (String) The IP address.
- `public_ip_id` (String) The public IP ID.