import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an AWS Lambda Network Connector. A network connector provisions elastic network interfaces (ENIs) in the subnets you specify, routing outbound traffic from [Lambda MicroVMs](https://docs.aws.amazon.com/lambda/latest/dg/microvms-networking.html) through your VPC — for example to reach private resources, or to give MicroVM traffic a stable source IP by exiting through your NAT gateway. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const exampleRole = new aws.iam.Role("example", { * name: "example-network-connector-operator", * assumeRolePolicy: JSON.stringify({ * Version: "2012-10-17", * Statement: [{ * Action: "sts:AssumeRole", * Effect: "Allow", * Principal: { * Service: "network-connectors.lambda.amazonaws.com", * }, * }], * }), * }); * const example = new aws.lambda.CoreNetworkConnector("example", { * configuration: { * vpcEgressConfiguration: { * associatedComputeResourceTypes: ["MicroVm"], * networkProtocol: "IPv4", * subnetIds: exampleAwsSubnet.map(__item => __item.id), * securityGroupIds: [exampleAwsSecurityGroup.id], * }, * }, * name: "example", * operatorRole: exampleRole.arn, * }); * const exampleRolePolicy = new aws.iam.RolePolicy("example", { * name: "example-network-connector-operator", * role: exampleRole.id, * policy: JSON.stringify({ * Version: "2012-10-17", * Statement: [ * { * Sid: "CreateENI", * Effect: "Allow", * Action: "ec2:CreateNetworkInterface", * Resource: [ * "arn:aws:ec2:*:*:network-interface/*", * "arn:aws:ec2:*:*:subnet/*", * "arn:aws:ec2:*:*:security-group/*", * ], * }, * { * Sid: "TagENI", * Effect: "Allow", * Action: "ec2:CreateTags", * Resource: "arn:aws:ec2:*:*:network-interface/*", * Condition: { * StringEquals: { * "ec2:ManagedResourceOperator": "network-connectors.lambda.amazonaws.com", * }, * }, * }, * ], * }), * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * - `arn` (String) ARN of the network connector. * * Using `pulumi import`, import Lambda Network Connectors using the `arn`. For example: * * ```sh * $ pulumi import aws:lambda/coreNetworkConnector:CoreNetworkConnector example arn:aws:lambda:us-east-1:123456789012:network-connector:example * ``` */ export declare class CoreNetworkConnector extends pulumi.CustomResource { /** * Get an existing CoreNetworkConnector resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: CoreNetworkConnectorState, opts?: pulumi.CustomResourceOptions): CoreNetworkConnector; /** * Returns true if the given object is an instance of CoreNetworkConnector. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is CoreNetworkConnector; /** * ARN of the network connector. */ readonly arn: pulumi.Output; /** * Network configuration of the connector. See `configuration` Block below. */ readonly configuration: pulumi.Output; /** * Name of the network connector, unique within the account and Region. Changing this forces a new resource. */ readonly name: pulumi.Output; /** * ARN of the IAM role that the network connector service assumes to manage elastic network interfaces in your VPC. * * The following arguments are optional: */ readonly operatorRole: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; readonly timeouts: pulumi.Output; /** * Create a CoreNetworkConnector resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: CoreNetworkConnectorArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CoreNetworkConnector resources. */ export interface CoreNetworkConnectorState { /** * ARN of the network connector. */ arn?: pulumi.Input; /** * Network configuration of the connector. See `configuration` Block below. */ configuration?: pulumi.Input; /** * Name of the network connector, unique within the account and Region. Changing this forces a new resource. */ name?: pulumi.Input; /** * ARN of the IAM role that the network connector service assumes to manage elastic network interfaces in your VPC. * * The following arguments are optional: */ operatorRole?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; timeouts?: pulumi.Input; } /** * The set of arguments for constructing a CoreNetworkConnector resource. */ export interface CoreNetworkConnectorArgs { /** * Network configuration of the connector. See `configuration` Block below. */ configuration: pulumi.Input; /** * Name of the network connector, unique within the account and Region. Changing this forces a new resource. */ name?: pulumi.Input; /** * ARN of the IAM role that the network connector service assumes to manage elastic network interfaces in your VPC. * * The following arguments are optional: */ operatorRole: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; timeouts?: pulumi.Input; } //# sourceMappingURL=coreNetworkConnector.d.ts.map