Address resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scm from "@pulumi/scm";
// This file is embedded using go:embed
const scmAddrTag1 = new scm.Tag("scm_addr_tag_1", {
folder: "All",
name: "scm_addr_tag_1",
color: "Red",
});
const scmAddrTag2 = new scm.Tag("scm_addr_tag_2", {
folder: "All",
name: "scm_addr_tag_2",
color: "Blue",
});
const scmAddrTag3 = new scm.Tag("scm_addr_tag_3", {
folder: "All",
name: "scm_addr_tag_3",
color: "Orange",
});
// IP Netmask
const scmAddress1 = new scm.Address("scm_address_1", {
folder: "Shared",
name: "scm_address_1",
description: "Made by Pulumi",
ipNetmask: "10.2.3.4",
});
// IP Range
const scmAddress2 = new scm.Address("scm_address_2", {
folder: "Shared",
name: "scm_address_2",
description: "Small IP range test",
ipRange: "192.168.1.10-192.168.1.20",
});
// FQDN
const scmAddress3 = new scm.Address("scm_address_3", {
folder: "Shared",
name: "scm_address_3",
description: "Simple FQDN test",
fqdn: "example.com",
});
// Class C wildcard
const scmAddress4 = new scm.Address("scm_address_4", {
folder: "Shared",
name: "scm_address_4",
description: "Class C wildcard test",
ipWildcard: "192.168.1.0/0.0.0.255",
});
// Multiple tags
const scmAddress5 = new scm.Address("scm_address_5", {
folder: "Shared",
name: "scm_address_5",
description: "Multiple tags test",
ipNetmask: "10.10.10.2/32",
tags: [
scmAddrTag1.name,
scmAddrTag2.name,
scmAddrTag3.name,
],
}, {
dependsOn: [
scmAddrTag1,
scmAddrTag2,
scmAddrTag3,
],
});
import pulumi
import pulumi_scm as scm
# This file is embedded using go:embed
scm_addr_tag1 = scm.Tag("scm_addr_tag_1",
folder="All",
name="scm_addr_tag_1",
color="Red")
scm_addr_tag2 = scm.Tag("scm_addr_tag_2",
folder="All",
name="scm_addr_tag_2",
color="Blue")
scm_addr_tag3 = scm.Tag("scm_addr_tag_3",
folder="All",
name="scm_addr_tag_3",
color="Orange")
# IP Netmask
scm_address1 = scm.Address("scm_address_1",
folder="Shared",
name="scm_address_1",
description="Made by Pulumi",
ip_netmask="10.2.3.4")
# IP Range
scm_address2 = scm.Address("scm_address_2",
folder="Shared",
name="scm_address_2",
description="Small IP range test",
ip_range="192.168.1.10-192.168.1.20")
# FQDN
scm_address3 = scm.Address("scm_address_3",
folder="Shared",
name="scm_address_3",
description="Simple FQDN test",
fqdn="example.com")
# Class C wildcard
scm_address4 = scm.Address("scm_address_4",
folder="Shared",
name="scm_address_4",
description="Class C wildcard test",
ip_wildcard="192.168.1.0/0.0.0.255")
# Multiple tags
scm_address5 = scm.Address("scm_address_5",
folder="Shared",
name="scm_address_5",
description="Multiple tags test",
ip_netmask="10.10.10.2/32",
tags=[
scm_addr_tag1.name,
scm_addr_tag2.name,
scm_addr_tag3.name,
],
opts = pulumi.ResourceOptions(depends_on=[
scm_addr_tag1,
scm_addr_tag2,
scm_addr_tag3,
]))
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 {
// This file is embedded using go:embed
scmAddrTag1, err := scm.NewTag(ctx, "scm_addr_tag_1", &scm.TagArgs{
Folder: pulumi.String("All"),
Name: pulumi.String("scm_addr_tag_1"),
Color: pulumi.String("Red"),
})
if err != nil {
return err
}
scmAddrTag2, err := scm.NewTag(ctx, "scm_addr_tag_2", &scm.TagArgs{
Folder: pulumi.String("All"),
Name: pulumi.String("scm_addr_tag_2"),
Color: pulumi.String("Blue"),
})
if err != nil {
return err
}
scmAddrTag3, err := scm.NewTag(ctx, "scm_addr_tag_3", &scm.TagArgs{
Folder: pulumi.String("All"),
Name: pulumi.String("scm_addr_tag_3"),
Color: pulumi.String("Orange"),
})
if err != nil {
return err
}
// IP Netmask
_, err = scm.NewAddress(ctx, "scm_address_1", &scm.AddressArgs{
Folder: pulumi.String("Shared"),
Name: pulumi.String("scm_address_1"),
Description: pulumi.String("Made by Pulumi"),
IpNetmask: pulumi.String("10.2.3.4"),
})
if err != nil {
return err
}
// IP Range
_, err = scm.NewAddress(ctx, "scm_address_2", &scm.AddressArgs{
Folder: pulumi.String("Shared"),
Name: pulumi.String("scm_address_2"),
Description: pulumi.String("Small IP range test"),
IpRange: pulumi.String("192.168.1.10-192.168.1.20"),
})
if err != nil {
return err
}
// FQDN
_, err = scm.NewAddress(ctx, "scm_address_3", &scm.AddressArgs{
Folder: pulumi.String("Shared"),
Name: pulumi.String("scm_address_3"),
Description: pulumi.String("Simple FQDN test"),
Fqdn: pulumi.String("example.com"),
})
if err != nil {
return err
}
// Class C wildcard
_, err = scm.NewAddress(ctx, "scm_address_4", &scm.AddressArgs{
Folder: pulumi.String("Shared"),
Name: pulumi.String("scm_address_4"),
Description: pulumi.String("Class C wildcard test"),
IpWildcard: pulumi.String("192.168.1.0/0.0.0.255"),
})
if err != nil {
return err
}
// Multiple tags
_, err = scm.NewAddress(ctx, "scm_address_5", &scm.AddressArgs{
Folder: pulumi.String("Shared"),
Name: pulumi.String("scm_address_5"),
Description: pulumi.String("Multiple tags test"),
IpNetmask: pulumi.String("10.10.10.2/32"),
Tags: pulumi.StringArray{
scmAddrTag1.Name,
scmAddrTag2.Name,
scmAddrTag3.Name,
},
}, pulumi.DependsOn([]pulumi.Resource{
scmAddrTag1,
scmAddrTag2,
scmAddrTag3,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scm = Pulumi.Scm;
return await Deployment.RunAsync(() =>
{
// This file is embedded using go:embed
var scmAddrTag1 = new Scm.Tag("scm_addr_tag_1", new()
{
Folder = "All",
Name = "scm_addr_tag_1",
Color = "Red",
});
var scmAddrTag2 = new Scm.Tag("scm_addr_tag_2", new()
{
Folder = "All",
Name = "scm_addr_tag_2",
Color = "Blue",
});
var scmAddrTag3 = new Scm.Tag("scm_addr_tag_3", new()
{
Folder = "All",
Name = "scm_addr_tag_3",
Color = "Orange",
});
// IP Netmask
var scmAddress1 = new Scm.Address("scm_address_1", new()
{
Folder = "Shared",
Name = "scm_address_1",
Description = "Made by Pulumi",
IpNetmask = "10.2.3.4",
});
// IP Range
var scmAddress2 = new Scm.Address("scm_address_2", new()
{
Folder = "Shared",
Name = "scm_address_2",
Description = "Small IP range test",
IpRange = "192.168.1.10-192.168.1.20",
});
// FQDN
var scmAddress3 = new Scm.Address("scm_address_3", new()
{
Folder = "Shared",
Name = "scm_address_3",
Description = "Simple FQDN test",
Fqdn = "example.com",
});
// Class C wildcard
var scmAddress4 = new Scm.Address("scm_address_4", new()
{
Folder = "Shared",
Name = "scm_address_4",
Description = "Class C wildcard test",
IpWildcard = "192.168.1.0/0.0.0.255",
});
// Multiple tags
var scmAddress5 = new Scm.Address("scm_address_5", new()
{
Folder = "Shared",
Name = "scm_address_5",
Description = "Multiple tags test",
IpNetmask = "10.10.10.2/32",
Tags = new[]
{
scmAddrTag1.Name,
scmAddrTag2.Name,
scmAddrTag3.Name,
},
}, new CustomResourceOptions
{
DependsOn =
{
scmAddrTag1,
scmAddrTag2,
scmAddrTag3,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scm.Tag;
import com.pulumi.scm.TagArgs;
import com.pulumi.scm.Address;
import com.pulumi.scm.AddressArgs;
import com.pulumi.resources.CustomResourceOptions;
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) {
// This file is embedded using go:embed
var scmAddrTag1 = new Tag("scmAddrTag1", TagArgs.builder()
.folder("All")
.name("scm_addr_tag_1")
.color("Red")
.build());
var scmAddrTag2 = new Tag("scmAddrTag2", TagArgs.builder()
.folder("All")
.name("scm_addr_tag_2")
.color("Blue")
.build());
var scmAddrTag3 = new Tag("scmAddrTag3", TagArgs.builder()
.folder("All")
.name("scm_addr_tag_3")
.color("Orange")
.build());
// IP Netmask
var scmAddress1 = new Address("scmAddress1", AddressArgs.builder()
.folder("Shared")
.name("scm_address_1")
.description("Made by Pulumi")
.ipNetmask("10.2.3.4")
.build());
// IP Range
var scmAddress2 = new Address("scmAddress2", AddressArgs.builder()
.folder("Shared")
.name("scm_address_2")
.description("Small IP range test")
.ipRange("192.168.1.10-192.168.1.20")
.build());
// FQDN
var scmAddress3 = new Address("scmAddress3", AddressArgs.builder()
.folder("Shared")
.name("scm_address_3")
.description("Simple FQDN test")
.fqdn("example.com")
.build());
// Class C wildcard
var scmAddress4 = new Address("scmAddress4", AddressArgs.builder()
.folder("Shared")
.name("scm_address_4")
.description("Class C wildcard test")
.ipWildcard("192.168.1.0/0.0.0.255")
.build());
// Multiple tags
var scmAddress5 = new Address("scmAddress5", AddressArgs.builder()
.folder("Shared")
.name("scm_address_5")
.description("Multiple tags test")
.ipNetmask("10.10.10.2/32")
.tags(
scmAddrTag1.name(),
scmAddrTag2.name(),
scmAddrTag3.name())
.build(), CustomResourceOptions.builder()
.dependsOn(
scmAddrTag1,
scmAddrTag2,
scmAddrTag3)
.build());
}
}
resources:
# This file is embedded using go:embed
scmAddrTag1:
type: scm:Tag
name: scm_addr_tag_1
properties:
folder: All
name: scm_addr_tag_1
color: Red
scmAddrTag2:
type: scm:Tag
name: scm_addr_tag_2
properties:
folder: All
name: scm_addr_tag_2
color: Blue
scmAddrTag3:
type: scm:Tag
name: scm_addr_tag_3
properties:
folder: All
name: scm_addr_tag_3
color: Orange
# IP Netmask
scmAddress1:
type: scm:Address
name: scm_address_1
properties:
folder: Shared
name: scm_address_1
description: Made by Pulumi
ipNetmask: 10.2.3.4
# IP Range
scmAddress2:
type: scm:Address
name: scm_address_2
properties:
folder: Shared
name: scm_address_2
description: Small IP range test
ipRange: 192.168.1.10-192.168.1.20
# FQDN
scmAddress3:
type: scm:Address
name: scm_address_3
properties:
folder: Shared
name: scm_address_3
description: Simple FQDN test
fqdn: example.com
# Class C wildcard
scmAddress4:
type: scm:Address
name: scm_address_4
properties:
folder: Shared
name: scm_address_4
description: Class C wildcard test
ipWildcard: 192.168.1.0/0.0.0.255
# Multiple tags
scmAddress5:
type: scm:Address
name: scm_address_5
properties:
folder: Shared
name: scm_address_5
description: Multiple tags test
ipNetmask: 10.10.10.2/32
tags:
- ${scmAddrTag1.name}
- ${scmAddrTag2.name}
- ${scmAddrTag3.name}
options:
dependsOn:
- ${scmAddrTag1}
- ${scmAddrTag2}
- ${scmAddrTag3}
Create Address Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Address(name: string, args?: AddressArgs, opts?: CustomResourceOptions);@overload
def Address(resource_name: str,
args: Optional[AddressArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Address(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
device: Optional[str] = None,
folder: Optional[str] = None,
fqdn: Optional[str] = None,
ip_netmask: Optional[str] = None,
ip_range: Optional[str] = None,
ip_wildcard: Optional[str] = None,
name: Optional[str] = None,
snippet: Optional[str] = None,
tags: Optional[Sequence[str]] = None)func NewAddress(ctx *Context, name string, args *AddressArgs, opts ...ResourceOption) (*Address, error)public Address(string name, AddressArgs? args = null, CustomResourceOptions? opts = null)
public Address(String name, AddressArgs args)
public Address(String name, AddressArgs args, CustomResourceOptions options)
type: scm:Address
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 AddressArgs
- 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 AddressArgs
- 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 AddressArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AddressArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AddressArgs
- 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 addressResource = new Scm.Address("addressResource", new()
{
Description = "string",
Device = "string",
Folder = "string",
Fqdn = "string",
IpNetmask = "string",
IpRange = "string",
IpWildcard = "string",
Name = "string",
Snippet = "string",
Tags = new[]
{
"string",
},
});
example, err := scm.NewAddress(ctx, "addressResource", &scm.AddressArgs{
Description: pulumi.String("string"),
Device: pulumi.String("string"),
Folder: pulumi.String("string"),
Fqdn: pulumi.String("string"),
IpNetmask: pulumi.String("string"),
IpRange: pulumi.String("string"),
IpWildcard: pulumi.String("string"),
Name: pulumi.String("string"),
Snippet: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var addressResource = new Address("addressResource", AddressArgs.builder()
.description("string")
.device("string")
.folder("string")
.fqdn("string")
.ipNetmask("string")
.ipRange("string")
.ipWildcard("string")
.name("string")
.snippet("string")
.tags("string")
.build());
address_resource = scm.Address("addressResource",
description="string",
device="string",
folder="string",
fqdn="string",
ip_netmask="string",
ip_range="string",
ip_wildcard="string",
name="string",
snippet="string",
tags=["string"])
const addressResource = new scm.Address("addressResource", {
description: "string",
device: "string",
folder: "string",
fqdn: "string",
ipNetmask: "string",
ipRange: "string",
ipWildcard: "string",
name: "string",
snippet: "string",
tags: ["string"],
});
type: scm:Address
properties:
description: string
device: string
folder: string
fqdn: string
ipNetmask: string
ipRange: string
ipWildcard: string
name: string
snippet: string
tags:
- string
Address 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 Address resource accepts the following input properties:
- Description string
- The description of the address object
- Device string
- The device in which the resource is defined
- Folder string
- The folder in which the resource is defined
- Fqdn string
- Fully qualified domain name
- Ip
Netmask string - IP address with or without CIDR notation
- Ip
Range string - Ip range
- Ip
Wildcard string - IP wildcard mask
- Name string
- The name of the address object
- Snippet string
- The snippet in which the resource is defined
- List<string>
- Tags assocaited with the address object
- Description string
- The description of the address object
- Device string
- The device in which the resource is defined
- Folder string
- The folder in which the resource is defined
- Fqdn string
- Fully qualified domain name
- Ip
Netmask string - IP address with or without CIDR notation
- Ip
Range string - Ip range
- Ip
Wildcard string - IP wildcard mask
- Name string
- The name of the address object
- Snippet string
- The snippet in which the resource is defined
- []string
- Tags assocaited with the address object
- description String
- The description of the address object
- device String
- The device in which the resource is defined
- folder String
- The folder in which the resource is defined
- fqdn String
- Fully qualified domain name
- ip
Netmask String - IP address with or without CIDR notation
- ip
Range String - Ip range
- ip
Wildcard String - IP wildcard mask
- name String
- The name of the address object
- snippet String
- The snippet in which the resource is defined
- List<String>
- Tags assocaited with the address object
- description string
- The description of the address object
- device string
- The device in which the resource is defined
- folder string
- The folder in which the resource is defined
- fqdn string
- Fully qualified domain name
- ip
Netmask string - IP address with or without CIDR notation
- ip
Range string - Ip range
- ip
Wildcard string - IP wildcard mask
- name string
- The name of the address object
- snippet string
- The snippet in which the resource is defined
- string[]
- Tags assocaited with the address object
- description str
- The description of the address object
- device str
- The device in which the resource is defined
- folder str
- The folder in which the resource is defined
- fqdn str
- Fully qualified domain name
- ip_
netmask str - IP address with or without CIDR notation
- ip_
range str - Ip range
- ip_
wildcard str - IP wildcard mask
- name str
- The name of the address object
- snippet str
- The snippet in which the resource is defined
- Sequence[str]
- Tags assocaited with the address object
- description String
- The description of the address object
- device String
- The device in which the resource is defined
- folder String
- The folder in which the resource is defined
- fqdn String
- Fully qualified domain name
- ip
Netmask String - IP address with or without CIDR notation
- ip
Range String - Ip range
- ip
Wildcard String - IP wildcard mask
- name String
- The name of the address object
- snippet String
- The snippet in which the resource is defined
- List<String>
- Tags assocaited with the address object
Outputs
All input properties are implicitly available as output properties. Additionally, the Address resource produces the following output properties:
Look up Existing Address Resource
Get an existing Address 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?: AddressState, opts?: CustomResourceOptions): Address@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
device: Optional[str] = None,
folder: Optional[str] = None,
fqdn: Optional[str] = None,
ip_netmask: Optional[str] = None,
ip_range: Optional[str] = None,
ip_wildcard: Optional[str] = None,
name: Optional[str] = None,
snippet: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
tfid: Optional[str] = None) -> Addressfunc GetAddress(ctx *Context, name string, id IDInput, state *AddressState, opts ...ResourceOption) (*Address, error)public static Address Get(string name, Input<string> id, AddressState? state, CustomResourceOptions? opts = null)public static Address get(String name, Output<String> id, AddressState state, CustomResourceOptions options)resources: _: type: scm:Address 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.
- Description string
- The description of the address object
- Device string
- The device in which the resource is defined
- Folder string
- The folder in which the resource is defined
- Fqdn string
- Fully qualified domain name
- Ip
Netmask string - IP address with or without CIDR notation
- Ip
Range string - Ip range
- Ip
Wildcard string - IP wildcard mask
- Name string
- The name of the address object
- Snippet string
- The snippet in which the resource is defined
- List<string>
- Tags assocaited with the address object
- Tfid string
- Description string
- The description of the address object
- Device string
- The device in which the resource is defined
- Folder string
- The folder in which the resource is defined
- Fqdn string
- Fully qualified domain name
- Ip
Netmask string - IP address with or without CIDR notation
- Ip
Range string - Ip range
- Ip
Wildcard string - IP wildcard mask
- Name string
- The name of the address object
- Snippet string
- The snippet in which the resource is defined
- []string
- Tags assocaited with the address object
- Tfid string
- description String
- The description of the address object
- device String
- The device in which the resource is defined
- folder String
- The folder in which the resource is defined
- fqdn String
- Fully qualified domain name
- ip
Netmask String - IP address with or without CIDR notation
- ip
Range String - Ip range
- ip
Wildcard String - IP wildcard mask
- name String
- The name of the address object
- snippet String
- The snippet in which the resource is defined
- List<String>
- Tags assocaited with the address object
- tfid String
- description string
- The description of the address object
- device string
- The device in which the resource is defined
- folder string
- The folder in which the resource is defined
- fqdn string
- Fully qualified domain name
- ip
Netmask string - IP address with or without CIDR notation
- ip
Range string - Ip range
- ip
Wildcard string - IP wildcard mask
- name string
- The name of the address object
- snippet string
- The snippet in which the resource is defined
- string[]
- Tags assocaited with the address object
- tfid string
- description str
- The description of the address object
- device str
- The device in which the resource is defined
- folder str
- The folder in which the resource is defined
- fqdn str
- Fully qualified domain name
- ip_
netmask str - IP address with or without CIDR notation
- ip_
range str - Ip range
- ip_
wildcard str - IP wildcard mask
- name str
- The name of the address object
- snippet str
- The snippet in which the resource is defined
- Sequence[str]
- Tags assocaited with the address object
- tfid str
- description String
- The description of the address object
- device String
- The device in which the resource is defined
- folder String
- The folder in which the resource is defined
- fqdn String
- Fully qualified domain name
- ip
Netmask String - IP address with or without CIDR notation
- ip
Range String - Ip range
- ip
Wildcard String - IP wildcard mask
- name String
- The name of the address object
- snippet String
- The snippet in which the resource is defined
- List<String>
- Tags assocaited with the address object
- tfid String
Package Details
- Repository
- scm pulumi/pulumi-scm
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scmTerraform Provider.
