published on Tuesday, Mar 31, 2026 by stackitcloud
published on Tuesday, Mar 31, 2026 by stackitcloud
Network area resource schema.
Example Usage
resource "stackit_network_area" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-network-area"
labels = {
"key" = "value"
}
}
# Only use the import statement, if you want to import an existing network area
import {
to = stackit_network_area.import-example
id = "${var.organization_id},${var.network_area_id}"
}
Migration of IaaS resources from versions <= v0.78.1
The release of the STACKIT IaaS API v2 provides a lot of new features, but also includes some breaking changes
(when coming from v1 of the STACKIT IaaS API) which must be somehow represented on Terraform side. The
stackit.NetworkArea resource deprecated some fields. See the example below how to migrate your resources.
Migration: Network area resource (stackit_network_area)
Configuration for <= v0.78.1
resource "stackit_network_area" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "my-network-area"
transfer_network = "192.168.1.0/24" # transfer_network field got deprecated for provider versions > v0.74.0, use the new "stackit_network_area_region" resource instead
network_ranges = [
{
prefix = "192.168.0.0/25" # network_ranges field got deprecated for provider versions > v0.74.0, use the new "stackit_network_area_region" resource instead
}
]
default_nameservers = ["8.8.8.8"] # default_nameservers field got deprecated for provider versions > v0.74.0, use the new "stackit_network_area_region" resource instead
default_prefix_length = 25 # default_prefix_length field got deprecated for provider versions > v0.74.0, use the new "stackit_network_area_region" resource instead
max_prefix_length = 29 # max_prefix_length field got deprecated for provider versions > v0.74.0, use the new "stackit_network_area_region" resource instead
min_prefix_length = 24 # min_prefix_length field got deprecated for provider versions > v0.74.0, use the new "stackit_network_area_region" resource instead
}
The previous configuration has some deprecated fields.
Configuration for > v0.78.1
To migrate from a previous state, you need to modify your configuration like this:
resource "stackit_network_area" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "my-network-area"
# remove all the deprecated fields
}
# Add the new resource "stackit_network_area_region" and configure it with all the deprecated values from the "stackit_network_area" resource
resource "stackit_network_area_region" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_area_id = stackit_network_area.example.network_area_id
region = "eu01"
ipv4 = {
transfer_network = "192.168.1.0/24"
network_ranges = [
{
prefix = "192.168.0.0/25"
}
]
default_nameservers = ["8.8.8.8"]
default_prefix_length = 25
max_prefix_length = 29
min_prefix_length = 24
}
}
# Add this import for "stackit_network_area_region" to migrate from the previous configuration
import {
to = stackit_network_area_region.example
id = "${stackit_network_area.example.id},eu01"
}
After modifying the configuration, run $ pulumi preview to check what terraform will do.
The changes should trigger an update in-place for the existing “stackit.NetworkArea” where the deprecated fields will be removed and the resource “stackit.NetworkAreaRegion” should be imported.
It shouldn’t trigger any recreation. If terraform wants to recreate any of the resources, verify that you are using the provider version > v0.78.1 and have everything defined correctly.
When everything looks good, run $ pulumi up to apply these changes.
When the run is completed, you can remove the import-block. Run $ pulumi preview to verify that the infrastructure matches the configuration.
Create NetworkArea Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkArea(name: string, args: NetworkAreaArgs, opts?: CustomResourceOptions);@overload
def NetworkArea(resource_name: str,
args: NetworkAreaArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkArea(resource_name: str,
opts: Optional[ResourceOptions] = None,
organization_id: Optional[str] = None,
default_nameservers: Optional[Sequence[str]] = None,
default_prefix_length: Optional[int] = None,
labels: Optional[Mapping[str, str]] = None,
max_prefix_length: Optional[int] = None,
min_prefix_length: Optional[int] = None,
name: Optional[str] = None,
network_ranges: Optional[Sequence[NetworkAreaNetworkRangeArgs]] = None,
transfer_network: Optional[str] = None)func NewNetworkArea(ctx *Context, name string, args NetworkAreaArgs, opts ...ResourceOption) (*NetworkArea, error)public NetworkArea(string name, NetworkAreaArgs args, CustomResourceOptions? opts = null)
public NetworkArea(String name, NetworkAreaArgs args)
public NetworkArea(String name, NetworkAreaArgs args, CustomResourceOptions options)
type: stackit:NetworkArea
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 NetworkAreaArgs
- 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 NetworkAreaArgs
- 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 NetworkAreaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkAreaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkAreaArgs
- 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 networkAreaResource = new Stackit.NetworkArea("networkAreaResource", new()
{
OrganizationId = "string",
Labels =
{
{ "string", "string" },
},
Name = "string",
});
example, err := stackit.NewNetworkArea(ctx, "networkAreaResource", &stackit.NetworkAreaArgs{
OrganizationId: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
})
var networkAreaResource = new NetworkArea("networkAreaResource", NetworkAreaArgs.builder()
.organizationId("string")
.labels(Map.of("string", "string"))
.name("string")
.build());
network_area_resource = stackit.NetworkArea("networkAreaResource",
organization_id="string",
labels={
"string": "string",
},
name="string")
const networkAreaResource = new stackit.NetworkArea("networkAreaResource", {
organizationId: "string",
labels: {
string: "string",
},
name: "string",
});
type: stackit:NetworkArea
properties:
labels:
string: string
name: string
organizationId: string
NetworkArea 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 NetworkArea resource accepts the following input properties:
- Organization
Id string - STACKIT organization ID to which the network area is associated.
- Default
Nameservers List<string> - List of DNS Servers/Nameservers for configuration of network area for region
eu01. - Default
Prefix intLength - The default prefix length for networks in the network area for region
eu01. - Labels Dictionary<string, string>
- Labels are key-value string pairs which can be attached to a resource container
- Max
Prefix intLength - The maximal prefix length for networks in the network area for region
eu01. - Min
Prefix intLength - The minimal prefix length for networks in the network area for region
eu01. - Name string
- The name of the network area.
- Network
Ranges List<NetworkArea Network Range> - List of Network ranges for configuration of network area for region
eu01. - Transfer
Network string - Classless Inter-Domain Routing (CIDR) for configuration of network area for region
eu01.
- Organization
Id string - STACKIT organization ID to which the network area is associated.
- Default
Nameservers []string - List of DNS Servers/Nameservers for configuration of network area for region
eu01. - Default
Prefix intLength - The default prefix length for networks in the network area for region
eu01. - Labels map[string]string
- Labels are key-value string pairs which can be attached to a resource container
- Max
Prefix intLength - The maximal prefix length for networks in the network area for region
eu01. - Min
Prefix intLength - The minimal prefix length for networks in the network area for region
eu01. - Name string
- The name of the network area.
- Network
Ranges []NetworkArea Network Range Args - List of Network ranges for configuration of network area for region
eu01. - Transfer
Network string - Classless Inter-Domain Routing (CIDR) for configuration of network area for region
eu01.
- organization
Id String - STACKIT organization ID to which the network area is associated.
- default
Nameservers List<String> - List of DNS Servers/Nameservers for configuration of network area for region
eu01. - default
Prefix IntegerLength - The default prefix length for networks in the network area for region
eu01. - labels Map<String,String>
- Labels are key-value string pairs which can be attached to a resource container
- max
Prefix IntegerLength - The maximal prefix length for networks in the network area for region
eu01. - min
Prefix IntegerLength - The minimal prefix length for networks in the network area for region
eu01. - name String
- The name of the network area.
- network
Ranges List<NetworkArea Network Range> - List of Network ranges for configuration of network area for region
eu01. - transfer
Network String - Classless Inter-Domain Routing (CIDR) for configuration of network area for region
eu01.
- organization
Id string - STACKIT organization ID to which the network area is associated.
- default
Nameservers string[] - List of DNS Servers/Nameservers for configuration of network area for region
eu01. - default
Prefix numberLength - The default prefix length for networks in the network area for region
eu01. - labels {[key: string]: string}
- Labels are key-value string pairs which can be attached to a resource container
- max
Prefix numberLength - The maximal prefix length for networks in the network area for region
eu01. - min
Prefix numberLength - The minimal prefix length for networks in the network area for region
eu01. - name string
- The name of the network area.
- network
Ranges NetworkArea Network Range[] - List of Network ranges for configuration of network area for region
eu01. - transfer
Network string - Classless Inter-Domain Routing (CIDR) for configuration of network area for region
eu01.
- organization_
id str - STACKIT organization ID to which the network area is associated.
- default_
nameservers Sequence[str] - List of DNS Servers/Nameservers for configuration of network area for region
eu01. - default_
prefix_ intlength - The default prefix length for networks in the network area for region
eu01. - labels Mapping[str, str]
- Labels are key-value string pairs which can be attached to a resource container
- max_
prefix_ intlength - The maximal prefix length for networks in the network area for region
eu01. - min_
prefix_ intlength - The minimal prefix length for networks in the network area for region
eu01. - name str
- The name of the network area.
- network_
ranges Sequence[NetworkArea Network Range Args] - List of Network ranges for configuration of network area for region
eu01. - transfer_
network str - Classless Inter-Domain Routing (CIDR) for configuration of network area for region
eu01.
- organization
Id String - STACKIT organization ID to which the network area is associated.
- default
Nameservers List<String> - List of DNS Servers/Nameservers for configuration of network area for region
eu01. - default
Prefix NumberLength - The default prefix length for networks in the network area for region
eu01. - labels Map<String>
- Labels are key-value string pairs which can be attached to a resource container
- max
Prefix NumberLength - The maximal prefix length for networks in the network area for region
eu01. - min
Prefix NumberLength - The minimal prefix length for networks in the network area for region
eu01. - name String
- The name of the network area.
- network
Ranges List<Property Map> - List of Network ranges for configuration of network area for region
eu01. - transfer
Network String - Classless Inter-Domain Routing (CIDR) for configuration of network area for region
eu01.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkArea resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Area stringId - The network area ID.
- Project
Count int - The amount of projects currently referencing this area.
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Area stringId - The network area ID.
- Project
Count int - The amount of projects currently referencing this area.
- id String
- The provider-assigned unique ID for this managed resource.
- network
Area StringId - The network area ID.
- project
Count Integer - The amount of projects currently referencing this area.
- id string
- The provider-assigned unique ID for this managed resource.
- network
Area stringId - The network area ID.
- project
Count number - The amount of projects currently referencing this area.
- id str
- The provider-assigned unique ID for this managed resource.
- network_
area_ strid - The network area ID.
- project_
count int - The amount of projects currently referencing this area.
- id String
- The provider-assigned unique ID for this managed resource.
- network
Area StringId - The network area ID.
- project
Count Number - The amount of projects currently referencing this area.
Look up Existing NetworkArea Resource
Get an existing NetworkArea 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?: NetworkAreaState, opts?: CustomResourceOptions): NetworkArea@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
default_nameservers: Optional[Sequence[str]] = None,
default_prefix_length: Optional[int] = None,
labels: Optional[Mapping[str, str]] = None,
max_prefix_length: Optional[int] = None,
min_prefix_length: Optional[int] = None,
name: Optional[str] = None,
network_area_id: Optional[str] = None,
network_ranges: Optional[Sequence[NetworkAreaNetworkRangeArgs]] = None,
organization_id: Optional[str] = None,
project_count: Optional[int] = None,
transfer_network: Optional[str] = None) -> NetworkAreafunc GetNetworkArea(ctx *Context, name string, id IDInput, state *NetworkAreaState, opts ...ResourceOption) (*NetworkArea, error)public static NetworkArea Get(string name, Input<string> id, NetworkAreaState? state, CustomResourceOptions? opts = null)public static NetworkArea get(String name, Output<String> id, NetworkAreaState state, CustomResourceOptions options)resources: _: type: stackit:NetworkArea 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.
- Default
Nameservers List<string> - List of DNS Servers/Nameservers for configuration of network area for region
eu01. - Default
Prefix intLength - The default prefix length for networks in the network area for region
eu01. - Labels Dictionary<string, string>
- Labels are key-value string pairs which can be attached to a resource container
- Max
Prefix intLength - The maximal prefix length for networks in the network area for region
eu01. - Min
Prefix intLength - The minimal prefix length for networks in the network area for region
eu01. - Name string
- The name of the network area.
- Network
Area stringId - The network area ID.
- Network
Ranges List<NetworkArea Network Range> - List of Network ranges for configuration of network area for region
eu01. - Organization
Id string - STACKIT organization ID to which the network area is associated.
- Project
Count int - The amount of projects currently referencing this area.
- Transfer
Network string - Classless Inter-Domain Routing (CIDR) for configuration of network area for region
eu01.
- Default
Nameservers []string - List of DNS Servers/Nameservers for configuration of network area for region
eu01. - Default
Prefix intLength - The default prefix length for networks in the network area for region
eu01. - Labels map[string]string
- Labels are key-value string pairs which can be attached to a resource container
- Max
Prefix intLength - The maximal prefix length for networks in the network area for region
eu01. - Min
Prefix intLength - The minimal prefix length for networks in the network area for region
eu01. - Name string
- The name of the network area.
- Network
Area stringId - The network area ID.
- Network
Ranges []NetworkArea Network Range Args - List of Network ranges for configuration of network area for region
eu01. - Organization
Id string - STACKIT organization ID to which the network area is associated.
- Project
Count int - The amount of projects currently referencing this area.
- Transfer
Network string - Classless Inter-Domain Routing (CIDR) for configuration of network area for region
eu01.
- default
Nameservers List<String> - List of DNS Servers/Nameservers for configuration of network area for region
eu01. - default
Prefix IntegerLength - The default prefix length for networks in the network area for region
eu01. - labels Map<String,String>
- Labels are key-value string pairs which can be attached to a resource container
- max
Prefix IntegerLength - The maximal prefix length for networks in the network area for region
eu01. - min
Prefix IntegerLength - The minimal prefix length for networks in the network area for region
eu01. - name String
- The name of the network area.
- network
Area StringId - The network area ID.
- network
Ranges List<NetworkArea Network Range> - List of Network ranges for configuration of network area for region
eu01. - organization
Id String - STACKIT organization ID to which the network area is associated.
- project
Count Integer - The amount of projects currently referencing this area.
- transfer
Network String - Classless Inter-Domain Routing (CIDR) for configuration of network area for region
eu01.
- default
Nameservers string[] - List of DNS Servers/Nameservers for configuration of network area for region
eu01. - default
Prefix numberLength - The default prefix length for networks in the network area for region
eu01. - labels {[key: string]: string}
- Labels are key-value string pairs which can be attached to a resource container
- max
Prefix numberLength - The maximal prefix length for networks in the network area for region
eu01. - min
Prefix numberLength - The minimal prefix length for networks in the network area for region
eu01. - name string
- The name of the network area.
- network
Area stringId - The network area ID.
- network
Ranges NetworkArea Network Range[] - List of Network ranges for configuration of network area for region
eu01. - organization
Id string - STACKIT organization ID to which the network area is associated.
- project
Count number - The amount of projects currently referencing this area.
- transfer
Network string - Classless Inter-Domain Routing (CIDR) for configuration of network area for region
eu01.
- default_
nameservers Sequence[str] - List of DNS Servers/Nameservers for configuration of network area for region
eu01. - default_
prefix_ intlength - The default prefix length for networks in the network area for region
eu01. - labels Mapping[str, str]
- Labels are key-value string pairs which can be attached to a resource container
- max_
prefix_ intlength - The maximal prefix length for networks in the network area for region
eu01. - min_
prefix_ intlength - The minimal prefix length for networks in the network area for region
eu01. - name str
- The name of the network area.
- network_
area_ strid - The network area ID.
- network_
ranges Sequence[NetworkArea Network Range Args] - List of Network ranges for configuration of network area for region
eu01. - organization_
id str - STACKIT organization ID to which the network area is associated.
- project_
count int - The amount of projects currently referencing this area.
- transfer_
network str - Classless Inter-Domain Routing (CIDR) for configuration of network area for region
eu01.
- default
Nameservers List<String> - List of DNS Servers/Nameservers for configuration of network area for region
eu01. - default
Prefix NumberLength - The default prefix length for networks in the network area for region
eu01. - labels Map<String>
- Labels are key-value string pairs which can be attached to a resource container
- max
Prefix NumberLength - The maximal prefix length for networks in the network area for region
eu01. - min
Prefix NumberLength - The minimal prefix length for networks in the network area for region
eu01. - name String
- The name of the network area.
- network
Area StringId - The network area ID.
- network
Ranges List<Property Map> - List of Network ranges for configuration of network area for region
eu01. - organization
Id String - STACKIT organization ID to which the network area is associated.
- project
Count Number - The amount of projects currently referencing this area.
- transfer
Network String - Classless Inter-Domain Routing (CIDR) for configuration of network area for region
eu01.
Supporting Types
NetworkAreaNetworkRange, NetworkAreaNetworkRangeArgs
- Prefix string
- Classless Inter-Domain Routing (CIDR).
- Network
Range stringId
- Prefix string
- Classless Inter-Domain Routing (CIDR).
- Network
Range stringId
- prefix String
- Classless Inter-Domain Routing (CIDR).
- network
Range StringId
- prefix string
- Classless Inter-Domain Routing (CIDR).
- network
Range stringId
- prefix str
- Classless Inter-Domain Routing (CIDR).
- network_
range_ strid
- prefix String
- Classless Inter-Domain Routing (CIDR).
- network
Range StringId
Package Details
- Repository
- stackit stackitcloud/pulumi-stackit
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
stackitTerraform Provider.
published on Tuesday, Mar 31, 2026 by stackitcloud
