published on Friday, Feb 20, 2026 by stackitcloud
published on Friday, Feb 20, 2026 by stackitcloud
Public IP resource schema. Must have a region specified in the provider configuration.
Example Usage
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.region},${var.public_ip_id}"
}
Create PublicIp Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PublicIp(name: string, args: PublicIpArgs, opts?: CustomResourceOptions);@overload
def PublicIp(resource_name: str,
args: PublicIpArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PublicIp(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
network_interface_id: Optional[str] = None,
region: Optional[str] = None)func NewPublicIp(ctx *Context, name string, args PublicIpArgs, opts ...ResourceOption) (*PublicIp, error)public PublicIp(string name, PublicIpArgs args, CustomResourceOptions? opts = null)
public PublicIp(String name, PublicIpArgs args)
public PublicIp(String name, PublicIpArgs args, CustomResourceOptions options)
type: stackit:PublicIp
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PublicIpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PublicIpArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PublicIpArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PublicIpArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PublicIpArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var publicIpResource = new Stackit.PublicIp("publicIpResource", new()
{
ProjectId = "string",
Labels =
{
{ "string", "string" },
},
NetworkInterfaceId = "string",
Region = "string",
});
example, err := stackit.NewPublicIp(ctx, "publicIpResource", &stackit.PublicIpArgs{
ProjectId: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
NetworkInterfaceId: pulumi.String("string"),
Region: pulumi.String("string"),
})
var publicIpResource = new PublicIp("publicIpResource", PublicIpArgs.builder()
.projectId("string")
.labels(Map.of("string", "string"))
.networkInterfaceId("string")
.region("string")
.build());
public_ip_resource = stackit.PublicIp("publicIpResource",
project_id="string",
labels={
"string": "string",
},
network_interface_id="string",
region="string")
const publicIpResource = new stackit.PublicIp("publicIpResource", {
projectId: "string",
labels: {
string: "string",
},
networkInterfaceId: "string",
region: "string",
});
type: stackit:PublicIp
properties:
labels:
string: string
networkInterfaceId: string
projectId: string
region: string
PublicIp Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PublicIp resource accepts the following input properties:
- Project
Id string - STACKIT project ID to which the public IP is associated.
- Labels Dictionary<string, string>
- Labels are key-value string pairs which can be attached to a resource container
- Network
Interface stringId - Region string
- The resource region. If not defined, the provider region is used.
- Project
Id string - STACKIT project ID to which the public IP is associated.
- Labels map[string]string
- Labels are key-value string pairs which can be attached to a resource container
- Network
Interface stringId - Region string
- The resource region. If not defined, the provider region is used.
- project
Id String - STACKIT project ID to which the public IP is associated.
- labels Map<String,String>
- Labels are key-value string pairs which can be attached to a resource container
- network
Interface StringId - region String
- The resource region. If not defined, the provider region is used.
- project
Id string - STACKIT project ID to which the public IP is associated.
- labels {[key: string]: string}
- Labels are key-value string pairs which can be attached to a resource container
- network
Interface stringId - region string
- The resource region. If not defined, the provider region is used.
- project_
id str - STACKIT project ID to which the public IP is associated.
- labels Mapping[str, str]
- Labels are key-value string pairs which can be attached to a resource container
- network_
interface_ strid - region str
- The resource region. If not defined, the provider region is used.
- project
Id String - STACKIT project ID to which the public IP is associated.
- labels Map<String>
- Labels are key-value string pairs which can be attached to a resource container
- network
Interface StringId - region String
- The resource region. If not defined, the provider region is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the PublicIp resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip string
- The IP address.
- Public
Ip stringId - The public IP ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip string
- The IP address.
- Public
Ip stringId - The public IP ID.
- id String
- The provider-assigned unique ID for this managed resource.
- ip String
- The IP address.
- public
Ip StringId - The public IP ID.
- id string
- The provider-assigned unique ID for this managed resource.
- ip string
- The IP address.
- public
Ip stringId - The public IP ID.
- id str
- The provider-assigned unique ID for this managed resource.
- ip str
- The IP address.
- public_
ip_ strid - The public IP ID.
- id String
- The provider-assigned unique ID for this managed resource.
- ip String
- The IP address.
- public
Ip StringId - The public IP ID.
Look up Existing PublicIp Resource
Get an existing PublicIp resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PublicIpState, opts?: CustomResourceOptions): PublicIp@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ip: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
network_interface_id: Optional[str] = None,
project_id: Optional[str] = None,
public_ip_id: Optional[str] = None,
region: Optional[str] = None) -> PublicIpfunc GetPublicIp(ctx *Context, name string, id IDInput, state *PublicIpState, opts ...ResourceOption) (*PublicIp, error)public static PublicIp Get(string name, Input<string> id, PublicIpState? state, CustomResourceOptions? opts = null)public static PublicIp get(String name, Output<String> id, PublicIpState state, CustomResourceOptions options)resources: _: type: stackit:PublicIp get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Ip string
- The IP address.
- Labels Dictionary<string, string>
- Labels are key-value string pairs which can be attached to a resource container
- Network
Interface stringId - Project
Id string - STACKIT project ID to which the public IP is associated.
- Public
Ip stringId - The public IP ID.
- Region string
- The resource region. If not defined, the provider region is used.
- Ip string
- The IP address.
- Labels map[string]string
- Labels are key-value string pairs which can be attached to a resource container
- Network
Interface stringId - Project
Id string - STACKIT project ID to which the public IP is associated.
- Public
Ip stringId - The public IP ID.
- Region string
- The resource region. If not defined, the provider region is used.
- ip String
- The IP address.
- labels Map<String,String>
- Labels are key-value string pairs which can be attached to a resource container
- network
Interface StringId - project
Id String - STACKIT project ID to which the public IP is associated.
- public
Ip StringId - The public IP ID.
- region String
- The resource region. If not defined, the provider region is used.
- ip string
- The IP address.
- labels {[key: string]: string}
- Labels are key-value string pairs which can be attached to a resource container
- network
Interface stringId - project
Id string - STACKIT project ID to which the public IP is associated.
- public
Ip stringId - The public IP ID.
- region string
- The resource region. If not defined, the provider region is used.
- ip str
- The IP address.
- labels Mapping[str, str]
- Labels are key-value string pairs which can be attached to a resource container
- network_
interface_ strid - project_
id str - STACKIT project ID to which the public IP is associated.
- public_
ip_ strid - The public IP ID.
- region str
- The resource region. If not defined, the provider region is used.
- ip String
- The IP address.
- labels Map<String>
- Labels are key-value string pairs which can be attached to a resource container
- network
Interface StringId - project
Id String - STACKIT project ID to which the public IP is associated.
- public
Ip StringId - The public IP ID.
- region String
- The resource region. If not defined, the provider region is used.
Package Details
- Repository
- stackit stackitcloud/pulumi-stackit
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
stackitTerraform Provider.
published on Friday, Feb 20, 2026 by stackitcloud
