Provides an EC2 Secondary Subnet resource.
A secondary subnet is a subnet within a secondary network that provides high-performance networking capabilities for specialized workloads such as RDMA (Remote Direct Memory Access) applications.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2.SecondaryNetwork("example", {
ipv4CidrBlock: "10.0.0.0/16",
networkType: "rdma",
tags: {
Name: "example-secondary-network",
},
});
const exampleSecondarySubnet = new aws.ec2.SecondarySubnet("example", {
secondaryNetworkId: example.id,
ipv4CidrBlock: "10.0.1.0/24",
availabilityZone: "us-west-2a",
tags: {
Name: "example-secondary-subnet",
},
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.SecondaryNetwork("example",
ipv4_cidr_block="10.0.0.0/16",
network_type="rdma",
tags={
"Name": "example-secondary-network",
})
example_secondary_subnet = aws.ec2.SecondarySubnet("example",
secondary_network_id=example.id,
ipv4_cidr_block="10.0.1.0/24",
availability_zone="us-west-2a",
tags={
"Name": "example-secondary-subnet",
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ec2.NewSecondaryNetwork(ctx, "example", &ec2.SecondaryNetworkArgs{
Ipv4CidrBlock: pulumi.String("10.0.0.0/16"),
NetworkType: pulumi.String("rdma"),
Tags: pulumi.StringMap{
"Name": pulumi.String("example-secondary-network"),
},
})
if err != nil {
return err
}
_, err = ec2.NewSecondarySubnet(ctx, "example", &ec2.SecondarySubnetArgs{
SecondaryNetworkId: example.ID(),
Ipv4CidrBlock: pulumi.String("10.0.1.0/24"),
AvailabilityZone: pulumi.String("us-west-2a"),
Tags: pulumi.StringMap{
"Name": pulumi.String("example-secondary-subnet"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ec2.SecondaryNetwork("example", new()
{
Ipv4CidrBlock = "10.0.0.0/16",
NetworkType = "rdma",
Tags =
{
{ "Name", "example-secondary-network" },
},
});
var exampleSecondarySubnet = new Aws.Ec2.SecondarySubnet("example", new()
{
SecondaryNetworkId = example.Id,
Ipv4CidrBlock = "10.0.1.0/24",
AvailabilityZone = "us-west-2a",
Tags =
{
{ "Name", "example-secondary-subnet" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.SecondaryNetwork;
import com.pulumi.aws.ec2.SecondaryNetworkArgs;
import com.pulumi.aws.ec2.SecondarySubnet;
import com.pulumi.aws.ec2.SecondarySubnetArgs;
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 example = new SecondaryNetwork("example", SecondaryNetworkArgs.builder()
.ipv4CidrBlock("10.0.0.0/16")
.networkType("rdma")
.tags(Map.of("Name", "example-secondary-network"))
.build());
var exampleSecondarySubnet = new SecondarySubnet("exampleSecondarySubnet", SecondarySubnetArgs.builder()
.secondaryNetworkId(example.id())
.ipv4CidrBlock("10.0.1.0/24")
.availabilityZone("us-west-2a")
.tags(Map.of("Name", "example-secondary-subnet"))
.build());
}
}
resources:
example:
type: aws:ec2:SecondaryNetwork
properties:
ipv4CidrBlock: 10.0.0.0/16
networkType: rdma
tags:
Name: example-secondary-network
exampleSecondarySubnet:
type: aws:ec2:SecondarySubnet
name: example
properties:
secondaryNetworkId: ${example.id}
ipv4CidrBlock: 10.0.1.0/24
availabilityZone: us-west-2a
tags:
Name: example-secondary-subnet
Using Availability Zone ID
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const available = aws.getAvailabilityZones({
state: "available",
filters: [{
name: "opt-in-status",
values: ["opt-in-not-required"],
}],
});
const example = new aws.ec2.SecondaryNetwork("example", {
ipv4CidrBlock: "10.0.0.0/16",
networkType: "rdma",
tags: {
Name: "example-secondary-network",
},
});
const exampleSecondarySubnet = new aws.ec2.SecondarySubnet("example", {
secondaryNetworkId: example.id,
ipv4CidrBlock: "10.0.1.0/24",
availabilityZoneId: available.then(available => available.zoneIds?.[0]),
tags: {
Name: "example-secondary-subnet",
},
});
import pulumi
import pulumi_aws as aws
available = aws.get_availability_zones(state="available",
filters=[{
"name": "opt-in-status",
"values": ["opt-in-not-required"],
}])
example = aws.ec2.SecondaryNetwork("example",
ipv4_cidr_block="10.0.0.0/16",
network_type="rdma",
tags={
"Name": "example-secondary-network",
})
example_secondary_subnet = aws.ec2.SecondarySubnet("example",
secondary_network_id=example.id,
ipv4_cidr_block="10.0.1.0/24",
availability_zone_id=available.zone_ids[0],
tags={
"Name": "example-secondary-subnet",
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
available, err := aws.GetAvailabilityZones(ctx, &aws.GetAvailabilityZonesArgs{
State: pulumi.StringRef("available"),
Filters: []aws.GetAvailabilityZonesFilter{
{
Name: "opt-in-status",
Values: []string{
"opt-in-not-required",
},
},
},
}, nil)
if err != nil {
return err
}
example, err := ec2.NewSecondaryNetwork(ctx, "example", &ec2.SecondaryNetworkArgs{
Ipv4CidrBlock: pulumi.String("10.0.0.0/16"),
NetworkType: pulumi.String("rdma"),
Tags: pulumi.StringMap{
"Name": pulumi.String("example-secondary-network"),
},
})
if err != nil {
return err
}
_, err = ec2.NewSecondarySubnet(ctx, "example", &ec2.SecondarySubnetArgs{
SecondaryNetworkId: example.ID(),
Ipv4CidrBlock: pulumi.String("10.0.1.0/24"),
AvailabilityZoneId: pulumi.String(available.ZoneIds[0]),
Tags: pulumi.StringMap{
"Name": pulumi.String("example-secondary-subnet"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var available = Aws.GetAvailabilityZones.Invoke(new()
{
State = "available",
Filters = new[]
{
new Aws.Inputs.GetAvailabilityZonesFilterInputArgs
{
Name = "opt-in-status",
Values = new[]
{
"opt-in-not-required",
},
},
},
});
var example = new Aws.Ec2.SecondaryNetwork("example", new()
{
Ipv4CidrBlock = "10.0.0.0/16",
NetworkType = "rdma",
Tags =
{
{ "Name", "example-secondary-network" },
},
});
var exampleSecondarySubnet = new Aws.Ec2.SecondarySubnet("example", new()
{
SecondaryNetworkId = example.Id,
Ipv4CidrBlock = "10.0.1.0/24",
AvailabilityZoneId = available.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.ZoneIds[0]),
Tags =
{
{ "Name", "example-secondary-subnet" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
import com.pulumi.aws.ec2.SecondaryNetwork;
import com.pulumi.aws.ec2.SecondaryNetworkArgs;
import com.pulumi.aws.ec2.SecondarySubnet;
import com.pulumi.aws.ec2.SecondarySubnetArgs;
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) {
final var available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
.state("available")
.filters(GetAvailabilityZonesFilterArgs.builder()
.name("opt-in-status")
.values("opt-in-not-required")
.build())
.build());
var example = new SecondaryNetwork("example", SecondaryNetworkArgs.builder()
.ipv4CidrBlock("10.0.0.0/16")
.networkType("rdma")
.tags(Map.of("Name", "example-secondary-network"))
.build());
var exampleSecondarySubnet = new SecondarySubnet("exampleSecondarySubnet", SecondarySubnetArgs.builder()
.secondaryNetworkId(example.id())
.ipv4CidrBlock("10.0.1.0/24")
.availabilityZoneId(available.zoneIds()[0])
.tags(Map.of("Name", "example-secondary-subnet"))
.build());
}
}
resources:
example:
type: aws:ec2:SecondaryNetwork
properties:
ipv4CidrBlock: 10.0.0.0/16
networkType: rdma
tags:
Name: example-secondary-network
exampleSecondarySubnet:
type: aws:ec2:SecondarySubnet
name: example
properties:
secondaryNetworkId: ${example.id}
ipv4CidrBlock: 10.0.1.0/24
availabilityZoneId: ${available.zoneIds[0]}
tags:
Name: example-secondary-subnet
variables:
available:
fn::invoke:
function: aws:getAvailabilityZones
arguments:
state: available
filters:
- name: opt-in-status
values:
- opt-in-not-required
Create SecondarySubnet Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecondarySubnet(name: string, args: SecondarySubnetArgs, opts?: CustomResourceOptions);@overload
def SecondarySubnet(resource_name: str,
args: SecondarySubnetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecondarySubnet(resource_name: str,
opts: Optional[ResourceOptions] = None,
ipv4_cidr_block: Optional[str] = None,
secondary_network_id: Optional[str] = None,
availability_zone: Optional[str] = None,
availability_zone_id: Optional[str] = None,
region: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[SecondarySubnetTimeoutsArgs] = None)func NewSecondarySubnet(ctx *Context, name string, args SecondarySubnetArgs, opts ...ResourceOption) (*SecondarySubnet, error)public SecondarySubnet(string name, SecondarySubnetArgs args, CustomResourceOptions? opts = null)
public SecondarySubnet(String name, SecondarySubnetArgs args)
public SecondarySubnet(String name, SecondarySubnetArgs args, CustomResourceOptions options)
type: aws:ec2:SecondarySubnet
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 SecondarySubnetArgs
- 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 SecondarySubnetArgs
- 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 SecondarySubnetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecondarySubnetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecondarySubnetArgs
- 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 secondarySubnetResource = new Aws.Ec2.SecondarySubnet("secondarySubnetResource", new()
{
Ipv4CidrBlock = "string",
SecondaryNetworkId = "string",
AvailabilityZone = "string",
AvailabilityZoneId = "string",
Region = "string",
Tags =
{
{ "string", "string" },
},
Timeouts = new Aws.Ec2.Inputs.SecondarySubnetTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := ec2.NewSecondarySubnet(ctx, "secondarySubnetResource", &ec2.SecondarySubnetArgs{
Ipv4CidrBlock: pulumi.String("string"),
SecondaryNetworkId: pulumi.String("string"),
AvailabilityZone: pulumi.String("string"),
AvailabilityZoneId: pulumi.String("string"),
Region: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Timeouts: &ec2.SecondarySubnetTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var secondarySubnetResource = new SecondarySubnet("secondarySubnetResource", SecondarySubnetArgs.builder()
.ipv4CidrBlock("string")
.secondaryNetworkId("string")
.availabilityZone("string")
.availabilityZoneId("string")
.region("string")
.tags(Map.of("string", "string"))
.timeouts(SecondarySubnetTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
secondary_subnet_resource = aws.ec2.SecondarySubnet("secondarySubnetResource",
ipv4_cidr_block="string",
secondary_network_id="string",
availability_zone="string",
availability_zone_id="string",
region="string",
tags={
"string": "string",
},
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const secondarySubnetResource = new aws.ec2.SecondarySubnet("secondarySubnetResource", {
ipv4CidrBlock: "string",
secondaryNetworkId: "string",
availabilityZone: "string",
availabilityZoneId: "string",
region: "string",
tags: {
string: "string",
},
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: aws:ec2:SecondarySubnet
properties:
availabilityZone: string
availabilityZoneId: string
ipv4CidrBlock: string
region: string
secondaryNetworkId: string
tags:
string: string
timeouts:
create: string
delete: string
update: string
SecondarySubnet 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 SecondarySubnet resource accepts the following input properties:
- Ipv4Cidr
Block string - IPv4 CIDR block for the secondary subnet. The CIDR block size must be between
/12and/28. - Secondary
Network stringId - ID of the secondary network in which to create the secondary subnet.
- Availability
Zone string - Availability Zone for the secondary subnet. Cannot be specified with
availability_zone_id. - Availability
Zone stringId - ID of the Availability Zone for the secondary subnet. This option is preferred over
availability_zoneas it provides a consistent identifier across AWS accounts. Cannot be specified withavailability_zone. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Timeouts
Secondary
Subnet Timeouts
- Ipv4Cidr
Block string - IPv4 CIDR block for the secondary subnet. The CIDR block size must be between
/12and/28. - Secondary
Network stringId - ID of the secondary network in which to create the secondary subnet.
- Availability
Zone string - Availability Zone for the secondary subnet. Cannot be specified with
availability_zone_id. - Availability
Zone stringId - ID of the Availability Zone for the secondary subnet. This option is preferred over
availability_zoneas it provides a consistent identifier across AWS accounts. Cannot be specified withavailability_zone. - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Timeouts
Secondary
Subnet Timeouts Args
- ipv4Cidr
Block String - IPv4 CIDR block for the secondary subnet. The CIDR block size must be between
/12and/28. - secondary
Network StringId - ID of the secondary network in which to create the secondary subnet.
- availability
Zone String - Availability Zone for the secondary subnet. Cannot be specified with
availability_zone_id. - availability
Zone StringId - ID of the Availability Zone for the secondary subnet. This option is preferred over
availability_zoneas it provides a consistent identifier across AWS accounts. Cannot be specified withavailability_zone. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - timeouts
Secondary
Subnet Timeouts
- ipv4Cidr
Block string - IPv4 CIDR block for the secondary subnet. The CIDR block size must be between
/12and/28. - secondary
Network stringId - ID of the secondary network in which to create the secondary subnet.
- availability
Zone string - Availability Zone for the secondary subnet. Cannot be specified with
availability_zone_id. - availability
Zone stringId - ID of the Availability Zone for the secondary subnet. This option is preferred over
availability_zoneas it provides a consistent identifier across AWS accounts. Cannot be specified withavailability_zone. - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - timeouts
Secondary
Subnet Timeouts
- ipv4_
cidr_ strblock - IPv4 CIDR block for the secondary subnet. The CIDR block size must be between
/12and/28. - secondary_
network_ strid - ID of the secondary network in which to create the secondary subnet.
- availability_
zone str - Availability Zone for the secondary subnet. Cannot be specified with
availability_zone_id. - availability_
zone_ strid - ID of the Availability Zone for the secondary subnet. This option is preferred over
availability_zoneas it provides a consistent identifier across AWS accounts. Cannot be specified withavailability_zone. - region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - timeouts
Secondary
Subnet Timeouts Args
- ipv4Cidr
Block String - IPv4 CIDR block for the secondary subnet. The CIDR block size must be between
/12and/28. - secondary
Network StringId - ID of the secondary network in which to create the secondary subnet.
- availability
Zone String - Availability Zone for the secondary subnet. Cannot be specified with
availability_zone_id. - availability
Zone StringId - ID of the Availability Zone for the secondary subnet. This option is preferred over
availability_zoneas it provides a consistent identifier across AWS accounts. Cannot be specified withavailability_zone. - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the SecondarySubnet resource produces the following output properties:
- Arn string
- ARN of the secondary subnet.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv4Cidr
Block List<SecondaryAssociations Subnet Ipv4Cidr Block Association> - A list of IPv4 CIDR block associations for the secondary network.
- Owner
Id string - ID of the AWS account that owns the secondary subnet.
- Secondary
Network stringType - Type of the secondary network (e.g.,
rdma). - Secondary
Subnet stringId - ID of the secondary subnet.
- State string
- State of the IPv4 CIDR block association.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- Arn string
- ARN of the secondary subnet.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv4Cidr
Block []SecondaryAssociations Subnet Ipv4Cidr Block Association - A list of IPv4 CIDR block associations for the secondary network.
- Owner
Id string - ID of the AWS account that owns the secondary subnet.
- Secondary
Network stringType - Type of the secondary network (e.g.,
rdma). - Secondary
Subnet stringId - ID of the secondary subnet.
- State string
- State of the IPv4 CIDR block association.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn String
- ARN of the secondary subnet.
- id String
- The provider-assigned unique ID for this managed resource.
- ipv4Cidr
Block List<SecondaryAssociations Subnet Ipv4Cidr Block Association> - A list of IPv4 CIDR block associations for the secondary network.
- owner
Id String - ID of the AWS account that owns the secondary subnet.
- secondary
Network StringType - Type of the secondary network (e.g.,
rdma). - secondary
Subnet StringId - ID of the secondary subnet.
- state String
- State of the IPv4 CIDR block association.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn string
- ARN of the secondary subnet.
- id string
- The provider-assigned unique ID for this managed resource.
- ipv4Cidr
Block SecondaryAssociations Subnet Ipv4Cidr Block Association[] - A list of IPv4 CIDR block associations for the secondary network.
- owner
Id string - ID of the AWS account that owns the secondary subnet.
- secondary
Network stringType - Type of the secondary network (e.g.,
rdma). - secondary
Subnet stringId - ID of the secondary subnet.
- state string
- State of the IPv4 CIDR block association.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn str
- ARN of the secondary subnet.
- id str
- The provider-assigned unique ID for this managed resource.
- ipv4_
cidr_ Sequence[Secondaryblock_ associations Subnet Ipv4Cidr Block Association] - A list of IPv4 CIDR block associations for the secondary network.
- owner_
id str - ID of the AWS account that owns the secondary subnet.
- secondary_
network_ strtype - Type of the secondary network (e.g.,
rdma). - secondary_
subnet_ strid - ID of the secondary subnet.
- state str
- State of the IPv4 CIDR block association.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn String
- ARN of the secondary subnet.
- id String
- The provider-assigned unique ID for this managed resource.
- ipv4Cidr
Block List<Property Map>Associations - A list of IPv4 CIDR block associations for the secondary network.
- owner
Id String - ID of the AWS account that owns the secondary subnet.
- secondary
Network StringType - Type of the secondary network (e.g.,
rdma). - secondary
Subnet StringId - ID of the secondary subnet.
- state String
- State of the IPv4 CIDR block association.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
Look up Existing SecondarySubnet Resource
Get an existing SecondarySubnet 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?: SecondarySubnetState, opts?: CustomResourceOptions): SecondarySubnet@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
availability_zone: Optional[str] = None,
availability_zone_id: Optional[str] = None,
ipv4_cidr_block: Optional[str] = None,
ipv4_cidr_block_associations: Optional[Sequence[SecondarySubnetIpv4CidrBlockAssociationArgs]] = None,
owner_id: Optional[str] = None,
region: Optional[str] = None,
secondary_network_id: Optional[str] = None,
secondary_network_type: Optional[str] = None,
secondary_subnet_id: Optional[str] = None,
state: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
timeouts: Optional[SecondarySubnetTimeoutsArgs] = None) -> SecondarySubnetfunc GetSecondarySubnet(ctx *Context, name string, id IDInput, state *SecondarySubnetState, opts ...ResourceOption) (*SecondarySubnet, error)public static SecondarySubnet Get(string name, Input<string> id, SecondarySubnetState? state, CustomResourceOptions? opts = null)public static SecondarySubnet get(String name, Output<String> id, SecondarySubnetState state, CustomResourceOptions options)resources: _: type: aws:ec2:SecondarySubnet 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.
- Arn string
- ARN of the secondary subnet.
- Availability
Zone string - Availability Zone for the secondary subnet. Cannot be specified with
availability_zone_id. - Availability
Zone stringId - ID of the Availability Zone for the secondary subnet. This option is preferred over
availability_zoneas it provides a consistent identifier across AWS accounts. Cannot be specified withavailability_zone. - Ipv4Cidr
Block string - IPv4 CIDR block for the secondary subnet. The CIDR block size must be between
/12and/28. - Ipv4Cidr
Block List<SecondaryAssociations Subnet Ipv4Cidr Block Association> - A list of IPv4 CIDR block associations for the secondary network.
- Owner
Id string - ID of the AWS account that owns the secondary subnet.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Secondary
Network stringId - ID of the secondary network in which to create the secondary subnet.
- Secondary
Network stringType - Type of the secondary network (e.g.,
rdma). - Secondary
Subnet stringId - ID of the secondary subnet.
- State string
- State of the IPv4 CIDR block association.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - Timeouts
Secondary
Subnet Timeouts
- Arn string
- ARN of the secondary subnet.
- Availability
Zone string - Availability Zone for the secondary subnet. Cannot be specified with
availability_zone_id. - Availability
Zone stringId - ID of the Availability Zone for the secondary subnet. This option is preferred over
availability_zoneas it provides a consistent identifier across AWS accounts. Cannot be specified withavailability_zone. - Ipv4Cidr
Block string - IPv4 CIDR block for the secondary subnet. The CIDR block size must be between
/12and/28. - Ipv4Cidr
Block []SecondaryAssociations Subnet Ipv4Cidr Block Association Args - A list of IPv4 CIDR block associations for the secondary network.
- Owner
Id string - ID of the AWS account that owns the secondary subnet.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Secondary
Network stringId - ID of the secondary network in which to create the secondary subnet.
- Secondary
Network stringType - Type of the secondary network (e.g.,
rdma). - Secondary
Subnet stringId - ID of the secondary subnet.
- State string
- State of the IPv4 CIDR block association.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - Timeouts
Secondary
Subnet Timeouts Args
- arn String
- ARN of the secondary subnet.
- availability
Zone String - Availability Zone for the secondary subnet. Cannot be specified with
availability_zone_id. - availability
Zone StringId - ID of the Availability Zone for the secondary subnet. This option is preferred over
availability_zoneas it provides a consistent identifier across AWS accounts. Cannot be specified withavailability_zone. - ipv4Cidr
Block String - IPv4 CIDR block for the secondary subnet. The CIDR block size must be between
/12and/28. - ipv4Cidr
Block List<SecondaryAssociations Subnet Ipv4Cidr Block Association> - A list of IPv4 CIDR block associations for the secondary network.
- owner
Id String - ID of the AWS account that owns the secondary subnet.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- secondary
Network StringId - ID of the secondary network in which to create the secondary subnet.
- secondary
Network StringType - Type of the secondary network (e.g.,
rdma). - secondary
Subnet StringId - ID of the secondary subnet.
- state String
- State of the IPv4 CIDR block association.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - timeouts
Secondary
Subnet Timeouts
- arn string
- ARN of the secondary subnet.
- availability
Zone string - Availability Zone for the secondary subnet. Cannot be specified with
availability_zone_id. - availability
Zone stringId - ID of the Availability Zone for the secondary subnet. This option is preferred over
availability_zoneas it provides a consistent identifier across AWS accounts. Cannot be specified withavailability_zone. - ipv4Cidr
Block string - IPv4 CIDR block for the secondary subnet. The CIDR block size must be between
/12and/28. - ipv4Cidr
Block SecondaryAssociations Subnet Ipv4Cidr Block Association[] - A list of IPv4 CIDR block associations for the secondary network.
- owner
Id string - ID of the AWS account that owns the secondary subnet.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- secondary
Network stringId - ID of the secondary network in which to create the secondary subnet.
- secondary
Network stringType - Type of the secondary network (e.g.,
rdma). - secondary
Subnet stringId - ID of the secondary subnet.
- state string
- State of the IPv4 CIDR block association.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - timeouts
Secondary
Subnet Timeouts
- arn str
- ARN of the secondary subnet.
- availability_
zone str - Availability Zone for the secondary subnet. Cannot be specified with
availability_zone_id. - availability_
zone_ strid - ID of the Availability Zone for the secondary subnet. This option is preferred over
availability_zoneas it provides a consistent identifier across AWS accounts. Cannot be specified withavailability_zone. - ipv4_
cidr_ strblock - IPv4 CIDR block for the secondary subnet. The CIDR block size must be between
/12and/28. - ipv4_
cidr_ Sequence[Secondaryblock_ associations Subnet Ipv4Cidr Block Association Args] - A list of IPv4 CIDR block associations for the secondary network.
- owner_
id str - ID of the AWS account that owns the secondary subnet.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- secondary_
network_ strid - ID of the secondary network in which to create the secondary subnet.
- secondary_
network_ strtype - Type of the secondary network (e.g.,
rdma). - secondary_
subnet_ strid - ID of the secondary subnet.
- state str
- State of the IPv4 CIDR block association.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - timeouts
Secondary
Subnet Timeouts Args
- arn String
- ARN of the secondary subnet.
- availability
Zone String - Availability Zone for the secondary subnet. Cannot be specified with
availability_zone_id. - availability
Zone StringId - ID of the Availability Zone for the secondary subnet. This option is preferred over
availability_zoneas it provides a consistent identifier across AWS accounts. Cannot be specified withavailability_zone. - ipv4Cidr
Block String - IPv4 CIDR block for the secondary subnet. The CIDR block size must be between
/12and/28. - ipv4Cidr
Block List<Property Map>Associations - A list of IPv4 CIDR block associations for the secondary network.
- owner
Id String - ID of the AWS account that owns the secondary subnet.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- secondary
Network StringId - ID of the secondary network in which to create the secondary subnet.
- secondary
Network StringType - Type of the secondary network (e.g.,
rdma). - secondary
Subnet StringId - ID of the secondary subnet.
- state String
- State of the IPv4 CIDR block association.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - timeouts Property Map
Supporting Types
SecondarySubnetIpv4CidrBlockAssociation, SecondarySubnetIpv4CidrBlockAssociationArgs
- Association
Id string - Association ID for the IPv4 CIDR block.
- Cidr
Block string - IPv4 CIDR block.
- State string
- State of the IPv4 CIDR block association.
- Association
Id string - Association ID for the IPv4 CIDR block.
- Cidr
Block string - IPv4 CIDR block.
- State string
- State of the IPv4 CIDR block association.
- association
Id String - Association ID for the IPv4 CIDR block.
- cidr
Block String - IPv4 CIDR block.
- state String
- State of the IPv4 CIDR block association.
- association
Id string - Association ID for the IPv4 CIDR block.
- cidr
Block string - IPv4 CIDR block.
- state string
- State of the IPv4 CIDR block association.
- association_
id str - Association ID for the IPv4 CIDR block.
- cidr_
block str - IPv4 CIDR block.
- state str
- State of the IPv4 CIDR block association.
- association
Id String - Association ID for the IPv4 CIDR block.
- cidr
Block String - IPv4 CIDR block.
- state String
- State of the IPv4 CIDR block association.
SecondarySubnetTimeouts, SecondarySubnetTimeoutsArgs
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- update str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import
Identity Schema
Required
id- (String) ID of the secondary subnet.
Optional
account_id(String) AWS Account where this resource is managed.region(String) Region where this resource is managed.
Using pulumi import, import EC2 Secondary Subnets using the secondary subnet ID. For example:
$ pulumi import aws:ec2/secondarySubnet:SecondarySubnet example ss-0123456789abcdef0
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
