diff --git a/docs/resources/ipam_aggregate.md b/docs/resources/ipam_aggregate.md index 2b6823f9c..f6efd7a35 100644 --- a/docs/resources/ipam_aggregate.md +++ b/docs/resources/ipam_aggregate.md @@ -49,3 +49,11 @@ The ``tag`` block supports: In addition to the above arguments, the following attributes are exported: * ``id`` - The id (ref in Netbox) of this object. + +## Import + +Aggregates can be imported by `id` e.g. + +``` +$ terraform import netbox_ipam_aggregate.aggregate_test id +``` diff --git a/docs/resources/ipam_ip_addresses.md b/docs/resources/ipam_ip_addresses.md index c0079fb15..1deed4e69 100644 --- a/docs/resources/ipam_ip_addresses.md +++ b/docs/resources/ipam_ip_addresses.md @@ -58,3 +58,11 @@ The ``tag`` block supports: In addition to the above arguments, the following attributes are exported: * ``id`` - The id (ref in Netbox) of this object. + +## Import + +Ip addresses can be imported by `id` e.g. + +``` +$ terraform import netbox_ipam_ip_addresses.ip_test id +``` diff --git a/docs/resources/ipam_prefix.md b/docs/resources/ipam_prefix.md index 447bbcc2e..d43249b9f 100644 --- a/docs/resources/ipam_prefix.md +++ b/docs/resources/ipam_prefix.md @@ -42,3 +42,10 @@ The ``tag`` block supports: In addition to the above arguments, the following attributes are exported: * ``id`` - The id (ref in Netbox) of this object. +## Import + +Prefixes can be imported by `id` e.g. + +``` +$ terraform import netbox_ipam_prefix.prefix_test id +``` diff --git a/docs/resources/ipam_service.md b/docs/resources/ipam_service.md index 33ee30150..d87dbabe9 100644 --- a/docs/resources/ipam_service.md +++ b/docs/resources/ipam_service.md @@ -55,3 +55,11 @@ The ``tag`` block supports: In addition to the above arguments, the following attributes are exported: * ``id`` - The id (ref in Netbox) of this object. + +## Import + +Services can be imported by `id` e.g. + +``` +$ terraform import netbox_ipam_service.service_test id +``` diff --git a/docs/resources/ipam_vlan.md b/docs/resources/ipam_vlan.md index 5ab4c2c58..6a13e7c32 100644 --- a/docs/resources/ipam_vlan.md +++ b/docs/resources/ipam_vlan.md @@ -57,3 +57,11 @@ The ``tag`` block supports: In addition to the above arguments, the following attributes are exported: * ``id`` - The id (ref in Netbox) of this object. + +## Import + +Vlans can be imported by `id` e.g. + +``` +$ terraform import netbox_ipam_vlan.vlan_test id +``` diff --git a/docs/resources/ipam_vlan_group.md b/docs/resources/ipam_vlan_group.md index a8ce308d8..4e1e0e27c 100644 --- a/docs/resources/ipam_vlan_group.md +++ b/docs/resources/ipam_vlan_group.md @@ -23,3 +23,11 @@ The following arguments are supported: In addition to the above arguments, the following attributes are exported: * ``id`` - The id (ref in Netbox) of this object. + +## Import + +Vlan groups can be imported by `id` e.g. + +``` +$ terraform import netbox_ipam_vlan_group.vlan_group_test id +``` diff --git a/docs/resources/tenancy_tenant.md b/docs/resources/tenancy_tenant.md index d71fed197..5ec630df9 100644 --- a/docs/resources/tenancy_tenant.md +++ b/docs/resources/tenancy_tenant.md @@ -52,3 +52,11 @@ The ``tag`` block supports: In addition to the above arguments, the following attributes are exported: * ``id`` - The id (ref in Netbox) of this object. + +## Import + +Tenants can be imported by `id` e.g. + +``` +$ terraform import netbox_tenancy_tenant.tenant_test id +``` diff --git a/docs/resources/tenancy_tenant_group.md b/docs/resources/tenancy_tenant_group.md index b738c7763..17a3bbd01 100644 --- a/docs/resources/tenancy_tenant_group.md +++ b/docs/resources/tenancy_tenant_group.md @@ -21,3 +21,11 @@ The following arguments are supported: In addition to the above arguments, the following attributes are exported: * ``id`` - The id (ref in Netbox) of this object. + +## Import + +Tenant groups can be imported by `id` e.g. + +``` +$ terraform import netbox_tenancy_tenant_group.tenant_group_test id +``` diff --git a/docs/resources/virtualization_interface.md b/docs/resources/virtualization_interface.md index d7f61c59f..0e1c45732 100644 --- a/docs/resources/virtualization_interface.md +++ b/docs/resources/virtualization_interface.md @@ -35,3 +35,11 @@ The ``tag`` block supports: In addition to the above arguments, the following attributes are exported: * ``id`` - The id (ref in Netbox) of this object. + +## Import + +Virtualization interfaces can be imported by `id` e.g. + +``` +$ terraform import netbox_virtualization_interface.interface_test id +``` diff --git a/docs/resources/virtualization_vm.md b/docs/resources/virtualization_vm.md index 97312edd8..9a8e458f2 100644 --- a/docs/resources/virtualization_vm.md +++ b/docs/resources/virtualization_vm.md @@ -57,3 +57,11 @@ The ``tag`` block supports: In addition to the above arguments, the following attributes are exported: * ``id`` - The id (ref in Netbox) of this object. + +## Import + +Virtualization vms can be imported by `id` e.g. + +``` +$ terraform import netbox_virtualization_vm.vm_test id +``` diff --git a/netbox/resource_netbox_ipam_aggregate.go b/netbox/resource_netbox_ipam_aggregate.go index 3061bd303..f915c11dd 100644 --- a/netbox/resource_netbox_ipam_aggregate.go +++ b/netbox/resource_netbox_ipam_aggregate.go @@ -20,6 +20,9 @@ func resourceNetboxIpamAggregate() *schema.Resource { Update: resourceNetboxIpamAggregateUpdate, Delete: resourceNetboxIpamAggregateDelete, Exists: resourceNetboxIpamAggregateExists, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "custom_fields": { diff --git a/netbox/resource_netbox_ipam_ip_addresses.go b/netbox/resource_netbox_ipam_ip_addresses.go index 717d6c81f..6669fb49e 100644 --- a/netbox/resource_netbox_ipam_ip_addresses.go +++ b/netbox/resource_netbox_ipam_ip_addresses.go @@ -19,6 +19,9 @@ func resourceNetboxIpamIPAddresses() *schema.Resource { Update: resourceNetboxIpamIPAddressesUpdate, Delete: resourceNetboxIpamIPAddressesDelete, Exists: resourceNetboxIpamIPAddressesExists, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "address": { diff --git a/netbox/resource_netbox_ipam_prefix.go b/netbox/resource_netbox_ipam_prefix.go index 9b5d5d337..01d0e8fa1 100644 --- a/netbox/resource_netbox_ipam_prefix.go +++ b/netbox/resource_netbox_ipam_prefix.go @@ -18,6 +18,9 @@ func resourceNetboxIpamPrefix() *schema.Resource { Update: resourceNetboxIpamPrefixUpdate, Delete: resourceNetboxIpamPrefixDelete, Exists: resourceNetboxIpamPrefixExists, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "description": { diff --git a/netbox/resource_netbox_ipam_service.go b/netbox/resource_netbox_ipam_service.go index bf57993ed..869c57dcc 100644 --- a/netbox/resource_netbox_ipam_service.go +++ b/netbox/resource_netbox_ipam_service.go @@ -18,6 +18,9 @@ func resourceNetboxIpamService() *schema.Resource { Update: resourceNetboxIpamServiceUpdate, Delete: resourceNetboxIpamServiceDelete, Exists: resourceNetboxIpamServiceExists, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "custom_fields": { diff --git a/netbox/resource_netbox_ipam_vlan.go b/netbox/resource_netbox_ipam_vlan.go index 0c0e59ea1..8fa790bce 100644 --- a/netbox/resource_netbox_ipam_vlan.go +++ b/netbox/resource_netbox_ipam_vlan.go @@ -18,6 +18,9 @@ func resourceNetboxIpamVlan() *schema.Resource { Update: resourceNetboxIpamVlanUpdate, Delete: resourceNetboxIpamVlanDelete, Exists: resourceNetboxIpamVlanExists, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "custom_fields": { diff --git a/netbox/resource_netbox_ipam_vlan_group.go b/netbox/resource_netbox_ipam_vlan_group.go index a4d8ded1f..10b6ef480 100644 --- a/netbox/resource_netbox_ipam_vlan_group.go +++ b/netbox/resource_netbox_ipam_vlan_group.go @@ -19,6 +19,9 @@ func resourceNetboxIpamVlanGroup() *schema.Resource { Update: resourceNetboxIpamVlanGroupUpdate, Delete: resourceNetboxIpamVlanGroupDelete, Exists: resourceNetboxIpamVlanGroupExists, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { diff --git a/netbox/resource_netbox_tenancy_tenant.go b/netbox/resource_netbox_tenancy_tenant.go index fdc5f38a9..39262143d 100644 --- a/netbox/resource_netbox_tenancy_tenant.go +++ b/netbox/resource_netbox_tenancy_tenant.go @@ -19,6 +19,9 @@ func resourceNetboxTenancyTenant() *schema.Resource { Update: resourceNetboxTenancyTenantUpdate, Delete: resourceNetboxTenancyTenantDelete, Exists: resourceNetboxTenancyTenantExists, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "comments": { diff --git a/netbox/resource_netbox_tenancy_tenant_group.go b/netbox/resource_netbox_tenancy_tenant_group.go index f1b352d63..506528f62 100644 --- a/netbox/resource_netbox_tenancy_tenant_group.go +++ b/netbox/resource_netbox_tenancy_tenant_group.go @@ -19,6 +19,9 @@ func resourceNetboxTenancyTenantGroup() *schema.Resource { Update: resourceNetboxTenancyTenantGroupUpdate, Delete: resourceNetboxTenancyTenantGroupDelete, Exists: resourceNetboxTenancyTenantGroupExists, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { diff --git a/netbox/resource_netbox_virtualization_interface.go b/netbox/resource_netbox_virtualization_interface.go index ffa46beb7..588d20f46 100644 --- a/netbox/resource_netbox_virtualization_interface.go +++ b/netbox/resource_netbox_virtualization_interface.go @@ -19,6 +19,9 @@ func resourceNetboxVirtualizationInterface() *schema.Resource { Update: resourceNetboxVirtualizationInterfaceUpdate, Delete: resourceNetboxVirtualizationInterfaceDelete, Exists: resourceNetboxVirtualizationInterfaceExists, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "description": { diff --git a/netbox/resource_netbox_virtualization_vm.go b/netbox/resource_netbox_virtualization_vm.go index 3e5aaa30f..c8c29e61e 100644 --- a/netbox/resource_netbox_virtualization_vm.go +++ b/netbox/resource_netbox_virtualization_vm.go @@ -18,6 +18,9 @@ func resourceNetboxVirtualizationVM() *schema.Resource { Update: resourceNetboxVirtualizationVMUpdate, Delete: resourceNetboxVirtualizationVMDelete, Exists: resourceNetboxVirtualizationVMExists, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "cluster_id": {