published on Wednesday, Nov 4, 2026 by e-breuninger
published on Wednesday, Nov 4, 2026 by e-breuninger
An autonomous system number (ipam.asn) allocated from the next free ASN of an ASN range. After creation it is an ordinary ASN; the range replaces the resource when changed.
From the official documentation:
An Autonomous System Number (ASN) is a numeric identifier used in the Border Gateway Protocol (BGP) to identify which autonomous system a particular prefix is originating from or transiting through. NetBox supports both 16- and 32-bit ASNs.
ASNs must be globally unique within NetBox, and may be allocated from within a defined range. Each ASN may be assigned to multiple sites.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = new netbox.Rir("test", {name: "test-rir"});
const testAsnRange = new netbox.AsnRange("test", {
name: "test-asn-range",
slug: "test-asn-range",
rirId: test.rirId,
start: 64512,
end: 64521,
});
const testIpamRole = new netbox.IpamRole("test", {name: "test-ipam-role"});
const testTenant = new netbox.Tenant("test", {name: "test-tenant"});
const testSite = new netbox.Site("test", {name: "test-site"});
// Each resource allocates the next free ASN of the range; the RIR comes from
// the range.
// site_ids set: the ASN is attached to exactly these sites. Other ASNs can
// attach themselves to the same site in the same way.
const toSite = new netbox.AvailableAsn("to_site", {
asnRangeId: testAsnRange.asnRangeId,
roleId: testIpamRole.ipamRoleId,
tenantId: testTenant.tenantId,
siteIds: [testSite.siteId],
description: "test-description",
});
// site_ids empty: the ASN is detached from all of its sites. Other ASNs of
// those sites stay attached.
const siteExplicitClear = new netbox.AvailableAsn("site_explicit_clear", {
asnRangeId: testAsnRange.asnRangeId,
roleId: testIpamRole.ipamRoleId,
tenantId: testTenant.tenantId,
siteIds: [],
description: "test-description",
});
// site_ids unset: the sites of the ASN are left alone, e.g. when a site
// lists the ASN in asn_ids.
const noSite = new netbox.AvailableAsn("no_site", {
asnRangeId: testAsnRange.asnRangeId,
roleId: testIpamRole.ipamRoleId,
tenantId: testTenant.tenantId,
description: "test-description",
});
import pulumi
import pulumi_netbox as netbox
test = netbox.Rir("test", name="test-rir")
test_asn_range = netbox.AsnRange("test",
name="test-asn-range",
slug="test-asn-range",
rir_id=test.rir_id,
start=64512,
end=64521)
test_ipam_role = netbox.IpamRole("test", name="test-ipam-role")
test_tenant = netbox.Tenant("test", name="test-tenant")
test_site = netbox.Site("test", name="test-site")
# Each resource allocates the next free ASN of the range; the RIR comes from
# the range.
# site_ids set: the ASN is attached to exactly these sites. Other ASNs can
# attach themselves to the same site in the same way.
to_site = netbox.AvailableAsn("to_site",
asn_range_id=test_asn_range.asn_range_id,
role_id=test_ipam_role.ipam_role_id,
tenant_id=test_tenant.tenant_id,
site_ids=[test_site.site_id],
description="test-description")
# site_ids empty: the ASN is detached from all of its sites. Other ASNs of
# those sites stay attached.
site_explicit_clear = netbox.AvailableAsn("site_explicit_clear",
asn_range_id=test_asn_range.asn_range_id,
role_id=test_ipam_role.ipam_role_id,
tenant_id=test_tenant.tenant_id,
site_ids=[],
description="test-description")
# site_ids unset: the sites of the ASN are left alone, e.g. when a site
# lists the ASN in asn_ids.
no_site = netbox.AvailableAsn("no_site",
asn_range_id=test_asn_range.asn_range_id,
role_id=test_ipam_role.ipam_role_id,
tenant_id=test_tenant.tenant_id,
description="test-description")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v6/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := netbox.NewRir(ctx, "test", &netbox.RirArgs{
Name: pulumi.String("test-rir"),
})
if err != nil {
return err
}
testAsnRange, err := netbox.NewAsnRange(ctx, "test", &netbox.AsnRangeArgs{
Name: pulumi.String("test-asn-range"),
Slug: pulumi.String("test-asn-range"),
RirId: test.RirId,
Start: pulumi.Float64(64512),
End: pulumi.Float64(64521),
})
if err != nil {
return err
}
testIpamRole, err := netbox.NewIpamRole(ctx, "test", &netbox.IpamRoleArgs{
Name: pulumi.String("test-ipam-role"),
})
if err != nil {
return err
}
testTenant, err := netbox.NewTenant(ctx, "test", &netbox.TenantArgs{
Name: pulumi.String("test-tenant"),
})
if err != nil {
return err
}
testSite, err := netbox.NewSite(ctx, "test", &netbox.SiteArgs{
Name: pulumi.String("test-site"),
})
if err != nil {
return err
}
// site_ids set: the ASN is attached to exactly these sites. Other ASNs can
// attach themselves to the same site in the same way.
_, err = netbox.NewAvailableAsn(ctx, "to_site", &netbox.AvailableAsnArgs{
AsnRangeId: testAsnRange.AsnRangeId,
RoleId: testIpamRole.IpamRoleId,
TenantId: testTenant.TenantId,
SiteIds: pulumi.Float64Array{
testSite.SiteId,
},
Description: pulumi.String("test-description"),
})
if err != nil {
return err
}
// site_ids empty: the ASN is detached from all of its sites. Other ASNs of
// those sites stay attached.
_, err = netbox.NewAvailableAsn(ctx, "site_explicit_clear", &netbox.AvailableAsnArgs{
AsnRangeId: testAsnRange.AsnRangeId,
RoleId: testIpamRole.IpamRoleId,
TenantId: testTenant.TenantId,
SiteIds: pulumi.Float64Array{},
Description: pulumi.String("test-description"),
})
if err != nil {
return err
}
// site_ids unset: the sites of the ASN are left alone, e.g. when a site
// lists the ASN in asn_ids.
_, err = netbox.NewAvailableAsn(ctx, "no_site", &netbox.AvailableAsnArgs{
AsnRangeId: testAsnRange.AsnRangeId,
RoleId: testIpamRole.IpamRoleId,
TenantId: testTenant.TenantId,
Description: pulumi.String("test-description"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
var test = new Netbox.Rir("test", new()
{
Name = "test-rir",
});
var testAsnRange = new Netbox.AsnRange("test", new()
{
Name = "test-asn-range",
Slug = "test-asn-range",
RirId = test.RirId,
Start = 64512,
End = 64521,
});
var testIpamRole = new Netbox.IpamRole("test", new()
{
Name = "test-ipam-role",
});
var testTenant = new Netbox.Tenant("test", new()
{
Name = "test-tenant",
});
var testSite = new Netbox.Site("test", new()
{
Name = "test-site",
});
// Each resource allocates the next free ASN of the range; the RIR comes from
// the range.
// site_ids set: the ASN is attached to exactly these sites. Other ASNs can
// attach themselves to the same site in the same way.
var toSite = new Netbox.AvailableAsn("to_site", new()
{
AsnRangeId = testAsnRange.AsnRangeId,
RoleId = testIpamRole.IpamRoleId,
TenantId = testTenant.TenantId,
SiteIds = new[]
{
testSite.SiteId,
},
Description = "test-description",
});
// site_ids empty: the ASN is detached from all of its sites. Other ASNs of
// those sites stay attached.
var siteExplicitClear = new Netbox.AvailableAsn("site_explicit_clear", new()
{
AsnRangeId = testAsnRange.AsnRangeId,
RoleId = testIpamRole.IpamRoleId,
TenantId = testTenant.TenantId,
SiteIds = new[] {},
Description = "test-description",
});
// site_ids unset: the sites of the ASN are left alone, e.g. when a site
// lists the ASN in asn_ids.
var noSite = new Netbox.AvailableAsn("no_site", new()
{
AsnRangeId = testAsnRange.AsnRangeId,
RoleId = testIpamRole.IpamRoleId,
TenantId = testTenant.TenantId,
Description = "test-description",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.Rir;
import com.pulumi.netbox.RirArgs;
import com.pulumi.netbox.AsnRange;
import com.pulumi.netbox.AsnRangeArgs;
import com.pulumi.netbox.IpamRole;
import com.pulumi.netbox.IpamRoleArgs;
import com.pulumi.netbox.Tenant;
import com.pulumi.netbox.TenantArgs;
import com.pulumi.netbox.Site;
import com.pulumi.netbox.SiteArgs;
import com.pulumi.netbox.AvailableAsn;
import com.pulumi.netbox.AvailableAsnArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new Rir("test", RirArgs.builder()
.name("test-rir")
.build());
var testAsnRange = new AsnRange("testAsnRange", AsnRangeArgs.builder()
.name("test-asn-range")
.slug("test-asn-range")
.rirId(test.rirId())
.start(64512.0)
.end(64521.0)
.build());
var testIpamRole = new IpamRole("testIpamRole", IpamRoleArgs.builder()
.name("test-ipam-role")
.build());
var testTenant = new Tenant("testTenant", TenantArgs.builder()
.name("test-tenant")
.build());
var testSite = new Site("testSite", SiteArgs.builder()
.name("test-site")
.build());
// Each resource allocates the next free ASN of the range; the RIR comes from
// the range.
// site_ids set: the ASN is attached to exactly these sites. Other ASNs can
// attach themselves to the same site in the same way.
var toSite = new AvailableAsn("toSite", AvailableAsnArgs.builder()
.asnRangeId(testAsnRange.asnRangeId())
.roleId(testIpamRole.ipamRoleId())
.tenantId(testTenant.tenantId())
.siteIds(testSite.siteId())
.description("test-description")
.build());
// site_ids empty: the ASN is detached from all of its sites. Other ASNs of
// those sites stay attached.
var siteExplicitClear = new AvailableAsn("siteExplicitClear", AvailableAsnArgs.builder()
.asnRangeId(testAsnRange.asnRangeId())
.roleId(testIpamRole.ipamRoleId())
.tenantId(testTenant.tenantId())
.siteIds()
.description("test-description")
.build());
// site_ids unset: the sites of the ASN are left alone, e.g. when a site
// lists the ASN in asn_ids.
var noSite = new AvailableAsn("noSite", AvailableAsnArgs.builder()
.asnRangeId(testAsnRange.asnRangeId())
.roleId(testIpamRole.ipamRoleId())
.tenantId(testTenant.tenantId())
.description("test-description")
.build());
}
}
resources:
test:
type: netbox:Rir
properties:
name: test-rir
testAsnRange:
type: netbox:AsnRange
name: test
properties:
name: test-asn-range
slug: test-asn-range
rirId: ${test.rirId}
start: 64512
end: 64521
testIpamRole:
type: netbox:IpamRole
name: test
properties:
name: test-ipam-role
testTenant:
type: netbox:Tenant
name: test
properties:
name: test-tenant
testSite: # Each resource allocates the next free ASN of the range; the RIR comes from
# the range.
type: netbox:Site
name: test
properties:
name: test-site
# site_ids set: the ASN is attached to exactly these sites. Other ASNs can
# attach themselves to the same site in the same way.
toSite:
type: netbox:AvailableAsn
name: to_site
properties:
asnRangeId: ${testAsnRange.asnRangeId}
roleId: ${testIpamRole.ipamRoleId}
tenantId: ${testTenant.tenantId}
siteIds:
- ${testSite.siteId}
description: test-description
# site_ids empty: the ASN is detached from all of its sites. Other ASNs of
# those sites stay attached.
siteExplicitClear:
type: netbox:AvailableAsn
name: site_explicit_clear
properties:
asnRangeId: ${testAsnRange.asnRangeId}
roleId: ${testIpamRole.ipamRoleId}
tenantId: ${testTenant.tenantId}
siteIds: []
description: test-description
# site_ids unset: the sites of the ASN are left alone, e.g. when a site
# lists the ASN in asn_ids.
noSite:
type: netbox:AvailableAsn
name: no_site
properties:
asnRangeId: ${testAsnRange.asnRangeId}
roleId: ${testIpamRole.ipamRoleId}
tenantId: ${testTenant.tenantId}
description: test-description
Example coming soon!
Create AvailableAsn Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AvailableAsn(name: string, args: AvailableAsnArgs, opts?: CustomResourceOptions);@overload
def AvailableAsn(resource_name: str,
args: AvailableAsnArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AvailableAsn(resource_name: str,
opts: Optional[ResourceOptions] = None,
asn_range_id: Optional[float] = None,
comments: Optional[str] = None,
custom_fields: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
owner_id: Optional[float] = None,
role_id: Optional[float] = None,
site_ids: Optional[Sequence[float]] = None,
tags: Optional[Sequence[str]] = None,
tenant_id: Optional[float] = None)func NewAvailableAsn(ctx *Context, name string, args AvailableAsnArgs, opts ...ResourceOption) (*AvailableAsn, error)public AvailableAsn(string name, AvailableAsnArgs args, CustomResourceOptions? opts = null)
public AvailableAsn(String name, AvailableAsnArgs args)
public AvailableAsn(String name, AvailableAsnArgs args, CustomResourceOptions options)
type: netbox:AvailableAsn
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "netbox_available_asn" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args AvailableAsnArgs
- 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 AvailableAsnArgs
- 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 AvailableAsnArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AvailableAsnArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AvailableAsnArgs
- 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 availableAsnResource = new Netbox.AvailableAsn("availableAsnResource", new()
{
AsnRangeId = 0.0,
Comments = "string",
CustomFields =
{
{ "string", "string" },
},
Description = "string",
OwnerId = 0.0,
RoleId = 0.0,
SiteIds = new[]
{
0.0,
},
Tags = new[]
{
"string",
},
TenantId = 0.0,
});
example, err := netbox.NewAvailableAsn(ctx, "availableAsnResource", &netbox.AvailableAsnArgs{
AsnRangeId: pulumi.Float64(0),
Comments: pulumi.String("string"),
CustomFields: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
OwnerId: pulumi.Float64(0),
RoleId: pulumi.Float64(0),
SiteIds: pulumi.Float64Array{
pulumi.Float64(0),
},
Tags: pulumi.StringArray{
pulumi.String("string"),
},
TenantId: pulumi.Float64(0),
})
resource "netbox_available_asn" "availableAsnResource" {
lifecycle {
create_before_destroy = true
}
asn_range_id = 0
comments = "string"
custom_fields = {
"string" = "string"
}
description = "string"
owner_id = 0
role_id = 0
site_ids = [0]
tags = ["string"]
tenant_id = 0
}
var availableAsnResource = new AvailableAsn("availableAsnResource", AvailableAsnArgs.builder()
.asnRangeId(0.0)
.comments("string")
.customFields(Map.of("string", "string"))
.description("string")
.ownerId(0.0)
.roleId(0.0)
.siteIds(0.0)
.tags("string")
.tenantId(0.0)
.build());
available_asn_resource = netbox.AvailableAsn("availableAsnResource",
asn_range_id=float(0),
comments="string",
custom_fields={
"string": "string",
},
description="string",
owner_id=float(0),
role_id=float(0),
site_ids=[float(0)],
tags=["string"],
tenant_id=float(0))
const availableAsnResource = new netbox.AvailableAsn("availableAsnResource", {
asnRangeId: 0,
comments: "string",
customFields: {
string: "string",
},
description: "string",
ownerId: 0,
roleId: 0,
siteIds: [0],
tags: ["string"],
tenantId: 0,
});
type: netbox:AvailableAsn
properties:
asnRangeId: 0
comments: string
customFields:
string: string
description: string
ownerId: 0
roleId: 0
siteIds:
- 0
tags:
- string
tenantId: 0
AvailableAsn 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 AvailableAsn resource accepts the following input properties:
- Asn
Range doubleId - Id of the ASN range to allocate the next available ASN from.
- Comments string
- Custom
Fields Dictionary<string, string> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- Description string
- Owner
Id double - Id of the owner the object is assigned to.
- Role
Id double - Id of the role (ipam.role).
- Site
Ids List<double> - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- List<string>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Tenant
Id double - Id of the tenant.
- Asn
Range float64Id - Id of the ASN range to allocate the next available ASN from.
- Comments string
- Custom
Fields map[string]string - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- Description string
- Owner
Id float64 - Id of the owner the object is assigned to.
- Role
Id float64 - Id of the role (ipam.role).
- Site
Ids []float64 - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- []string
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Tenant
Id float64 - Id of the tenant.
- asn_
range_ numberid - Id of the ASN range to allocate the next available ASN from.
- comments string
- custom_
fields map(string) - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description string
- owner_
id number - Id of the owner the object is assigned to.
- role_
id number - Id of the role (ipam.role).
- site_
ids list(number) - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- list(string)
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant_
id number - Id of the tenant.
- asn
Range DoubleId - Id of the ASN range to allocate the next available ASN from.
- comments String
- custom
Fields Map<String,String> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description String
- owner
Id Double - Id of the owner the object is assigned to.
- role
Id Double - Id of the role (ipam.role).
- site
Ids List<Double> - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant
Id Double - Id of the tenant.
- asn
Range numberId - Id of the ASN range to allocate the next available ASN from.
- comments string
- custom
Fields {[key: string]: string} - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description string
- owner
Id number - Id of the owner the object is assigned to.
- role
Id number - Id of the role (ipam.role).
- site
Ids number[] - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- string[]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant
Id number - Id of the tenant.
- asn_
range_ floatid - Id of the ASN range to allocate the next available ASN from.
- comments str
- custom_
fields Mapping[str, str] - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description str
- owner_
id float - Id of the owner the object is assigned to.
- role_
id float - Id of the role (ipam.role).
- site_
ids Sequence[float] - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- Sequence[str]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant_
id float - Id of the tenant.
- asn
Range NumberId - Id of the ASN range to allocate the next available ASN from.
- comments String
- custom
Fields Map<String> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description String
- owner
Id Number - Id of the owner the object is assigned to.
- role
Id Number - Id of the role (ipam.role).
- site
Ids List<Number> - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- tenant
Id Number - Id of the tenant.
Outputs
All input properties are implicitly available as output properties. Additionally, the AvailableAsn resource produces the following output properties:
- Asn double
- The allocated AS number.
- Available
Asn doubleId - NetBox id.
- Created string
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string - Provider
Count double - Number of providers using the ASN.
- Rir
Id double - Id of the RIR, which NetBox takes from the range.
- Site
Count double - Number of sites using the ASN.
- List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- Asn float64
- The allocated AS number.
- Available
Asn float64Id - NetBox id.
- Created string
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string - Provider
Count float64 - Number of providers using the ASN.
- Rir
Id float64 - Id of the RIR, which NetBox takes from the range.
- Site
Count float64 - Number of sites using the ASN.
- []string
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- asn number
- The allocated AS number.
- available_
asn_ numberid - NetBox id.
- created string
- id string
- The provider-assigned unique ID for this managed resource.
- last_
updated string - provider_
count number - Number of providers using the ASN.
- rir_
id number - Id of the RIR, which NetBox takes from the range.
- site_
count number - Number of sites using the ASN.
- list(string)
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- asn Double
- The allocated AS number.
- available
Asn DoubleId - NetBox id.
- created String
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String - provider
Count Double - Number of providers using the ASN.
- rir
Id Double - Id of the RIR, which NetBox takes from the range.
- site
Count Double - Number of sites using the ASN.
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
- asn number
- The allocated AS number.
- available
Asn numberId - NetBox id.
- created string
- id string
- The provider-assigned unique ID for this managed resource.
- last
Updated string - provider
Count number - Number of providers using the ASN.
- rir
Id number - Id of the RIR, which NetBox takes from the range.
- site
Count number - Number of sites using the ASN.
- string[]
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- asn float
- The allocated AS number.
- available_
asn_ floatid - NetBox id.
- created str
- id str
- The provider-assigned unique ID for this managed resource.
- last_
updated str - provider_
count float - Number of providers using the ASN.
- rir_
id float - Id of the RIR, which NetBox takes from the range.
- site_
count float - Number of sites using the ASN.
- Sequence[str]
- Slugs of all tags on the object, including the provider's default_tags.
- url str
- asn Number
- The allocated AS number.
- available
Asn NumberId - NetBox id.
- created String
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String - provider
Count Number - Number of providers using the ASN.
- rir
Id Number - Id of the RIR, which NetBox takes from the range.
- site
Count Number - Number of sites using the ASN.
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
Look up Existing AvailableAsn Resource
Get an existing AvailableAsn 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?: AvailableAsnState, opts?: CustomResourceOptions): AvailableAsn@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
asn: Optional[float] = None,
asn_range_id: Optional[float] = None,
available_asn_id: Optional[float] = None,
comments: Optional[str] = None,
created: Optional[str] = None,
custom_fields: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
last_updated: Optional[str] = None,
owner_id: Optional[float] = None,
provider_count: Optional[float] = None,
rir_id: Optional[float] = None,
role_id: Optional[float] = None,
site_count: Optional[float] = None,
site_ids: Optional[Sequence[float]] = None,
tags: Optional[Sequence[str]] = None,
tags_alls: Optional[Sequence[str]] = None,
tenant_id: Optional[float] = None,
url: Optional[str] = None) -> AvailableAsnfunc GetAvailableAsn(ctx *Context, name string, id IDInput, state *AvailableAsnState, opts ...ResourceOption) (*AvailableAsn, error)public static AvailableAsn Get(string name, Input<string> id, AvailableAsnState? state, CustomResourceOptions? opts = null)public static AvailableAsn get(String name, Output<String> id, AvailableAsnState state, CustomResourceOptions options)resources: _: type: netbox:AvailableAsn get: id: ${id}import {
to = netbox_available_asn.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.
- Asn double
- The allocated AS number.
- Asn
Range doubleId - Id of the ASN range to allocate the next available ASN from.
- Available
Asn doubleId - NetBox id.
- Comments string
- Created string
- Custom
Fields Dictionary<string, string> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- Description string
- Last
Updated string - Owner
Id double - Id of the owner the object is assigned to.
- Provider
Count double - Number of providers using the ASN.
- Rir
Id double - Id of the RIR, which NetBox takes from the range.
- Role
Id double - Id of the role (ipam.role).
- Site
Count double - Number of sites using the ASN.
- Site
Ids List<double> - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- List<string>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Tenant
Id double - Id of the tenant.
- Url string
- Asn float64
- The allocated AS number.
- Asn
Range float64Id - Id of the ASN range to allocate the next available ASN from.
- Available
Asn float64Id - NetBox id.
- Comments string
- Created string
- Custom
Fields map[string]string - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- Description string
- Last
Updated string - Owner
Id float64 - Id of the owner the object is assigned to.
- Provider
Count float64 - Number of providers using the ASN.
- Rir
Id float64 - Id of the RIR, which NetBox takes from the range.
- Role
Id float64 - Id of the role (ipam.role).
- Site
Count float64 - Number of sites using the ASN.
- Site
Ids []float64 - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- []string
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- []string
- Slugs of all tags on the object, including the provider's default_tags.
- Tenant
Id float64 - Id of the tenant.
- Url string
- asn number
- The allocated AS number.
- asn_
range_ numberid - Id of the ASN range to allocate the next available ASN from.
- available_
asn_ numberid - NetBox id.
- comments string
- created string
- custom_
fields map(string) - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description string
- last_
updated string - owner_
id number - Id of the owner the object is assigned to.
- provider_
count number - Number of providers using the ASN.
- rir_
id number - Id of the RIR, which NetBox takes from the range.
- role_
id number - Id of the role (ipam.role).
- site_
count number - Number of sites using the ASN.
- site_
ids list(number) - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- list(string)
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- list(string)
- Slugs of all tags on the object, including the provider's default_tags.
- tenant_
id number - Id of the tenant.
- url string
- asn Double
- The allocated AS number.
- asn
Range DoubleId - Id of the ASN range to allocate the next available ASN from.
- available
Asn DoubleId - NetBox id.
- comments String
- created String
- custom
Fields Map<String,String> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description String
- last
Updated String - owner
Id Double - Id of the owner the object is assigned to.
- provider
Count Double - Number of providers using the ASN.
- rir
Id Double - Id of the RIR, which NetBox takes from the range.
- role
Id Double - Id of the role (ipam.role).
- site
Count Double - Number of sites using the ASN.
- site
Ids List<Double> - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- tenant
Id Double - Id of the tenant.
- url String
- asn number
- The allocated AS number.
- asn
Range numberId - Id of the ASN range to allocate the next available ASN from.
- available
Asn numberId - NetBox id.
- comments string
- created string
- custom
Fields {[key: string]: string} - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description string
- last
Updated string - owner
Id number - Id of the owner the object is assigned to.
- provider
Count number - Number of providers using the ASN.
- rir
Id number - Id of the RIR, which NetBox takes from the range.
- role
Id number - Id of the role (ipam.role).
- site
Count number - Number of sites using the ASN.
- site
Ids number[] - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- string[]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- string[]
- Slugs of all tags on the object, including the provider's default_tags.
- tenant
Id number - Id of the tenant.
- url string
- asn float
- The allocated AS number.
- asn_
range_ floatid - Id of the ASN range to allocate the next available ASN from.
- available_
asn_ floatid - NetBox id.
- comments str
- created str
- custom_
fields Mapping[str, str] - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description str
- last_
updated str - owner_
id float - Id of the owner the object is assigned to.
- provider_
count float - Number of providers using the ASN.
- rir_
id float - Id of the RIR, which NetBox takes from the range.
- role_
id float - Id of the role (ipam.role).
- site_
count float - Number of sites using the ASN.
- site_
ids Sequence[float] - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- Sequence[str]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Sequence[str]
- Slugs of all tags on the object, including the provider's default_tags.
- tenant_
id float - Id of the tenant.
- url str
- asn Number
- The allocated AS number.
- asn
Range NumberId - Id of the ASN range to allocate the next available ASN from.
- available
Asn NumberId - NetBox id.
- comments String
- created String
- custom
Fields Map<String> - Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
- description String
- last
Updated String - owner
Id Number - Id of the owner the object is assigned to.
- provider
Count Number - Number of providers using the ASN.
- rir
Id Number - Id of the RIR, which NetBox takes from the range.
- role
Id Number - Id of the role (ipam.role).
- site
Count Number - Number of sites using the ASN.
- site
Ids List<Number> - Ids of sites the ASN is assigned to. When set, the ASN is assigned to exactly these sites, and an empty set removes it from all of them. When unset, the sites are left alone, so they can be declared on the sites instead (netboxsite asnids).
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- tenant
Id Number - Id of the tenant.
- url String
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = netbox_available_asn.to_site
id = “123”
}
The pulumi import command can be used, for example:
$ pulumi import netbox:index/availableAsn:AvailableAsn to_site 123
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netboxTerraform Provider.
published on Wednesday, Nov 4, 2026 by e-breuninger