LoopbackInterface resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scm from "@pulumi/scm";
//
// Creates a loopback interface with static ipv4 address
//
const scmLoopbackIntf = new scm.LoopbackInterface("scm_loopback_intf", {
name: "$scm_loopback_intf",
comment: "Managed by Pulumi",
folder: "ngfw-shared",
ips: [{
name: "198.18.1.1/32",
}],
});
//
// Creates a loopback interface with static ipv4 address, with default value loopback.123
//
const scmLoopbackIntf2 = new scm.LoopbackInterface("scm_loopback_intf_2", {
name: "$scm_loopback_intf_2",
comment: "Managed by Pulumi",
folder: "ngfw-shared",
defaultValue: "loopback.123",
ips: [{
name: "198.18.1.2/32",
}],
});
import pulumi
import pulumi_scm as scm
#
# Creates a loopback interface with static ipv4 address
#
scm_loopback_intf = scm.LoopbackInterface("scm_loopback_intf",
name="$scm_loopback_intf",
comment="Managed by Pulumi",
folder="ngfw-shared",
ips=[{
"name": "198.18.1.1/32",
}])
#
# Creates a loopback interface with static ipv4 address, with default value loopback.123
#
scm_loopback_intf2 = scm.LoopbackInterface("scm_loopback_intf_2",
name="$scm_loopback_intf_2",
comment="Managed by Pulumi",
folder="ngfw-shared",
default_value="loopback.123",
ips=[{
"name": "198.18.1.2/32",
}])
package main
import (
"github.com/pulumi/pulumi-scm/sdk/go/scm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Creates a loopback interface with static ipv4 address
_, err := scm.NewLoopbackInterface(ctx, "scm_loopback_intf", &scm.LoopbackInterfaceArgs{
Name: pulumi.String("$scm_loopback_intf"),
Comment: pulumi.String("Managed by Pulumi"),
Folder: pulumi.String("ngfw-shared"),
Ips: scm.LoopbackInterfaceIpArray{
&scm.LoopbackInterfaceIpArgs{
Name: pulumi.String("198.18.1.1/32"),
},
},
})
if err != nil {
return err
}
// Creates a loopback interface with static ipv4 address, with default value loopback.123
_, err = scm.NewLoopbackInterface(ctx, "scm_loopback_intf_2", &scm.LoopbackInterfaceArgs{
Name: pulumi.String("$scm_loopback_intf_2"),
Comment: pulumi.String("Managed by Pulumi"),
Folder: pulumi.String("ngfw-shared"),
DefaultValue: pulumi.String("loopback.123"),
Ips: scm.LoopbackInterfaceIpArray{
&scm.LoopbackInterfaceIpArgs{
Name: pulumi.String("198.18.1.2/32"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scm = Pulumi.Scm;
return await Deployment.RunAsync(() =>
{
//
// Creates a loopback interface with static ipv4 address
//
var scmLoopbackIntf = new Scm.LoopbackInterface("scm_loopback_intf", new()
{
Name = "$scm_loopback_intf",
Comment = "Managed by Pulumi",
Folder = "ngfw-shared",
Ips = new[]
{
new Scm.Inputs.LoopbackInterfaceIpArgs
{
Name = "198.18.1.1/32",
},
},
});
//
// Creates a loopback interface with static ipv4 address, with default value loopback.123
//
var scmLoopbackIntf2 = new Scm.LoopbackInterface("scm_loopback_intf_2", new()
{
Name = "$scm_loopback_intf_2",
Comment = "Managed by Pulumi",
Folder = "ngfw-shared",
DefaultValue = "loopback.123",
Ips = new[]
{
new Scm.Inputs.LoopbackInterfaceIpArgs
{
Name = "198.18.1.2/32",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scm.LoopbackInterface;
import com.pulumi.scm.LoopbackInterfaceArgs;
import com.pulumi.scm.inputs.LoopbackInterfaceIpArgs;
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) {
//
// Creates a loopback interface with static ipv4 address
//
var scmLoopbackIntf = new LoopbackInterface("scmLoopbackIntf", LoopbackInterfaceArgs.builder()
.name("$scm_loopback_intf")
.comment("Managed by Pulumi")
.folder("ngfw-shared")
.ips(LoopbackInterfaceIpArgs.builder()
%!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression))
.build());
//
// Creates a loopback interface with static ipv4 address, with default value loopback.123
//
var scmLoopbackIntf2 = new LoopbackInterface("scmLoopbackIntf2", LoopbackInterfaceArgs.builder()
.name("$scm_loopback_intf_2")
.comment("Managed by Pulumi")
.folder("ngfw-shared")
.defaultValue("loopback.123")
.ips(LoopbackInterfaceIpArgs.builder()
%!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression))
.build());
}
}
resources:
#
# Creates a loopback interface with static ipv4 address
#
scmLoopbackIntf:
type: scm:LoopbackInterface
name: scm_loopback_intf
properties:
name: $scm_loopback_intf
comment: Managed by Pulumi
folder: ngfw-shared
ips:
- name: 198.18.1.1/32
#
# Creates a loopback interface with static ipv4 address, with default value loopback.123
#
scmLoopbackIntf2:
type: scm:LoopbackInterface
name: scm_loopback_intf_2
properties:
name: $scm_loopback_intf_2
comment: Managed by Pulumi
folder: ngfw-shared
defaultValue: loopback.123
ips:
- name: 198.18.1.2/32
Create LoopbackInterface Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LoopbackInterface(name: string, args?: LoopbackInterfaceArgs, opts?: CustomResourceOptions);@overload
def LoopbackInterface(resource_name: str,
args: Optional[LoopbackInterfaceArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def LoopbackInterface(resource_name: str,
opts: Optional[ResourceOptions] = None,
comment: Optional[str] = None,
default_value: Optional[str] = None,
device: Optional[str] = None,
folder: Optional[str] = None,
interface_management_profile: Optional[str] = None,
ips: Optional[Sequence[LoopbackInterfaceIpArgs]] = None,
ipv6: Optional[LoopbackInterfaceIpv6Args] = None,
mtu: Optional[int] = None,
name: Optional[str] = None,
snippet: Optional[str] = None)func NewLoopbackInterface(ctx *Context, name string, args *LoopbackInterfaceArgs, opts ...ResourceOption) (*LoopbackInterface, error)public LoopbackInterface(string name, LoopbackInterfaceArgs? args = null, CustomResourceOptions? opts = null)
public LoopbackInterface(String name, LoopbackInterfaceArgs args)
public LoopbackInterface(String name, LoopbackInterfaceArgs args, CustomResourceOptions options)
type: scm:LoopbackInterface
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 LoopbackInterfaceArgs
- 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 LoopbackInterfaceArgs
- 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 LoopbackInterfaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LoopbackInterfaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LoopbackInterfaceArgs
- 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 loopbackInterfaceResource = new Scm.LoopbackInterface("loopbackInterfaceResource", new()
{
Comment = "string",
DefaultValue = "string",
Device = "string",
Folder = "string",
InterfaceManagementProfile = "string",
Ips = new[]
{
new Scm.Inputs.LoopbackInterfaceIpArgs
{
Name = "string",
},
},
Ipv6 = new Scm.Inputs.LoopbackInterfaceIpv6Args
{
Addresses = new[]
{
new Scm.Inputs.LoopbackInterfaceIpv6AddressArgs
{
EnableOnInterface = false,
InterfaceId = "string",
Name = "string",
},
},
Enabled = false,
},
Mtu = 0,
Name = "string",
Snippet = "string",
});
example, err := scm.NewLoopbackInterface(ctx, "loopbackInterfaceResource", &scm.LoopbackInterfaceArgs{
Comment: pulumi.String("string"),
DefaultValue: pulumi.String("string"),
Device: pulumi.String("string"),
Folder: pulumi.String("string"),
InterfaceManagementProfile: pulumi.String("string"),
Ips: scm.LoopbackInterfaceIpArray{
&scm.LoopbackInterfaceIpArgs{
Name: pulumi.String("string"),
},
},
Ipv6: &scm.LoopbackInterfaceIpv6Args{
Addresses: scm.LoopbackInterfaceIpv6AddressArray{
&scm.LoopbackInterfaceIpv6AddressArgs{
EnableOnInterface: pulumi.Bool(false),
InterfaceId: pulumi.String("string"),
Name: pulumi.String("string"),
},
},
Enabled: pulumi.Bool(false),
},
Mtu: pulumi.Int(0),
Name: pulumi.String("string"),
Snippet: pulumi.String("string"),
})
var loopbackInterfaceResource = new LoopbackInterface("loopbackInterfaceResource", LoopbackInterfaceArgs.builder()
.comment("string")
.defaultValue("string")
.device("string")
.folder("string")
.interfaceManagementProfile("string")
.ips(LoopbackInterfaceIpArgs.builder()
.name("string")
.build())
.ipv6(LoopbackInterfaceIpv6Args.builder()
.addresses(LoopbackInterfaceIpv6AddressArgs.builder()
.enableOnInterface(false)
.interfaceId("string")
.name("string")
.build())
.enabled(false)
.build())
.mtu(0)
.name("string")
.snippet("string")
.build());
loopback_interface_resource = scm.LoopbackInterface("loopbackInterfaceResource",
comment="string",
default_value="string",
device="string",
folder="string",
interface_management_profile="string",
ips=[{
"name": "string",
}],
ipv6={
"addresses": [{
"enable_on_interface": False,
"interface_id": "string",
"name": "string",
}],
"enabled": False,
},
mtu=0,
name="string",
snippet="string")
const loopbackInterfaceResource = new scm.LoopbackInterface("loopbackInterfaceResource", {
comment: "string",
defaultValue: "string",
device: "string",
folder: "string",
interfaceManagementProfile: "string",
ips: [{
name: "string",
}],
ipv6: {
addresses: [{
enableOnInterface: false,
interfaceId: "string",
name: "string",
}],
enabled: false,
},
mtu: 0,
name: "string",
snippet: "string",
});
type: scm:LoopbackInterface
properties:
comment: string
defaultValue: string
device: string
folder: string
interfaceManagementProfile: string
ips:
- name: string
ipv6:
addresses:
- enableOnInterface: false
interfaceId: string
name: string
enabled: false
mtu: 0
name: string
snippet: string
LoopbackInterface 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 LoopbackInterface resource accepts the following input properties:
- Comment string
- Description
- Default
Value string - Default interface assignment
- Device string
- The device in which the resource is defined
- Folder string
- The folder in which the resource is defined
- Interface
Management stringProfile - Interface management profile
- Ips
List<Loopback
Interface Ip> - Loopback IP Parent
- Ipv6
Loopback
Interface Ipv6 - Loopback IPv6 Configuration
- Mtu int
- MTU
- Name string
- Loopback Interface name
- Snippet string
- The snippet in which the resource is defined
- Comment string
- Description
- Default
Value string - Default interface assignment
- Device string
- The device in which the resource is defined
- Folder string
- The folder in which the resource is defined
- Interface
Management stringProfile - Interface management profile
- Ips
[]Loopback
Interface Ip Args - Loopback IP Parent
- Ipv6
Loopback
Interface Ipv6Args - Loopback IPv6 Configuration
- Mtu int
- MTU
- Name string
- Loopback Interface name
- Snippet string
- The snippet in which the resource is defined
- comment String
- Description
- default
Value String - Default interface assignment
- device String
- The device in which the resource is defined
- folder String
- The folder in which the resource is defined
- interface
Management StringProfile - Interface management profile
- ips
List<Loopback
Interface Ip> - Loopback IP Parent
- ipv6
Loopback
Interface Ipv6 - Loopback IPv6 Configuration
- mtu Integer
- MTU
- name String
- Loopback Interface name
- snippet String
- The snippet in which the resource is defined
- comment string
- Description
- default
Value string - Default interface assignment
- device string
- The device in which the resource is defined
- folder string
- The folder in which the resource is defined
- interface
Management stringProfile - Interface management profile
- ips
Loopback
Interface Ip[] - Loopback IP Parent
- ipv6
Loopback
Interface Ipv6 - Loopback IPv6 Configuration
- mtu number
- MTU
- name string
- Loopback Interface name
- snippet string
- The snippet in which the resource is defined
- comment str
- Description
- default_
value str - Default interface assignment
- device str
- The device in which the resource is defined
- folder str
- The folder in which the resource is defined
- interface_
management_ strprofile - Interface management profile
- ips
Sequence[Loopback
Interface Ip Args] - Loopback IP Parent
- ipv6
Loopback
Interface Ipv6Args - Loopback IPv6 Configuration
- mtu int
- MTU
- name str
- Loopback Interface name
- snippet str
- The snippet in which the resource is defined
- comment String
- Description
- default
Value String - Default interface assignment
- device String
- The device in which the resource is defined
- folder String
- The folder in which the resource is defined
- interface
Management StringProfile - Interface management profile
- ips List<Property Map>
- Loopback IP Parent
- ipv6 Property Map
- Loopback IPv6 Configuration
- mtu Number
- MTU
- name String
- Loopback Interface name
- snippet String
- The snippet in which the resource is defined
Outputs
All input properties are implicitly available as output properties. Additionally, the LoopbackInterface resource produces the following output properties:
Look up Existing LoopbackInterface Resource
Get an existing LoopbackInterface 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?: LoopbackInterfaceState, opts?: CustomResourceOptions): LoopbackInterface@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
comment: Optional[str] = None,
default_value: Optional[str] = None,
device: Optional[str] = None,
folder: Optional[str] = None,
interface_management_profile: Optional[str] = None,
ips: Optional[Sequence[LoopbackInterfaceIpArgs]] = None,
ipv6: Optional[LoopbackInterfaceIpv6Args] = None,
mtu: Optional[int] = None,
name: Optional[str] = None,
snippet: Optional[str] = None,
tfid: Optional[str] = None) -> LoopbackInterfacefunc GetLoopbackInterface(ctx *Context, name string, id IDInput, state *LoopbackInterfaceState, opts ...ResourceOption) (*LoopbackInterface, error)public static LoopbackInterface Get(string name, Input<string> id, LoopbackInterfaceState? state, CustomResourceOptions? opts = null)public static LoopbackInterface get(String name, Output<String> id, LoopbackInterfaceState state, CustomResourceOptions options)resources: _: type: scm:LoopbackInterface 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.
- Comment string
- Description
- Default
Value string - Default interface assignment
- Device string
- The device in which the resource is defined
- Folder string
- The folder in which the resource is defined
- Interface
Management stringProfile - Interface management profile
- Ips
List<Loopback
Interface Ip> - Loopback IP Parent
- Ipv6
Loopback
Interface Ipv6 - Loopback IPv6 Configuration
- Mtu int
- MTU
- Name string
- Loopback Interface name
- Snippet string
- The snippet in which the resource is defined
- Tfid string
- Comment string
- Description
- Default
Value string - Default interface assignment
- Device string
- The device in which the resource is defined
- Folder string
- The folder in which the resource is defined
- Interface
Management stringProfile - Interface management profile
- Ips
[]Loopback
Interface Ip Args - Loopback IP Parent
- Ipv6
Loopback
Interface Ipv6Args - Loopback IPv6 Configuration
- Mtu int
- MTU
- Name string
- Loopback Interface name
- Snippet string
- The snippet in which the resource is defined
- Tfid string
- comment String
- Description
- default
Value String - Default interface assignment
- device String
- The device in which the resource is defined
- folder String
- The folder in which the resource is defined
- interface
Management StringProfile - Interface management profile
- ips
List<Loopback
Interface Ip> - Loopback IP Parent
- ipv6
Loopback
Interface Ipv6 - Loopback IPv6 Configuration
- mtu Integer
- MTU
- name String
- Loopback Interface name
- snippet String
- The snippet in which the resource is defined
- tfid String
- comment string
- Description
- default
Value string - Default interface assignment
- device string
- The device in which the resource is defined
- folder string
- The folder in which the resource is defined
- interface
Management stringProfile - Interface management profile
- ips
Loopback
Interface Ip[] - Loopback IP Parent
- ipv6
Loopback
Interface Ipv6 - Loopback IPv6 Configuration
- mtu number
- MTU
- name string
- Loopback Interface name
- snippet string
- The snippet in which the resource is defined
- tfid string
- comment str
- Description
- default_
value str - Default interface assignment
- device str
- The device in which the resource is defined
- folder str
- The folder in which the resource is defined
- interface_
management_ strprofile - Interface management profile
- ips
Sequence[Loopback
Interface Ip Args] - Loopback IP Parent
- ipv6
Loopback
Interface Ipv6Args - Loopback IPv6 Configuration
- mtu int
- MTU
- name str
- Loopback Interface name
- snippet str
- The snippet in which the resource is defined
- tfid str
- comment String
- Description
- default
Value String - Default interface assignment
- device String
- The device in which the resource is defined
- folder String
- The folder in which the resource is defined
- interface
Management StringProfile - Interface management profile
- ips List<Property Map>
- Loopback IP Parent
- ipv6 Property Map
- Loopback IPv6 Configuration
- mtu Number
- MTU
- name String
- Loopback Interface name
- snippet String
- The snippet in which the resource is defined
- tfid String
Supporting Types
LoopbackInterfaceIp, LoopbackInterfaceIpArgs
- Name string
- Loopback IP address(es)
- Name string
- Loopback IP address(es)
- name String
- Loopback IP address(es)
- name string
- Loopback IP address(es)
- name str
- Loopback IP address(es)
- name String
- Loopback IP address(es)
LoopbackInterfaceIpv6, LoopbackInterfaceIpv6Args
- Addresses
List<Loopback
Interface Ipv6Address> - IPv6 Address Parent
- Enabled bool
- Enable IPv6
- Addresses
[]Loopback
Interface Ipv6Address - IPv6 Address Parent
- Enabled bool
- Enable IPv6
- addresses
List<Loopback
Interface Ipv6Address> - IPv6 Address Parent
- enabled Boolean
- Enable IPv6
- addresses
Loopback
Interface Ipv6Address[] - IPv6 Address Parent
- enabled boolean
- Enable IPv6
- addresses
Sequence[Loopback
Interface Ipv6Address] - IPv6 Address Parent
- enabled bool
- Enable IPv6
- addresses List<Property Map>
- IPv6 Address Parent
- enabled Boolean
- Enable IPv6
LoopbackInterfaceIpv6Address, LoopbackInterfaceIpv6AddressArgs
- Enable
On boolInterface - Enable Address on Interface
- Interface
Id string - Interface ID
- Name string
- IPv6 Address
- Enable
On boolInterface - Enable Address on Interface
- Interface
Id string - Interface ID
- Name string
- IPv6 Address
- enable
On BooleanInterface - Enable Address on Interface
- interface
Id String - Interface ID
- name String
- IPv6 Address
- enable
On booleanInterface - Enable Address on Interface
- interface
Id string - Interface ID
- name string
- IPv6 Address
- enable_
on_ boolinterface - Enable Address on Interface
- interface_
id str - Interface ID
- name str
- IPv6 Address
- enable
On BooleanInterface - Enable Address on Interface
- interface
Id String - Interface ID
- name String
- IPv6 Address
Package Details
- Repository
- scm pulumi/pulumi-scm
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scmTerraform Provider.
