alicloud.ecs.EcsNetworkInterfaceAttachment
Explore with Pulumi AI
Provides a ECS Network Interface Attachment resource.
For information about ECS Network Interface Attachment and how to use it, see What is Network Interface Attachment.
NOTE: Available since v1.123.1.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const default = alicloud.getZones({
availableResourceCreation: "Instance",
});
const defaultGetInstanceTypes = _default.then(_default => alicloud.ecs.getInstanceTypes({
availabilityZone: _default.zones?.[0]?.id,
eniAmount: 3,
}));
const defaultNetwork = new alicloud.vpc.Network("default", {
vpcName: name,
cidrBlock: "192.168.0.0/24",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
vswitchName: name,
cidrBlock: "192.168.0.0/24",
zoneId: _default.then(_default => _default.zones?.[0]?.id),
vpcId: defaultNetwork.id,
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
name: name,
description: "New security group",
vpcId: defaultNetwork.id,
});
const defaultGetImages = alicloud.ecs.getImages({
nameRegex: "^ubuntu_18.*64",
mostRecent: true,
owners: "system",
});
const defaultInstance = new alicloud.ecs.Instance("default", {
availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
instanceName: name,
hostName: "tf-example",
imageId: defaultGetImages.then(defaultGetImages => defaultGetImages.images?.[0]?.id),
instanceType: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.id),
securityGroups: [defaultSecurityGroup.id],
vswitchId: defaultSwitch.id,
});
const defaultGetResourceGroups = alicloud.resourcemanager.getResourceGroups({
status: "OK",
});
const defaultEcsNetworkInterface = new alicloud.ecs.EcsNetworkInterface("default", {
networkInterfaceName: name,
vswitchId: defaultSwitch.id,
securityGroupIds: [defaultSecurityGroup.id],
description: "Basic example",
primaryIpAddress: "192.168.0.2",
tags: {
Created: "TF",
For: "example",
},
resourceGroupId: defaultGetResourceGroups.then(defaultGetResourceGroups => defaultGetResourceGroups.ids?.[0]),
});
const defaultEcsNetworkInterfaceAttachment = new alicloud.ecs.EcsNetworkInterfaceAttachment("default", {
networkInterfaceId: defaultEcsNetworkInterface.id,
instanceId: defaultInstance.id,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = alicloud.get_zones(available_resource_creation="Instance")
default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default.zones[0].id,
eni_amount=3)
default_network = alicloud.vpc.Network("default",
vpc_name=name,
cidr_block="192.168.0.0/24")
default_switch = alicloud.vpc.Switch("default",
vswitch_name=name,
cidr_block="192.168.0.0/24",
zone_id=default.zones[0].id,
vpc_id=default_network.id)
default_security_group = alicloud.ecs.SecurityGroup("default",
name=name,
description="New security group",
vpc_id=default_network.id)
default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
most_recent=True,
owners="system")
default_instance = alicloud.ecs.Instance("default",
availability_zone=default.zones[0].id,
instance_name=name,
host_name="tf-example",
image_id=default_get_images.images[0].id,
instance_type=default_get_instance_types.instance_types[0].id,
security_groups=[default_security_group.id],
vswitch_id=default_switch.id)
default_get_resource_groups = alicloud.resourcemanager.get_resource_groups(status="OK")
default_ecs_network_interface = alicloud.ecs.EcsNetworkInterface("default",
network_interface_name=name,
vswitch_id=default_switch.id,
security_group_ids=[default_security_group.id],
description="Basic example",
primary_ip_address="192.168.0.2",
tags={
"Created": "TF",
"For": "example",
},
resource_group_id=default_get_resource_groups.ids[0])
default_ecs_network_interface_attachment = alicloud.ecs.EcsNetworkInterfaceAttachment("default",
network_interface_id=default_ecs_network_interface.id,
instance_id=default_instance.id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableResourceCreation: pulumi.StringRef("Instance"),
}, nil)
if err != nil {
return err
}
defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
AvailabilityZone: pulumi.StringRef(_default.Zones[0].Id),
EniAmount: pulumi.IntRef(3),
}, nil)
if err != nil {
return err
}
defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("192.168.0.0/24"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
VswitchName: pulumi.String(name),
CidrBlock: pulumi.String("192.168.0.0/24"),
ZoneId: pulumi.String(_default.Zones[0].Id),
VpcId: defaultNetwork.ID(),
})
if err != nil {
return err
}
defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
Name: pulumi.String(name),
Description: pulumi.String("New security group"),
VpcId: defaultNetwork.ID(),
})
if err != nil {
return err
}
defaultGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
NameRegex: pulumi.StringRef("^ubuntu_18.*64"),
MostRecent: pulumi.BoolRef(true),
Owners: pulumi.StringRef("system"),
}, nil)
if err != nil {
return err
}
defaultInstance, err := ecs.NewInstance(ctx, "default", &ecs.InstanceArgs{
AvailabilityZone: pulumi.String(_default.Zones[0].Id),
InstanceName: pulumi.String(name),
HostName: pulumi.String("tf-example"),
ImageId: pulumi.String(defaultGetImages.Images[0].Id),
InstanceType: pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].Id),
SecurityGroups: pulumi.StringArray{
defaultSecurityGroup.ID(),
},
VswitchId: defaultSwitch.ID(),
})
if err != nil {
return err
}
defaultGetResourceGroups, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{
Status: pulumi.StringRef("OK"),
}, nil)
if err != nil {
return err
}
defaultEcsNetworkInterface, err := ecs.NewEcsNetworkInterface(ctx, "default", &ecs.EcsNetworkInterfaceArgs{
NetworkInterfaceName: pulumi.String(name),
VswitchId: defaultSwitch.ID(),
SecurityGroupIds: pulumi.StringArray{
defaultSecurityGroup.ID(),
},
Description: pulumi.String("Basic example"),
PrimaryIpAddress: pulumi.String("192.168.0.2"),
Tags: pulumi.StringMap{
"Created": pulumi.String("TF"),
"For": pulumi.String("example"),
},
ResourceGroupId: pulumi.String(defaultGetResourceGroups.Ids[0]),
})
if err != nil {
return err
}
_, err = ecs.NewEcsNetworkInterfaceAttachment(ctx, "default", &ecs.EcsNetworkInterfaceAttachmentArgs{
NetworkInterfaceId: defaultEcsNetworkInterface.ID(),
InstanceId: defaultInstance.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var @default = AliCloud.GetZones.Invoke(new()
{
AvailableResourceCreation = "Instance",
});
var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
{
AvailabilityZone = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
EniAmount = 3,
});
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = name,
CidrBlock = "192.168.0.0/24",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VswitchName = name,
CidrBlock = "192.168.0.0/24",
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
VpcId = defaultNetwork.Id,
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
{
Name = name,
Description = "New security group",
VpcId = defaultNetwork.Id,
});
var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
{
NameRegex = "^ubuntu_18.*64",
MostRecent = true,
Owners = "system",
});
var defaultInstance = new AliCloud.Ecs.Instance("default", new()
{
AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
InstanceName = name,
HostName = "tf-example",
ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
InstanceType = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
SecurityGroups = new[]
{
defaultSecurityGroup.Id,
},
VswitchId = defaultSwitch.Id,
});
var defaultGetResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
{
Status = "OK",
});
var defaultEcsNetworkInterface = new AliCloud.Ecs.EcsNetworkInterface("default", new()
{
NetworkInterfaceName = name,
VswitchId = defaultSwitch.Id,
SecurityGroupIds = new[]
{
defaultSecurityGroup.Id,
},
Description = "Basic example",
PrimaryIpAddress = "192.168.0.2",
Tags =
{
{ "Created", "TF" },
{ "For", "example" },
},
ResourceGroupId = defaultGetResourceGroups.Apply(getResourceGroupsResult => getResourceGroupsResult.Ids[0]),
});
var defaultEcsNetworkInterfaceAttachment = new AliCloud.Ecs.EcsNetworkInterfaceAttachment("default", new()
{
NetworkInterfaceId = defaultEcsNetworkInterface.Id,
InstanceId = defaultInstance.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
import com.pulumi.alicloud.ecs.Instance;
import com.pulumi.alicloud.ecs.InstanceArgs;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.ecs.EcsNetworkInterface;
import com.pulumi.alicloud.ecs.EcsNetworkInterfaceArgs;
import com.pulumi.alicloud.ecs.EcsNetworkInterfaceAttachment;
import com.pulumi.alicloud.ecs.EcsNetworkInterfaceAttachmentArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("tf-example");
final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("Instance")
.build());
final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.availabilityZone(default_.zones()[0].id())
.eniAmount(3)
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("192.168.0.0/24")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.cidrBlock("192.168.0.0/24")
.zoneId(default_.zones()[0].id())
.vpcId(defaultNetwork.id())
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.name(name)
.description("New security group")
.vpcId(defaultNetwork.id())
.build());
final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
.nameRegex("^ubuntu_18.*64")
.mostRecent(true)
.owners("system")
.build());
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.availabilityZone(default_.zones()[0].id())
.instanceName(name)
.hostName("tf-example")
.imageId(defaultGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
.instanceType(defaultGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
.securityGroups(defaultSecurityGroup.id())
.vswitchId(defaultSwitch.id())
.build());
final var defaultGetResourceGroups = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
.status("OK")
.build());
var defaultEcsNetworkInterface = new EcsNetworkInterface("defaultEcsNetworkInterface", EcsNetworkInterfaceArgs.builder()
.networkInterfaceName(name)
.vswitchId(defaultSwitch.id())
.securityGroupIds(defaultSecurityGroup.id())
.description("Basic example")
.primaryIpAddress("192.168.0.2")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "example")
))
.resourceGroupId(defaultGetResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.ids()[0]))
.build());
var defaultEcsNetworkInterfaceAttachment = new EcsNetworkInterfaceAttachment("defaultEcsNetworkInterfaceAttachment", EcsNetworkInterfaceAttachmentArgs.builder()
.networkInterfaceId(defaultEcsNetworkInterface.id())
.instanceId(defaultInstance.id())
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
defaultNetwork:
type: alicloud:vpc:Network
name: default
properties:
vpcName: ${name}
cidrBlock: 192.168.0.0/24
defaultSwitch:
type: alicloud:vpc:Switch
name: default
properties:
vswitchName: ${name}
cidrBlock: 192.168.0.0/24
zoneId: ${default.zones[0].id}
vpcId: ${defaultNetwork.id}
defaultSecurityGroup:
type: alicloud:ecs:SecurityGroup
name: default
properties:
name: ${name}
description: New security group
vpcId: ${defaultNetwork.id}
defaultInstance:
type: alicloud:ecs:Instance
name: default
properties:
availabilityZone: ${default.zones[0].id}
instanceName: ${name}
hostName: tf-example
imageId: ${defaultGetImages.images[0].id}
instanceType: ${defaultGetInstanceTypes.instanceTypes[0].id}
securityGroups:
- ${defaultSecurityGroup.id}
vswitchId: ${defaultSwitch.id}
defaultEcsNetworkInterface:
type: alicloud:ecs:EcsNetworkInterface
name: default
properties:
networkInterfaceName: ${name}
vswitchId: ${defaultSwitch.id}
securityGroupIds:
- ${defaultSecurityGroup.id}
description: Basic example
primaryIpAddress: 192.168.0.2
tags:
Created: TF
For: example
resourceGroupId: ${defaultGetResourceGroups.ids[0]}
defaultEcsNetworkInterfaceAttachment:
type: alicloud:ecs:EcsNetworkInterfaceAttachment
name: default
properties:
networkInterfaceId: ${defaultEcsNetworkInterface.id}
instanceId: ${defaultInstance.id}
variables:
default:
fn::invoke:
Function: alicloud:getZones
Arguments:
availableResourceCreation: Instance
defaultGetInstanceTypes:
fn::invoke:
Function: alicloud:ecs:getInstanceTypes
Arguments:
availabilityZone: ${default.zones[0].id}
eniAmount: 3
defaultGetImages:
fn::invoke:
Function: alicloud:ecs:getImages
Arguments:
nameRegex: ^ubuntu_18.*64
mostRecent: true
owners: system
defaultGetResourceGroups:
fn::invoke:
Function: alicloud:resourcemanager:getResourceGroups
Arguments:
status: OK
Create EcsNetworkInterfaceAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EcsNetworkInterfaceAttachment(name: string, args: EcsNetworkInterfaceAttachmentArgs, opts?: CustomResourceOptions);
@overload
def EcsNetworkInterfaceAttachment(resource_name: str,
args: EcsNetworkInterfaceAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EcsNetworkInterfaceAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
network_interface_id: Optional[str] = None,
network_card_index: Optional[int] = None,
trunk_network_instance_id: Optional[str] = None,
wait_for_network_configuration_ready: Optional[bool] = None)
func NewEcsNetworkInterfaceAttachment(ctx *Context, name string, args EcsNetworkInterfaceAttachmentArgs, opts ...ResourceOption) (*EcsNetworkInterfaceAttachment, error)
public EcsNetworkInterfaceAttachment(string name, EcsNetworkInterfaceAttachmentArgs args, CustomResourceOptions? opts = null)
public EcsNetworkInterfaceAttachment(String name, EcsNetworkInterfaceAttachmentArgs args)
public EcsNetworkInterfaceAttachment(String name, EcsNetworkInterfaceAttachmentArgs args, CustomResourceOptions options)
type: alicloud:ecs:EcsNetworkInterfaceAttachment
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 EcsNetworkInterfaceAttachmentArgs
- 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 EcsNetworkInterfaceAttachmentArgs
- 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 EcsNetworkInterfaceAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EcsNetworkInterfaceAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EcsNetworkInterfaceAttachmentArgs
- 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 ecsNetworkInterfaceAttachmentResource = new AliCloud.Ecs.EcsNetworkInterfaceAttachment("ecsNetworkInterfaceAttachmentResource", new()
{
InstanceId = "string",
NetworkInterfaceId = "string",
NetworkCardIndex = 0,
TrunkNetworkInstanceId = "string",
WaitForNetworkConfigurationReady = false,
});
example, err := ecs.NewEcsNetworkInterfaceAttachment(ctx, "ecsNetworkInterfaceAttachmentResource", &ecs.EcsNetworkInterfaceAttachmentArgs{
InstanceId: pulumi.String("string"),
NetworkInterfaceId: pulumi.String("string"),
NetworkCardIndex: pulumi.Int(0),
TrunkNetworkInstanceId: pulumi.String("string"),
WaitForNetworkConfigurationReady: pulumi.Bool(false),
})
var ecsNetworkInterfaceAttachmentResource = new EcsNetworkInterfaceAttachment("ecsNetworkInterfaceAttachmentResource", EcsNetworkInterfaceAttachmentArgs.builder()
.instanceId("string")
.networkInterfaceId("string")
.networkCardIndex(0)
.trunkNetworkInstanceId("string")
.waitForNetworkConfigurationReady(false)
.build());
ecs_network_interface_attachment_resource = alicloud.ecs.EcsNetworkInterfaceAttachment("ecsNetworkInterfaceAttachmentResource",
instance_id="string",
network_interface_id="string",
network_card_index=0,
trunk_network_instance_id="string",
wait_for_network_configuration_ready=False)
const ecsNetworkInterfaceAttachmentResource = new alicloud.ecs.EcsNetworkInterfaceAttachment("ecsNetworkInterfaceAttachmentResource", {
instanceId: "string",
networkInterfaceId: "string",
networkCardIndex: 0,
trunkNetworkInstanceId: "string",
waitForNetworkConfigurationReady: false,
});
type: alicloud:ecs:EcsNetworkInterfaceAttachment
properties:
instanceId: string
networkCardIndex: 0
networkInterfaceId: string
trunkNetworkInstanceId: string
waitForNetworkConfigurationReady: false
EcsNetworkInterfaceAttachment 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 EcsNetworkInterfaceAttachment resource accepts the following input properties:
- Instance
Id string - The ID of the ECS instance.
- Network
Interface stringId - The ID of the network interface.
- Network
Card intIndex - The index of the network card.
- Trunk
Network stringInstance Id - The ID of the trunk network instance.
- Wait
For boolNetwork Configuration Ready - The wait for network configuration ready.
- Instance
Id string - The ID of the ECS instance.
- Network
Interface stringId - The ID of the network interface.
- Network
Card intIndex - The index of the network card.
- Trunk
Network stringInstance Id - The ID of the trunk network instance.
- Wait
For boolNetwork Configuration Ready - The wait for network configuration ready.
- instance
Id String - The ID of the ECS instance.
- network
Interface StringId - The ID of the network interface.
- network
Card IntegerIndex - The index of the network card.
- trunk
Network StringInstance Id - The ID of the trunk network instance.
- wait
For BooleanNetwork Configuration Ready - The wait for network configuration ready.
- instance
Id string - The ID of the ECS instance.
- network
Interface stringId - The ID of the network interface.
- network
Card numberIndex - The index of the network card.
- trunk
Network stringInstance Id - The ID of the trunk network instance.
- wait
For booleanNetwork Configuration Ready - The wait for network configuration ready.
- instance_
id str - The ID of the ECS instance.
- network_
interface_ strid - The ID of the network interface.
- network_
card_ intindex - The index of the network card.
- trunk_
network_ strinstance_ id - The ID of the trunk network instance.
- wait_
for_ boolnetwork_ configuration_ ready - The wait for network configuration ready.
- instance
Id String - The ID of the ECS instance.
- network
Interface StringId - The ID of the network interface.
- network
Card NumberIndex - The index of the network card.
- trunk
Network StringInstance Id - The ID of the trunk network instance.
- wait
For BooleanNetwork Configuration Ready - The wait for network configuration ready.
Outputs
All input properties are implicitly available as output properties. Additionally, the EcsNetworkInterfaceAttachment resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing EcsNetworkInterfaceAttachment Resource
Get an existing EcsNetworkInterfaceAttachment 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?: EcsNetworkInterfaceAttachmentState, opts?: CustomResourceOptions): EcsNetworkInterfaceAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
network_card_index: Optional[int] = None,
network_interface_id: Optional[str] = None,
trunk_network_instance_id: Optional[str] = None,
wait_for_network_configuration_ready: Optional[bool] = None) -> EcsNetworkInterfaceAttachment
func GetEcsNetworkInterfaceAttachment(ctx *Context, name string, id IDInput, state *EcsNetworkInterfaceAttachmentState, opts ...ResourceOption) (*EcsNetworkInterfaceAttachment, error)
public static EcsNetworkInterfaceAttachment Get(string name, Input<string> id, EcsNetworkInterfaceAttachmentState? state, CustomResourceOptions? opts = null)
public static EcsNetworkInterfaceAttachment get(String name, Output<String> id, EcsNetworkInterfaceAttachmentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Instance
Id string - The ID of the ECS instance.
- Network
Card intIndex - The index of the network card.
- Network
Interface stringId - The ID of the network interface.
- Trunk
Network stringInstance Id - The ID of the trunk network instance.
- Wait
For boolNetwork Configuration Ready - The wait for network configuration ready.
- Instance
Id string - The ID of the ECS instance.
- Network
Card intIndex - The index of the network card.
- Network
Interface stringId - The ID of the network interface.
- Trunk
Network stringInstance Id - The ID of the trunk network instance.
- Wait
For boolNetwork Configuration Ready - The wait for network configuration ready.
- instance
Id String - The ID of the ECS instance.
- network
Card IntegerIndex - The index of the network card.
- network
Interface StringId - The ID of the network interface.
- trunk
Network StringInstance Id - The ID of the trunk network instance.
- wait
For BooleanNetwork Configuration Ready - The wait for network configuration ready.
- instance
Id string - The ID of the ECS instance.
- network
Card numberIndex - The index of the network card.
- network
Interface stringId - The ID of the network interface.
- trunk
Network stringInstance Id - The ID of the trunk network instance.
- wait
For booleanNetwork Configuration Ready - The wait for network configuration ready.
- instance_
id str - The ID of the ECS instance.
- network_
card_ intindex - The index of the network card.
- network_
interface_ strid - The ID of the network interface.
- trunk_
network_ strinstance_ id - The ID of the trunk network instance.
- wait_
for_ boolnetwork_ configuration_ ready - The wait for network configuration ready.
- instance
Id String - The ID of the ECS instance.
- network
Card NumberIndex - The index of the network card.
- network
Interface StringId - The ID of the network interface.
- trunk
Network StringInstance Id - The ID of the trunk network instance.
- wait
For BooleanNetwork Configuration Ready - The wait for network configuration ready.
Import
ECS Network Interface Attachment can be imported using the id, e.g.
$ pulumi import alicloud:ecs/ecsNetworkInterfaceAttachment:EcsNetworkInterfaceAttachment example <network_interface_id>:<instance_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.