UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

261 lines • 10.2 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.TlsInspectionConfiguration = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS Network Firewall TLS Inspection Configuration. * * ## Example Usage * * > **NOTE:** You must configure either inbound inspection, outbound inspection, or both. * * ### Basic inbound/ingress inspection * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkfirewall.TlsInspectionConfiguration("example", { * name: "example", * description: "example", * encryptionConfigurations: [{ * keyId: "AWS_OWNED_KMS_KEY", * type: "AWS_OWNED_KMS_KEY", * }], * tlsInspectionConfiguration: { * serverCertificateConfiguration: { * serverCertificates: [{ * resourceArn: example1.arn, * }], * scopes: [{ * protocols: [6], * destinationPorts: [{ * fromPort: 443, * toPort: 443, * }], * destinations: [{ * addressDefinition: "0.0.0.0/0", * }], * sourcePorts: [{ * fromPort: 0, * toPort: 65535, * }], * sources: [{ * addressDefinition: "0.0.0.0/0", * }], * }], * }, * }, * }); * ``` * * ### Basic outbound/engress inspection * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkfirewall.TlsInspectionConfiguration("example", { * name: "example", * description: "example", * encryptionConfigurations: [{ * keyId: "AWS_OWNED_KMS_KEY", * type: "AWS_OWNED_KMS_KEY", * }], * tlsInspectionConfiguration: { * serverCertificateConfiguration: { * certificateAuthorityArn: example1.arn, * checkCertificateRevocationStatus: { * revokedStatusAction: "REJECT", * unknownStatusAction: "PASS", * }, * scopes: [{ * protocols: [6], * destinationPorts: [{ * fromPort: 443, * toPort: 443, * }], * destinations: [{ * addressDefinition: "0.0.0.0/0", * }], * sourcePorts: [{ * fromPort: 0, * toPort: 65535, * }], * sources: [{ * addressDefinition: "0.0.0.0/0", * }], * }], * }, * }, * }); * ``` * * ### Inbound with encryption configuration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.kms.Key("example", { * description: "example", * deletionWindowInDays: 7, * }); * const exampleTlsInspectionConfiguration = new aws.networkfirewall.TlsInspectionConfiguration("example", { * name: "example", * description: "example", * encryptionConfigurations: [{ * keyId: example.arn, * type: "CUSTOMER_KMS", * }], * tlsInspectionConfiguration: { * serverCertificateConfiguration: { * serverCertificates: [{ * resourceArn: example1.arn, * }], * scopes: [{ * protocols: [6], * destinationPorts: [{ * fromPort: 443, * toPort: 443, * }], * destinations: [{ * addressDefinition: "0.0.0.0/0", * }], * sourcePorts: [{ * fromPort: 0, * toPort: 65535, * }], * sources: [{ * addressDefinition: "0.0.0.0/0", * }], * }], * }, * }, * }); * ``` * * ### Combined inbound and outbound * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkfirewall.TlsInspectionConfiguration("example", { * name: "example", * description: "example", * encryptionConfigurations: [{ * keyId: "AWS_OWNED_KMS_KEY", * type: "AWS_OWNED_KMS_KEY", * }], * tlsInspectionConfiguration: { * serverCertificateConfiguration: { * certificateAuthorityArn: example1.arn, * checkCertificateRevocationStatus: { * revokedStatusAction: "REJECT", * unknownStatusAction: "PASS", * }, * serverCertificates: [{ * resourceArn: example2.arn, * }], * scopes: [{ * protocols: [6], * destinationPorts: [{ * fromPort: 443, * toPort: 443, * }], * destinations: [{ * addressDefinition: "0.0.0.0/0", * }], * sourcePorts: [{ * fromPort: 0, * toPort: 65535, * }], * sources: [{ * addressDefinition: "0.0.0.0/0", * }], * }], * }, * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Network Firewall TLS Inspection Configuration using the `arn`. For example: * * ```sh * $ pulumi import aws:networkfirewall/tlsInspectionConfiguration:TlsInspectionConfiguration example arn:aws:network-firewall::<region>:<account_id>:tls-configuration/example * ``` */ class TlsInspectionConfiguration extends pulumi.CustomResource { /** * Get an existing TlsInspectionConfiguration 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, id, state, opts) { return new TlsInspectionConfiguration(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of TlsInspectionConfiguration. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === TlsInspectionConfiguration.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["certificateAuthorities"] = state ? state.certificateAuthorities : undefined; resourceInputs["certificates"] = state ? state.certificates : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["encryptionConfigurations"] = state ? state.encryptionConfigurations : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["numberOfAssociations"] = state ? state.numberOfAssociations : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["timeouts"] = state ? state.timeouts : undefined; resourceInputs["tlsInspectionConfiguration"] = state ? state.tlsInspectionConfiguration : undefined; resourceInputs["tlsInspectionConfigurationId"] = state ? state.tlsInspectionConfigurationId : undefined; resourceInputs["updateToken"] = state ? state.updateToken : undefined; } else { const args = argsOrState; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["encryptionConfigurations"] = args ? args.encryptionConfigurations : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["timeouts"] = args ? args.timeouts : undefined; resourceInputs["tlsInspectionConfiguration"] = args ? args.tlsInspectionConfiguration : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["certificateAuthorities"] = undefined /*out*/; resourceInputs["certificates"] = undefined /*out*/; resourceInputs["numberOfAssociations"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["tlsInspectionConfigurationId"] = undefined /*out*/; resourceInputs["updateToken"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(TlsInspectionConfiguration.__pulumiType, name, resourceInputs, opts); } } exports.TlsInspectionConfiguration = TlsInspectionConfiguration; /** @internal */ TlsInspectionConfiguration.__pulumiType = 'aws:networkfirewall/tlsInspectionConfiguration:TlsInspectionConfiguration'; //# sourceMappingURL=tlsInspectionConfiguration.js.map