github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/networkInterface.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package ec2
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides an Elastic network interface (ENI) resource.
    16  //
    17  // ## Example Usage
    18  //
    19  // <!--Start PulumiCodeChooser -->
    20  // ```go
    21  // package main
    22  //
    23  // import (
    24  //
    25  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    26  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    27  //
    28  // )
    29  //
    30  //	func main() {
    31  //		pulumi.Run(func(ctx *pulumi.Context) error {
    32  //			_, err := ec2.NewNetworkInterface(ctx, "test", &ec2.NetworkInterfaceArgs{
    33  //				SubnetId: pulumi.Any(publicA.Id),
    34  //				PrivateIps: pulumi.StringArray{
    35  //					pulumi.String("10.0.0.50"),
    36  //				},
    37  //				SecurityGroups: pulumi.StringArray{
    38  //					web.Id,
    39  //				},
    40  //				Attachments: ec2.NetworkInterfaceAttachmentTypeArray{
    41  //					&ec2.NetworkInterfaceAttachmentTypeArgs{
    42  //						Instance:    pulumi.Any(testAwsInstance.Id),
    43  //						DeviceIndex: pulumi.Int(1),
    44  //					},
    45  //				},
    46  //			})
    47  //			if err != nil {
    48  //				return err
    49  //			}
    50  //			return nil
    51  //		})
    52  //	}
    53  //
    54  // ```
    55  // <!--End PulumiCodeChooser -->
    56  //
    57  // ### Example of Managing Multiple IPs on a Network Interface
    58  //
    59  // By default, private IPs are managed through the `privateIps` and `privateIpsCount` arguments which manage IPs as a set of IPs that are configured without regard to order. For a new network interface, the same primary IP address is consistently selected from a given set of addresses, regardless of the order provided. However, modifications of the set of addresses of an existing interface will not alter the current primary IP address unless it has been removed from the set.
    60  //
    61  // In order to manage the private IPs as a sequentially ordered list, configure `privateIpListEnabled` to `true` and use `privateIpList` to manage the IPs. This will disable the `privateIps` and `privateIpsCount` settings, which must be removed from the config file but are still exported. Note that changing the first address of `privateIpList`, which is the primary, always requires a new interface.
    62  //
    63  // If you are managing a specific set or list of IPs, instead of just using `privateIpsCount`, this is a potential workflow for also leveraging `privateIpsCount` to have AWS automatically assign additional IP addresses:
    64  //
    65  // 1. Comment out `privateIps`, `privateIpList`, `privateIpListEnabled` in your configuration
    66  // 2. Set the desired `privateIpsCount` (count of the number of secondaries, the primary is not included)
    67  // 3. Apply to assign the extra IPs
    68  // 4. Remove `privateIpsCount` and restore your settings from the first step
    69  // 5. Add the new IPs to your current settings
    70  // 6. Apply again to update the stored state
    71  //
    72  // This process can also be used to remove IP addresses in addition to the option of manually removing them. Adding IP addresses in a manually is more difficult because it requires knowledge of which addresses are available.
    73  //
    74  // ## Import
    75  //
    76  // Using `pulumi import`, import Network Interfaces using the `id`. For example:
    77  //
    78  // ```sh
    79  // $ pulumi import aws:ec2/networkInterface:NetworkInterface test eni-e5aa89a3
    80  // ```
    81  type NetworkInterface struct {
    82  	pulumi.CustomResourceState
    83  
    84  	// ARN of the network interface.
    85  	Arn pulumi.StringOutput `pulumi:"arn"`
    86  	// Configuration block to define the attachment of the ENI. See Attachment below for more details!
    87  	Attachments NetworkInterfaceAttachmentTypeArrayOutput `pulumi:"attachments"`
    88  	// Description for the network interface.
    89  	Description pulumi.StringPtrOutput `pulumi:"description"`
    90  	// Type of network interface to create. Set to `efa` for Elastic Fabric Adapter. Changing `interfaceType` will cause the resource to be destroyed and re-created.
    91  	InterfaceType pulumi.StringOutput `pulumi:"interfaceType"`
    92  	// Number of IPv4 prefixes that AWS automatically assigns to the network interface.
    93  	Ipv4PrefixCount pulumi.IntOutput `pulumi:"ipv4PrefixCount"`
    94  	// One or more IPv4 prefixes assigned to the network interface.
    95  	Ipv4Prefixes pulumi.StringArrayOutput `pulumi:"ipv4Prefixes"`
    96  	// Number of IPv6 addresses to assign to a network interface. You can't use this option if specifying specific `ipv6Addresses`. If your subnet has the AssignIpv6AddressOnCreation attribute set to `true`, you can specify `0` to override this setting.
    97  	Ipv6AddressCount pulumi.IntOutput `pulumi:"ipv6AddressCount"`
    98  	// Whether `ipv6AddressList` is allowed and controls the IPs to assign to the ENI and `ipv6Addresses` and `ipv6AddressCount` become read-only. Default false.
    99  	Ipv6AddressListEnabled pulumi.BoolPtrOutput `pulumi:"ipv6AddressListEnabled"`
   100  	// List of private IPs to assign to the ENI in sequential order.
   101  	Ipv6AddressLists pulumi.StringArrayOutput `pulumi:"ipv6AddressLists"`
   102  	// One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Addresses are assigned without regard to order. You can't use this option if you're specifying `ipv6AddressCount`.
   103  	Ipv6Addresses pulumi.StringArrayOutput `pulumi:"ipv6Addresses"`
   104  	// Number of IPv6 prefixes that AWS automatically assigns to the network interface.
   105  	Ipv6PrefixCount pulumi.IntOutput `pulumi:"ipv6PrefixCount"`
   106  	// One or more IPv6 prefixes assigned to the network interface.
   107  	Ipv6Prefixes pulumi.StringArrayOutput `pulumi:"ipv6Prefixes"`
   108  	// MAC address of the network interface.
   109  	MacAddress pulumi.StringOutput `pulumi:"macAddress"`
   110  	OutpostArn pulumi.StringOutput `pulumi:"outpostArn"`
   111  	// AWS account ID of the owner of the network interface.
   112  	OwnerId pulumi.StringOutput `pulumi:"ownerId"`
   113  	// Private DNS name of the network interface (IPv4).
   114  	PrivateDnsName pulumi.StringOutput `pulumi:"privateDnsName"`
   115  	PrivateIp      pulumi.StringOutput `pulumi:"privateIp"`
   116  	// Whether `privateIpList` is allowed and controls the IPs to assign to the ENI and `privateIps` and `privateIpsCount` become read-only. Default false.
   117  	PrivateIpListEnabled pulumi.BoolPtrOutput `pulumi:"privateIpListEnabled"`
   118  	// List of private IPs to assign to the ENI in sequential order. Requires setting `privateIpListEnabled` to `true`.
   119  	PrivateIpLists pulumi.StringArrayOutput `pulumi:"privateIpLists"`
   120  	// List of private IPs to assign to the ENI without regard to order.
   121  	PrivateIps pulumi.StringArrayOutput `pulumi:"privateIps"`
   122  	// Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + `privateIpsCount`, as a primary private IP will be assiged to an ENI by default.
   123  	PrivateIpsCount pulumi.IntOutput `pulumi:"privateIpsCount"`
   124  	// List of security group IDs to assign to the ENI.
   125  	SecurityGroups pulumi.StringArrayOutput `pulumi:"securityGroups"`
   126  	// Whether to enable source destination checking for the ENI. Default true.
   127  	SourceDestCheck pulumi.BoolPtrOutput `pulumi:"sourceDestCheck"`
   128  	// Subnet ID to create the ENI in.
   129  	//
   130  	// The following arguments are optional:
   131  	SubnetId pulumi.StringOutput `pulumi:"subnetId"`
   132  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   133  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   134  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   135  	//
   136  	// Deprecated: Please use `tags` instead.
   137  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   138  }
   139  
   140  // NewNetworkInterface registers a new resource with the given unique name, arguments, and options.
   141  func NewNetworkInterface(ctx *pulumi.Context,
   142  	name string, args *NetworkInterfaceArgs, opts ...pulumi.ResourceOption) (*NetworkInterface, error) {
   143  	if args == nil {
   144  		return nil, errors.New("missing one or more required arguments")
   145  	}
   146  
   147  	if args.SubnetId == nil {
   148  		return nil, errors.New("invalid value for required argument 'SubnetId'")
   149  	}
   150  	opts = internal.PkgResourceDefaultOpts(opts)
   151  	var resource NetworkInterface
   152  	err := ctx.RegisterResource("aws:ec2/networkInterface:NetworkInterface", name, args, &resource, opts...)
   153  	if err != nil {
   154  		return nil, err
   155  	}
   156  	return &resource, nil
   157  }
   158  
   159  // GetNetworkInterface gets an existing NetworkInterface resource's state with the given name, ID, and optional
   160  // state properties that are used to uniquely qualify the lookup (nil if not required).
   161  func GetNetworkInterface(ctx *pulumi.Context,
   162  	name string, id pulumi.IDInput, state *NetworkInterfaceState, opts ...pulumi.ResourceOption) (*NetworkInterface, error) {
   163  	var resource NetworkInterface
   164  	err := ctx.ReadResource("aws:ec2/networkInterface:NetworkInterface", name, id, state, &resource, opts...)
   165  	if err != nil {
   166  		return nil, err
   167  	}
   168  	return &resource, nil
   169  }
   170  
   171  // Input properties used for looking up and filtering NetworkInterface resources.
   172  type networkInterfaceState struct {
   173  	// ARN of the network interface.
   174  	Arn *string `pulumi:"arn"`
   175  	// Configuration block to define the attachment of the ENI. See Attachment below for more details!
   176  	Attachments []NetworkInterfaceAttachmentType `pulumi:"attachments"`
   177  	// Description for the network interface.
   178  	Description *string `pulumi:"description"`
   179  	// Type of network interface to create. Set to `efa` for Elastic Fabric Adapter. Changing `interfaceType` will cause the resource to be destroyed and re-created.
   180  	InterfaceType *string `pulumi:"interfaceType"`
   181  	// Number of IPv4 prefixes that AWS automatically assigns to the network interface.
   182  	Ipv4PrefixCount *int `pulumi:"ipv4PrefixCount"`
   183  	// One or more IPv4 prefixes assigned to the network interface.
   184  	Ipv4Prefixes []string `pulumi:"ipv4Prefixes"`
   185  	// Number of IPv6 addresses to assign to a network interface. You can't use this option if specifying specific `ipv6Addresses`. If your subnet has the AssignIpv6AddressOnCreation attribute set to `true`, you can specify `0` to override this setting.
   186  	Ipv6AddressCount *int `pulumi:"ipv6AddressCount"`
   187  	// Whether `ipv6AddressList` is allowed and controls the IPs to assign to the ENI and `ipv6Addresses` and `ipv6AddressCount` become read-only. Default false.
   188  	Ipv6AddressListEnabled *bool `pulumi:"ipv6AddressListEnabled"`
   189  	// List of private IPs to assign to the ENI in sequential order.
   190  	Ipv6AddressLists []string `pulumi:"ipv6AddressLists"`
   191  	// One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Addresses are assigned without regard to order. You can't use this option if you're specifying `ipv6AddressCount`.
   192  	Ipv6Addresses []string `pulumi:"ipv6Addresses"`
   193  	// Number of IPv6 prefixes that AWS automatically assigns to the network interface.
   194  	Ipv6PrefixCount *int `pulumi:"ipv6PrefixCount"`
   195  	// One or more IPv6 prefixes assigned to the network interface.
   196  	Ipv6Prefixes []string `pulumi:"ipv6Prefixes"`
   197  	// MAC address of the network interface.
   198  	MacAddress *string `pulumi:"macAddress"`
   199  	OutpostArn *string `pulumi:"outpostArn"`
   200  	// AWS account ID of the owner of the network interface.
   201  	OwnerId *string `pulumi:"ownerId"`
   202  	// Private DNS name of the network interface (IPv4).
   203  	PrivateDnsName *string `pulumi:"privateDnsName"`
   204  	PrivateIp      *string `pulumi:"privateIp"`
   205  	// Whether `privateIpList` is allowed and controls the IPs to assign to the ENI and `privateIps` and `privateIpsCount` become read-only. Default false.
   206  	PrivateIpListEnabled *bool `pulumi:"privateIpListEnabled"`
   207  	// List of private IPs to assign to the ENI in sequential order. Requires setting `privateIpListEnabled` to `true`.
   208  	PrivateIpLists []string `pulumi:"privateIpLists"`
   209  	// List of private IPs to assign to the ENI without regard to order.
   210  	PrivateIps []string `pulumi:"privateIps"`
   211  	// Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + `privateIpsCount`, as a primary private IP will be assiged to an ENI by default.
   212  	PrivateIpsCount *int `pulumi:"privateIpsCount"`
   213  	// List of security group IDs to assign to the ENI.
   214  	SecurityGroups []string `pulumi:"securityGroups"`
   215  	// Whether to enable source destination checking for the ENI. Default true.
   216  	SourceDestCheck *bool `pulumi:"sourceDestCheck"`
   217  	// Subnet ID to create the ENI in.
   218  	//
   219  	// The following arguments are optional:
   220  	SubnetId *string `pulumi:"subnetId"`
   221  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   222  	Tags map[string]string `pulumi:"tags"`
   223  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   224  	//
   225  	// Deprecated: Please use `tags` instead.
   226  	TagsAll map[string]string `pulumi:"tagsAll"`
   227  }
   228  
   229  type NetworkInterfaceState struct {
   230  	// ARN of the network interface.
   231  	Arn pulumi.StringPtrInput
   232  	// Configuration block to define the attachment of the ENI. See Attachment below for more details!
   233  	Attachments NetworkInterfaceAttachmentTypeArrayInput
   234  	// Description for the network interface.
   235  	Description pulumi.StringPtrInput
   236  	// Type of network interface to create. Set to `efa` for Elastic Fabric Adapter. Changing `interfaceType` will cause the resource to be destroyed and re-created.
   237  	InterfaceType pulumi.StringPtrInput
   238  	// Number of IPv4 prefixes that AWS automatically assigns to the network interface.
   239  	Ipv4PrefixCount pulumi.IntPtrInput
   240  	// One or more IPv4 prefixes assigned to the network interface.
   241  	Ipv4Prefixes pulumi.StringArrayInput
   242  	// Number of IPv6 addresses to assign to a network interface. You can't use this option if specifying specific `ipv6Addresses`. If your subnet has the AssignIpv6AddressOnCreation attribute set to `true`, you can specify `0` to override this setting.
   243  	Ipv6AddressCount pulumi.IntPtrInput
   244  	// Whether `ipv6AddressList` is allowed and controls the IPs to assign to the ENI and `ipv6Addresses` and `ipv6AddressCount` become read-only. Default false.
   245  	Ipv6AddressListEnabled pulumi.BoolPtrInput
   246  	// List of private IPs to assign to the ENI in sequential order.
   247  	Ipv6AddressLists pulumi.StringArrayInput
   248  	// One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Addresses are assigned without regard to order. You can't use this option if you're specifying `ipv6AddressCount`.
   249  	Ipv6Addresses pulumi.StringArrayInput
   250  	// Number of IPv6 prefixes that AWS automatically assigns to the network interface.
   251  	Ipv6PrefixCount pulumi.IntPtrInput
   252  	// One or more IPv6 prefixes assigned to the network interface.
   253  	Ipv6Prefixes pulumi.StringArrayInput
   254  	// MAC address of the network interface.
   255  	MacAddress pulumi.StringPtrInput
   256  	OutpostArn pulumi.StringPtrInput
   257  	// AWS account ID of the owner of the network interface.
   258  	OwnerId pulumi.StringPtrInput
   259  	// Private DNS name of the network interface (IPv4).
   260  	PrivateDnsName pulumi.StringPtrInput
   261  	PrivateIp      pulumi.StringPtrInput
   262  	// Whether `privateIpList` is allowed and controls the IPs to assign to the ENI and `privateIps` and `privateIpsCount` become read-only. Default false.
   263  	PrivateIpListEnabled pulumi.BoolPtrInput
   264  	// List of private IPs to assign to the ENI in sequential order. Requires setting `privateIpListEnabled` to `true`.
   265  	PrivateIpLists pulumi.StringArrayInput
   266  	// List of private IPs to assign to the ENI without regard to order.
   267  	PrivateIps pulumi.StringArrayInput
   268  	// Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + `privateIpsCount`, as a primary private IP will be assiged to an ENI by default.
   269  	PrivateIpsCount pulumi.IntPtrInput
   270  	// List of security group IDs to assign to the ENI.
   271  	SecurityGroups pulumi.StringArrayInput
   272  	// Whether to enable source destination checking for the ENI. Default true.
   273  	SourceDestCheck pulumi.BoolPtrInput
   274  	// Subnet ID to create the ENI in.
   275  	//
   276  	// The following arguments are optional:
   277  	SubnetId pulumi.StringPtrInput
   278  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   279  	Tags pulumi.StringMapInput
   280  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   281  	//
   282  	// Deprecated: Please use `tags` instead.
   283  	TagsAll pulumi.StringMapInput
   284  }
   285  
   286  func (NetworkInterfaceState) ElementType() reflect.Type {
   287  	return reflect.TypeOf((*networkInterfaceState)(nil)).Elem()
   288  }
   289  
   290  type networkInterfaceArgs struct {
   291  	// Configuration block to define the attachment of the ENI. See Attachment below for more details!
   292  	Attachments []NetworkInterfaceAttachmentType `pulumi:"attachments"`
   293  	// Description for the network interface.
   294  	Description *string `pulumi:"description"`
   295  	// Type of network interface to create. Set to `efa` for Elastic Fabric Adapter. Changing `interfaceType` will cause the resource to be destroyed and re-created.
   296  	InterfaceType *string `pulumi:"interfaceType"`
   297  	// Number of IPv4 prefixes that AWS automatically assigns to the network interface.
   298  	Ipv4PrefixCount *int `pulumi:"ipv4PrefixCount"`
   299  	// One or more IPv4 prefixes assigned to the network interface.
   300  	Ipv4Prefixes []string `pulumi:"ipv4Prefixes"`
   301  	// Number of IPv6 addresses to assign to a network interface. You can't use this option if specifying specific `ipv6Addresses`. If your subnet has the AssignIpv6AddressOnCreation attribute set to `true`, you can specify `0` to override this setting.
   302  	Ipv6AddressCount *int `pulumi:"ipv6AddressCount"`
   303  	// Whether `ipv6AddressList` is allowed and controls the IPs to assign to the ENI and `ipv6Addresses` and `ipv6AddressCount` become read-only. Default false.
   304  	Ipv6AddressListEnabled *bool `pulumi:"ipv6AddressListEnabled"`
   305  	// List of private IPs to assign to the ENI in sequential order.
   306  	Ipv6AddressLists []string `pulumi:"ipv6AddressLists"`
   307  	// One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Addresses are assigned without regard to order. You can't use this option if you're specifying `ipv6AddressCount`.
   308  	Ipv6Addresses []string `pulumi:"ipv6Addresses"`
   309  	// Number of IPv6 prefixes that AWS automatically assigns to the network interface.
   310  	Ipv6PrefixCount *int `pulumi:"ipv6PrefixCount"`
   311  	// One or more IPv6 prefixes assigned to the network interface.
   312  	Ipv6Prefixes []string `pulumi:"ipv6Prefixes"`
   313  	PrivateIp    *string  `pulumi:"privateIp"`
   314  	// Whether `privateIpList` is allowed and controls the IPs to assign to the ENI and `privateIps` and `privateIpsCount` become read-only. Default false.
   315  	PrivateIpListEnabled *bool `pulumi:"privateIpListEnabled"`
   316  	// List of private IPs to assign to the ENI in sequential order. Requires setting `privateIpListEnabled` to `true`.
   317  	PrivateIpLists []string `pulumi:"privateIpLists"`
   318  	// List of private IPs to assign to the ENI without regard to order.
   319  	PrivateIps []string `pulumi:"privateIps"`
   320  	// Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + `privateIpsCount`, as a primary private IP will be assiged to an ENI by default.
   321  	PrivateIpsCount *int `pulumi:"privateIpsCount"`
   322  	// List of security group IDs to assign to the ENI.
   323  	SecurityGroups []string `pulumi:"securityGroups"`
   324  	// Whether to enable source destination checking for the ENI. Default true.
   325  	SourceDestCheck *bool `pulumi:"sourceDestCheck"`
   326  	// Subnet ID to create the ENI in.
   327  	//
   328  	// The following arguments are optional:
   329  	SubnetId string `pulumi:"subnetId"`
   330  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   331  	Tags map[string]string `pulumi:"tags"`
   332  }
   333  
   334  // The set of arguments for constructing a NetworkInterface resource.
   335  type NetworkInterfaceArgs struct {
   336  	// Configuration block to define the attachment of the ENI. See Attachment below for more details!
   337  	Attachments NetworkInterfaceAttachmentTypeArrayInput
   338  	// Description for the network interface.
   339  	Description pulumi.StringPtrInput
   340  	// Type of network interface to create. Set to `efa` for Elastic Fabric Adapter. Changing `interfaceType` will cause the resource to be destroyed and re-created.
   341  	InterfaceType pulumi.StringPtrInput
   342  	// Number of IPv4 prefixes that AWS automatically assigns to the network interface.
   343  	Ipv4PrefixCount pulumi.IntPtrInput
   344  	// One or more IPv4 prefixes assigned to the network interface.
   345  	Ipv4Prefixes pulumi.StringArrayInput
   346  	// Number of IPv6 addresses to assign to a network interface. You can't use this option if specifying specific `ipv6Addresses`. If your subnet has the AssignIpv6AddressOnCreation attribute set to `true`, you can specify `0` to override this setting.
   347  	Ipv6AddressCount pulumi.IntPtrInput
   348  	// Whether `ipv6AddressList` is allowed and controls the IPs to assign to the ENI and `ipv6Addresses` and `ipv6AddressCount` become read-only. Default false.
   349  	Ipv6AddressListEnabled pulumi.BoolPtrInput
   350  	// List of private IPs to assign to the ENI in sequential order.
   351  	Ipv6AddressLists pulumi.StringArrayInput
   352  	// One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Addresses are assigned without regard to order. You can't use this option if you're specifying `ipv6AddressCount`.
   353  	Ipv6Addresses pulumi.StringArrayInput
   354  	// Number of IPv6 prefixes that AWS automatically assigns to the network interface.
   355  	Ipv6PrefixCount pulumi.IntPtrInput
   356  	// One or more IPv6 prefixes assigned to the network interface.
   357  	Ipv6Prefixes pulumi.StringArrayInput
   358  	PrivateIp    pulumi.StringPtrInput
   359  	// Whether `privateIpList` is allowed and controls the IPs to assign to the ENI and `privateIps` and `privateIpsCount` become read-only. Default false.
   360  	PrivateIpListEnabled pulumi.BoolPtrInput
   361  	// List of private IPs to assign to the ENI in sequential order. Requires setting `privateIpListEnabled` to `true`.
   362  	PrivateIpLists pulumi.StringArrayInput
   363  	// List of private IPs to assign to the ENI without regard to order.
   364  	PrivateIps pulumi.StringArrayInput
   365  	// Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + `privateIpsCount`, as a primary private IP will be assiged to an ENI by default.
   366  	PrivateIpsCount pulumi.IntPtrInput
   367  	// List of security group IDs to assign to the ENI.
   368  	SecurityGroups pulumi.StringArrayInput
   369  	// Whether to enable source destination checking for the ENI. Default true.
   370  	SourceDestCheck pulumi.BoolPtrInput
   371  	// Subnet ID to create the ENI in.
   372  	//
   373  	// The following arguments are optional:
   374  	SubnetId pulumi.StringInput
   375  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   376  	Tags pulumi.StringMapInput
   377  }
   378  
   379  func (NetworkInterfaceArgs) ElementType() reflect.Type {
   380  	return reflect.TypeOf((*networkInterfaceArgs)(nil)).Elem()
   381  }
   382  
   383  type NetworkInterfaceInput interface {
   384  	pulumi.Input
   385  
   386  	ToNetworkInterfaceOutput() NetworkInterfaceOutput
   387  	ToNetworkInterfaceOutputWithContext(ctx context.Context) NetworkInterfaceOutput
   388  }
   389  
   390  func (*NetworkInterface) ElementType() reflect.Type {
   391  	return reflect.TypeOf((**NetworkInterface)(nil)).Elem()
   392  }
   393  
   394  func (i *NetworkInterface) ToNetworkInterfaceOutput() NetworkInterfaceOutput {
   395  	return i.ToNetworkInterfaceOutputWithContext(context.Background())
   396  }
   397  
   398  func (i *NetworkInterface) ToNetworkInterfaceOutputWithContext(ctx context.Context) NetworkInterfaceOutput {
   399  	return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceOutput)
   400  }
   401  
   402  // NetworkInterfaceArrayInput is an input type that accepts NetworkInterfaceArray and NetworkInterfaceArrayOutput values.
   403  // You can construct a concrete instance of `NetworkInterfaceArrayInput` via:
   404  //
   405  //	NetworkInterfaceArray{ NetworkInterfaceArgs{...} }
   406  type NetworkInterfaceArrayInput interface {
   407  	pulumi.Input
   408  
   409  	ToNetworkInterfaceArrayOutput() NetworkInterfaceArrayOutput
   410  	ToNetworkInterfaceArrayOutputWithContext(context.Context) NetworkInterfaceArrayOutput
   411  }
   412  
   413  type NetworkInterfaceArray []NetworkInterfaceInput
   414  
   415  func (NetworkInterfaceArray) ElementType() reflect.Type {
   416  	return reflect.TypeOf((*[]*NetworkInterface)(nil)).Elem()
   417  }
   418  
   419  func (i NetworkInterfaceArray) ToNetworkInterfaceArrayOutput() NetworkInterfaceArrayOutput {
   420  	return i.ToNetworkInterfaceArrayOutputWithContext(context.Background())
   421  }
   422  
   423  func (i NetworkInterfaceArray) ToNetworkInterfaceArrayOutputWithContext(ctx context.Context) NetworkInterfaceArrayOutput {
   424  	return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceArrayOutput)
   425  }
   426  
   427  // NetworkInterfaceMapInput is an input type that accepts NetworkInterfaceMap and NetworkInterfaceMapOutput values.
   428  // You can construct a concrete instance of `NetworkInterfaceMapInput` via:
   429  //
   430  //	NetworkInterfaceMap{ "key": NetworkInterfaceArgs{...} }
   431  type NetworkInterfaceMapInput interface {
   432  	pulumi.Input
   433  
   434  	ToNetworkInterfaceMapOutput() NetworkInterfaceMapOutput
   435  	ToNetworkInterfaceMapOutputWithContext(context.Context) NetworkInterfaceMapOutput
   436  }
   437  
   438  type NetworkInterfaceMap map[string]NetworkInterfaceInput
   439  
   440  func (NetworkInterfaceMap) ElementType() reflect.Type {
   441  	return reflect.TypeOf((*map[string]*NetworkInterface)(nil)).Elem()
   442  }
   443  
   444  func (i NetworkInterfaceMap) ToNetworkInterfaceMapOutput() NetworkInterfaceMapOutput {
   445  	return i.ToNetworkInterfaceMapOutputWithContext(context.Background())
   446  }
   447  
   448  func (i NetworkInterfaceMap) ToNetworkInterfaceMapOutputWithContext(ctx context.Context) NetworkInterfaceMapOutput {
   449  	return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceMapOutput)
   450  }
   451  
   452  type NetworkInterfaceOutput struct{ *pulumi.OutputState }
   453  
   454  func (NetworkInterfaceOutput) ElementType() reflect.Type {
   455  	return reflect.TypeOf((**NetworkInterface)(nil)).Elem()
   456  }
   457  
   458  func (o NetworkInterfaceOutput) ToNetworkInterfaceOutput() NetworkInterfaceOutput {
   459  	return o
   460  }
   461  
   462  func (o NetworkInterfaceOutput) ToNetworkInterfaceOutputWithContext(ctx context.Context) NetworkInterfaceOutput {
   463  	return o
   464  }
   465  
   466  // ARN of the network interface.
   467  func (o NetworkInterfaceOutput) Arn() pulumi.StringOutput {
   468  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   469  }
   470  
   471  // Configuration block to define the attachment of the ENI. See Attachment below for more details!
   472  func (o NetworkInterfaceOutput) Attachments() NetworkInterfaceAttachmentTypeArrayOutput {
   473  	return o.ApplyT(func(v *NetworkInterface) NetworkInterfaceAttachmentTypeArrayOutput { return v.Attachments }).(NetworkInterfaceAttachmentTypeArrayOutput)
   474  }
   475  
   476  // Description for the network interface.
   477  func (o NetworkInterfaceOutput) Description() pulumi.StringPtrOutput {
   478  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   479  }
   480  
   481  // Type of network interface to create. Set to `efa` for Elastic Fabric Adapter. Changing `interfaceType` will cause the resource to be destroyed and re-created.
   482  func (o NetworkInterfaceOutput) InterfaceType() pulumi.StringOutput {
   483  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.InterfaceType }).(pulumi.StringOutput)
   484  }
   485  
   486  // Number of IPv4 prefixes that AWS automatically assigns to the network interface.
   487  func (o NetworkInterfaceOutput) Ipv4PrefixCount() pulumi.IntOutput {
   488  	return o.ApplyT(func(v *NetworkInterface) pulumi.IntOutput { return v.Ipv4PrefixCount }).(pulumi.IntOutput)
   489  }
   490  
   491  // One or more IPv4 prefixes assigned to the network interface.
   492  func (o NetworkInterfaceOutput) Ipv4Prefixes() pulumi.StringArrayOutput {
   493  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringArrayOutput { return v.Ipv4Prefixes }).(pulumi.StringArrayOutput)
   494  }
   495  
   496  // Number of IPv6 addresses to assign to a network interface. You can't use this option if specifying specific `ipv6Addresses`. If your subnet has the AssignIpv6AddressOnCreation attribute set to `true`, you can specify `0` to override this setting.
   497  func (o NetworkInterfaceOutput) Ipv6AddressCount() pulumi.IntOutput {
   498  	return o.ApplyT(func(v *NetworkInterface) pulumi.IntOutput { return v.Ipv6AddressCount }).(pulumi.IntOutput)
   499  }
   500  
   501  // Whether `ipv6AddressList` is allowed and controls the IPs to assign to the ENI and `ipv6Addresses` and `ipv6AddressCount` become read-only. Default false.
   502  func (o NetworkInterfaceOutput) Ipv6AddressListEnabled() pulumi.BoolPtrOutput {
   503  	return o.ApplyT(func(v *NetworkInterface) pulumi.BoolPtrOutput { return v.Ipv6AddressListEnabled }).(pulumi.BoolPtrOutput)
   504  }
   505  
   506  // List of private IPs to assign to the ENI in sequential order.
   507  func (o NetworkInterfaceOutput) Ipv6AddressLists() pulumi.StringArrayOutput {
   508  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringArrayOutput { return v.Ipv6AddressLists }).(pulumi.StringArrayOutput)
   509  }
   510  
   511  // One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Addresses are assigned without regard to order. You can't use this option if you're specifying `ipv6AddressCount`.
   512  func (o NetworkInterfaceOutput) Ipv6Addresses() pulumi.StringArrayOutput {
   513  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringArrayOutput { return v.Ipv6Addresses }).(pulumi.StringArrayOutput)
   514  }
   515  
   516  // Number of IPv6 prefixes that AWS automatically assigns to the network interface.
   517  func (o NetworkInterfaceOutput) Ipv6PrefixCount() pulumi.IntOutput {
   518  	return o.ApplyT(func(v *NetworkInterface) pulumi.IntOutput { return v.Ipv6PrefixCount }).(pulumi.IntOutput)
   519  }
   520  
   521  // One or more IPv6 prefixes assigned to the network interface.
   522  func (o NetworkInterfaceOutput) Ipv6Prefixes() pulumi.StringArrayOutput {
   523  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringArrayOutput { return v.Ipv6Prefixes }).(pulumi.StringArrayOutput)
   524  }
   525  
   526  // MAC address of the network interface.
   527  func (o NetworkInterfaceOutput) MacAddress() pulumi.StringOutput {
   528  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.MacAddress }).(pulumi.StringOutput)
   529  }
   530  
   531  func (o NetworkInterfaceOutput) OutpostArn() pulumi.StringOutput {
   532  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.OutpostArn }).(pulumi.StringOutput)
   533  }
   534  
   535  // AWS account ID of the owner of the network interface.
   536  func (o NetworkInterfaceOutput) OwnerId() pulumi.StringOutput {
   537  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.OwnerId }).(pulumi.StringOutput)
   538  }
   539  
   540  // Private DNS name of the network interface (IPv4).
   541  func (o NetworkInterfaceOutput) PrivateDnsName() pulumi.StringOutput {
   542  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.PrivateDnsName }).(pulumi.StringOutput)
   543  }
   544  
   545  func (o NetworkInterfaceOutput) PrivateIp() pulumi.StringOutput {
   546  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.PrivateIp }).(pulumi.StringOutput)
   547  }
   548  
   549  // Whether `privateIpList` is allowed and controls the IPs to assign to the ENI and `privateIps` and `privateIpsCount` become read-only. Default false.
   550  func (o NetworkInterfaceOutput) PrivateIpListEnabled() pulumi.BoolPtrOutput {
   551  	return o.ApplyT(func(v *NetworkInterface) pulumi.BoolPtrOutput { return v.PrivateIpListEnabled }).(pulumi.BoolPtrOutput)
   552  }
   553  
   554  // List of private IPs to assign to the ENI in sequential order. Requires setting `privateIpListEnabled` to `true`.
   555  func (o NetworkInterfaceOutput) PrivateIpLists() pulumi.StringArrayOutput {
   556  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringArrayOutput { return v.PrivateIpLists }).(pulumi.StringArrayOutput)
   557  }
   558  
   559  // List of private IPs to assign to the ENI without regard to order.
   560  func (o NetworkInterfaceOutput) PrivateIps() pulumi.StringArrayOutput {
   561  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringArrayOutput { return v.PrivateIps }).(pulumi.StringArrayOutput)
   562  }
   563  
   564  // Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + `privateIpsCount`, as a primary private IP will be assiged to an ENI by default.
   565  func (o NetworkInterfaceOutput) PrivateIpsCount() pulumi.IntOutput {
   566  	return o.ApplyT(func(v *NetworkInterface) pulumi.IntOutput { return v.PrivateIpsCount }).(pulumi.IntOutput)
   567  }
   568  
   569  // List of security group IDs to assign to the ENI.
   570  func (o NetworkInterfaceOutput) SecurityGroups() pulumi.StringArrayOutput {
   571  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringArrayOutput { return v.SecurityGroups }).(pulumi.StringArrayOutput)
   572  }
   573  
   574  // Whether to enable source destination checking for the ENI. Default true.
   575  func (o NetworkInterfaceOutput) SourceDestCheck() pulumi.BoolPtrOutput {
   576  	return o.ApplyT(func(v *NetworkInterface) pulumi.BoolPtrOutput { return v.SourceDestCheck }).(pulumi.BoolPtrOutput)
   577  }
   578  
   579  // Subnet ID to create the ENI in.
   580  //
   581  // The following arguments are optional:
   582  func (o NetworkInterfaceOutput) SubnetId() pulumi.StringOutput {
   583  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput)
   584  }
   585  
   586  // Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   587  func (o NetworkInterfaceOutput) Tags() pulumi.StringMapOutput {
   588  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   589  }
   590  
   591  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   592  //
   593  // Deprecated: Please use `tags` instead.
   594  func (o NetworkInterfaceOutput) TagsAll() pulumi.StringMapOutput {
   595  	return o.ApplyT(func(v *NetworkInterface) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   596  }
   597  
   598  type NetworkInterfaceArrayOutput struct{ *pulumi.OutputState }
   599  
   600  func (NetworkInterfaceArrayOutput) ElementType() reflect.Type {
   601  	return reflect.TypeOf((*[]*NetworkInterface)(nil)).Elem()
   602  }
   603  
   604  func (o NetworkInterfaceArrayOutput) ToNetworkInterfaceArrayOutput() NetworkInterfaceArrayOutput {
   605  	return o
   606  }
   607  
   608  func (o NetworkInterfaceArrayOutput) ToNetworkInterfaceArrayOutputWithContext(ctx context.Context) NetworkInterfaceArrayOutput {
   609  	return o
   610  }
   611  
   612  func (o NetworkInterfaceArrayOutput) Index(i pulumi.IntInput) NetworkInterfaceOutput {
   613  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkInterface {
   614  		return vs[0].([]*NetworkInterface)[vs[1].(int)]
   615  	}).(NetworkInterfaceOutput)
   616  }
   617  
   618  type NetworkInterfaceMapOutput struct{ *pulumi.OutputState }
   619  
   620  func (NetworkInterfaceMapOutput) ElementType() reflect.Type {
   621  	return reflect.TypeOf((*map[string]*NetworkInterface)(nil)).Elem()
   622  }
   623  
   624  func (o NetworkInterfaceMapOutput) ToNetworkInterfaceMapOutput() NetworkInterfaceMapOutput {
   625  	return o
   626  }
   627  
   628  func (o NetworkInterfaceMapOutput) ToNetworkInterfaceMapOutputWithContext(ctx context.Context) NetworkInterfaceMapOutput {
   629  	return o
   630  }
   631  
   632  func (o NetworkInterfaceMapOutput) MapIndex(k pulumi.StringInput) NetworkInterfaceOutput {
   633  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkInterface {
   634  		return vs[0].(map[string]*NetworkInterface)[vs[1].(string)]
   635  	}).(NetworkInterfaceOutput)
   636  }
   637  
   638  func init() {
   639  	pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceInput)(nil)).Elem(), &NetworkInterface{})
   640  	pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceArrayInput)(nil)).Elem(), NetworkInterfaceArray{})
   641  	pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceMapInput)(nil)).Elem(), NetworkInterfaceMap{})
   642  	pulumi.RegisterOutputType(NetworkInterfaceOutput{})
   643  	pulumi.RegisterOutputType(NetworkInterfaceArrayOutput{})
   644  	pulumi.RegisterOutputType(NetworkInterfaceMapOutput{})
   645  }