published on Monday, Aug 17, 2026 by stackitcloud
published on Monday, Aug 17, 2026 by stackitcloud
Network area resource schema.
This resource is for SNA, not VPC, networks.
Example Usage
resource "stackit_network_area" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-network-area"
labels = {
"key" = "value"
}
}
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
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,
labels: Optional[Mapping[str, str]] = None,
name: 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.
resource "stackit_network_area" "name" {
# resource properties
}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"),
})
resource "stackit_network_area" "networkAreaResource" {
lifecycle {
create_before_destroy = true
}
organization_id = "string"
labels = {
"string" = "string"
}
name = "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.
- Labels Dictionary<string, string>
- Labels are key-value string pairs which can be attached to a resource container
- Name string
- The name of the network area.
- Organization
Id string - STACKIT organization ID to which the network area is associated.
- Labels map[string]string
- Labels are key-value string pairs which can be attached to a resource container
- Name string
- The name of the network area.
- organization_
id string - STACKIT organization ID to which the network area is associated.
- labels map(string)
- Labels are key-value string pairs which can be attached to a resource container
- name string
- The name of the network area.
- organization
Id String - STACKIT organization ID to which the network area is associated.
- labels Map<String,String>
- Labels are key-value string pairs which can be attached to a resource container
- name String
- The name of the network area.
- organization
Id string - STACKIT organization ID to which the network area is associated.
- labels {[key: string]: string}
- Labels are key-value string pairs which can be attached to a resource container
- name string
- The name of the network area.
- organization_
id str - STACKIT organization ID to which the network area is associated.
- labels Mapping[str, str]
- Labels are key-value string pairs which can be attached to a resource container
- name str
- The name of the network area.
- organization
Id String - STACKIT organization ID to which the network area is associated.
- labels Map<String>
- Labels are key-value string pairs which can be attached to a resource container
- name String
- The name of the network area.
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 number - 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,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
network_area_id: Optional[str] = None,
organization_id: Optional[str] = None,
project_count: Optional[int] = 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}import {
to = stackit_network_area.example
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.
- Labels Dictionary<string, string>
- Labels are key-value string pairs which can be attached to a resource container
- Name string
- The name of the network area.
- Network
Area stringId - The network area ID.
- Organization
Id string - STACKIT organization ID to which the network area is associated.
- Project
Count int - The amount of projects currently referencing this area.
- Labels map[string]string
- Labels are key-value string pairs which can be attached to a resource container
- Name string
- The name of the network area.
- Network
Area stringId - The network area ID.
- Organization
Id string - STACKIT organization ID to which the network area is associated.
- Project
Count int - The amount of projects currently referencing this area.
- labels map(string)
- Labels are key-value string pairs which can be attached to a resource container
- name string
- The name of the network area.
- network_
area_ stringid - The network area ID.
- organization_
id string - STACKIT organization ID to which the network area is associated.
- project_
count number - The amount of projects currently referencing this area.
- labels Map<String,String>
- Labels are key-value string pairs which can be attached to a resource container
- name String
- The name of the network area.
- network
Area StringId - The network area ID.
- organization
Id String - STACKIT organization ID to which the network area is associated.
- project
Count Integer - The amount of projects currently referencing this area.
- labels {[key: string]: string}
- Labels are key-value string pairs which can be attached to a resource container
- name string
- The name of the network area.
- network
Area stringId - The network area ID.
- organization
Id string - STACKIT organization ID to which the network area is associated.
- project
Count number - The amount of projects currently referencing this area.
- labels Mapping[str, str]
- Labels are key-value string pairs which can be attached to a resource container
- name str
- The name of the network area.
- network_
area_ strid - The network area ID.
- organization_
id str - STACKIT organization ID to which the network area is associated.
- project_
count int - The amount of projects currently referencing this area.
- labels Map<String>
- Labels are key-value string pairs which can be attached to a resource container
- name String
- The name of the network area.
- network
Area StringId - The network area ID.
- organization
Id String - STACKIT organization ID to which the network area is associated.
- project
Count Number - The amount of projects currently referencing this area.
Package Details
- Repository
- stackit stackitcloud/pulumi-stackit
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
stackitTerraform Provider.
published on Monday, Aug 17, 2026 by stackitcloud