@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
313 lines • 11.4 kB
JavaScript
"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",
* }],
* }],
* },
* },
* });
* ```
*
* ### Outbound 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: {
* serverCertificateConfigurations: [{
* certificateAuthorityArn: example1.arn,
* checkCertificateRevocationStatus: [{
* revokedStatusAction: "REJECT",
* unknownStatusAction: "PASS",
* }],
* scope: [{
* protocols: [6],
* destinationPorts: [{
* fromPort: 443,
* toPort: 443,
* }],
* destination: [{
* addressDefinition: "0.0.0.0/0",
* }],
* sourcePorts: [{
* fromPort: 0,
* toPort: 65535,
* }],
* source: [{
* 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
*
* ### Identity Schema
*
* #### Required
*
* - `arn` (String) Amazon Resource Name (ARN) of the Network Firewall TLS inspection configuration.
*
* Using `pulumi import`, import Network Firewall TLS Inspection Configuration using the `arn`. For example:
*
* console
*
* % pulumi import aws_networkfirewall_tls_inspection_configuration.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, { ...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?.arn;
resourceInputs["certificateAuthorities"] = state?.certificateAuthorities;
resourceInputs["certificates"] = state?.certificates;
resourceInputs["description"] = state?.description;
resourceInputs["encryptionConfigurations"] = state?.encryptionConfigurations;
resourceInputs["name"] = state?.name;
resourceInputs["numberOfAssociations"] = state?.numberOfAssociations;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["timeouts"] = state?.timeouts;
resourceInputs["tlsInspectionConfiguration"] = state?.tlsInspectionConfiguration;
resourceInputs["tlsInspectionConfigurationId"] = state?.tlsInspectionConfigurationId;
resourceInputs["updateToken"] = state?.updateToken;
}
else {
const args = argsOrState;
resourceInputs["description"] = args?.description;
resourceInputs["encryptionConfigurations"] = args?.encryptionConfigurations;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["tlsInspectionConfiguration"] = args?.tlsInspectionConfiguration;
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