UNPKG

@pulumi/scm

Version:

A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1

389 lines (388 loc) 11.5 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * NatRule resource * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scm from "@pulumi/scm"; * * const exampleTag = new scm.Tag("example_tag", { * folder: "All", * name: "example-tag", * color: "Red", * }); * //Source Translation (SNAT) - Dynamic IP and Port * const exampleNatRule = new scm.NatRule("example_nat_rule", { * name: "snat-to-internet-1", * froms: ["any"], * tos: ["untrust"], * sources: ["any"], * destinations: ["any"], * service: "service-https", * description: "Dynamic SNAT for internal traffic accessing the internet. Updating", * disabled: false, * natType: "ipv4", * folder: "All", * tags: [exampleTag.name], * sourceTranslation: { * dynamicIpAndPort: { * translatedAddresses: [ * "1.1.1.1", * "1.1.1.5", * ], * }, * }, * destinationTranslation: { * translatedAddress: "192.168.1.10", * translatedPort: 8080, * }, * activeActiveDeviceBinding: "1", * }); * //Source Translation (SNAT) - Static IP - Bidirectional - no * const exampleNatStaticRule = new scm.NatRule("example_nat_static_rule", { * name: "snat-to-bid-1", * froms: ["any"], * tos: ["untrust"], * sources: ["any"], * destinations: ["any"], * service: "service-https", * description: "Dynamic SNAT for internal traffic accessing the internet. Updating", * disabled: false, * natType: "ipv4", * folder: "All", * tags: [exampleTag.name], * sourceTranslation: { * staticIp: { * translatedAddress: "1.1.1.5", * biDirectional: "no", * }, * }, * destinationTranslation: { * translatedAddress: "192.168.1.10", * translatedPort: 8080, * }, * activeActiveDeviceBinding: "1", * }); * //Source Translation (SNAT) - Static IP - Bidirectional - yes * const exampleNatStaticRule2 = new scm.NatRule("example_nat_static_rule_2", { * name: "snat-to-bid-yes-1", * froms: ["any"], * tos: ["untrust"], * sources: ["any"], * destinations: ["any"], * service: "service-https", * description: "Dynamic SNAT for internal traffic accessing the internet. Updating", * disabled: false, * natType: "ipv4", * folder: "All", * tags: [exampleTag.name], * sourceTranslation: { * staticIp: { * translatedAddress: "1.1.1.5", * biDirectional: "yes", * }, * }, * activeActiveDeviceBinding: "1", * }); * //Source Translation (SNAT) - Dynamic IP * const exampleNatDynamicRule = new scm.NatRule("example_nat_dynamic_rule", { * name: "snat-to-dyanamic-1", * froms: ["any"], * tos: ["untrust"], * sources: ["any"], * destinations: ["any"], * service: "service-https", * description: "Dynamic SNAT for internal traffic accessing the internet. Updating", * disabled: false, * natType: "ipv4", * folder: "All", * tags: [exampleTag.name], * sourceTranslation: { * dynamicIp: { * translatedAddresses: ["1.1.1.0/24"], * fallback: { * translatedAddresses: ["1.1.1.0"], * interfaceAddress: { * "interface": "ethernet1/1", * ip: "1.1.1.5", * }, * }, * }, * }, * destinationTranslation: { * translatedAddress: "192.168.1.10", * translatedPort: 8080, * }, * activeActiveDeviceBinding: "1", * }); * ``` */ export declare class NatRule extends pulumi.CustomResource { /** * Get an existing NatRule 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<pulumi.ID>, state?: NatRuleState, opts?: pulumi.CustomResourceOptions): NatRule; /** * Returns true if the given object is an instance of NatRule. 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 NatRule; /** * Active active device binding */ readonly activeActiveDeviceBinding: pulumi.Output<string | undefined>; /** * NAT rule description */ readonly description: pulumi.Output<string | undefined>; /** * Destination translation */ readonly destinationTranslation: pulumi.Output<outputs.NatRuleDestinationTranslation | undefined>; /** * Destination address(es) of the original packet */ readonly destinations: pulumi.Output<string[]>; /** * The device in which the resource is defined */ readonly device: pulumi.Output<string | undefined>; /** * Disable NAT rule? */ readonly disabled: pulumi.Output<boolean>; /** * Dynamic destination translation */ readonly dynamicDestinationTranslation: pulumi.Output<outputs.NatRuleDynamicDestinationTranslation | undefined>; /** * The folder in which the resource is defined */ readonly folder: pulumi.Output<string | undefined>; /** * Source zone(s) of the original packet */ readonly froms: pulumi.Output<string[]>; /** * NAT rule name */ readonly name: pulumi.Output<string>; /** * NAT type */ readonly natType: pulumi.Output<string>; /** * The relative position of the rule */ readonly position: pulumi.Output<string>; /** * The service of the original packet */ readonly service: pulumi.Output<string>; /** * The snippet in which the resource is defined */ readonly snippet: pulumi.Output<string | undefined>; /** * Source translation */ readonly sourceTranslation: pulumi.Output<outputs.NatRuleSourceTranslation | undefined>; /** * Source address(es) of the original packet */ readonly sources: pulumi.Output<string[]>; /** * NAT rule tags */ readonly tags: pulumi.Output<string[] | undefined>; readonly tfid: pulumi.Output<string>; /** * Destination interface of the original packet */ readonly toInterface: pulumi.Output<string | undefined>; /** * Destination zone of the original packet */ readonly tos: pulumi.Output<string[]>; /** * Create a NatRule 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: NatRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering NatRule resources. */ export interface NatRuleState { /** * Active active device binding */ activeActiveDeviceBinding?: pulumi.Input<string>; /** * NAT rule description */ description?: pulumi.Input<string>; /** * Destination translation */ destinationTranslation?: pulumi.Input<inputs.NatRuleDestinationTranslation>; /** * Destination address(es) of the original packet */ destinations?: pulumi.Input<pulumi.Input<string>[]>; /** * The device in which the resource is defined */ device?: pulumi.Input<string>; /** * Disable NAT rule? */ disabled?: pulumi.Input<boolean>; /** * Dynamic destination translation */ dynamicDestinationTranslation?: pulumi.Input<inputs.NatRuleDynamicDestinationTranslation>; /** * The folder in which the resource is defined */ folder?: pulumi.Input<string>; /** * Source zone(s) of the original packet */ froms?: pulumi.Input<pulumi.Input<string>[]>; /** * NAT rule name */ name?: pulumi.Input<string>; /** * NAT type */ natType?: pulumi.Input<string>; /** * The relative position of the rule */ position?: pulumi.Input<string>; /** * The service of the original packet */ service?: pulumi.Input<string>; /** * The snippet in which the resource is defined */ snippet?: pulumi.Input<string>; /** * Source translation */ sourceTranslation?: pulumi.Input<inputs.NatRuleSourceTranslation>; /** * Source address(es) of the original packet */ sources?: pulumi.Input<pulumi.Input<string>[]>; /** * NAT rule tags */ tags?: pulumi.Input<pulumi.Input<string>[]>; tfid?: pulumi.Input<string>; /** * Destination interface of the original packet */ toInterface?: pulumi.Input<string>; /** * Destination zone of the original packet */ tos?: pulumi.Input<pulumi.Input<string>[]>; } /** * The set of arguments for constructing a NatRule resource. */ export interface NatRuleArgs { /** * Active active device binding */ activeActiveDeviceBinding?: pulumi.Input<string>; /** * NAT rule description */ description?: pulumi.Input<string>; /** * Destination translation */ destinationTranslation?: pulumi.Input<inputs.NatRuleDestinationTranslation>; /** * Destination address(es) of the original packet */ destinations: pulumi.Input<pulumi.Input<string>[]>; /** * The device in which the resource is defined */ device?: pulumi.Input<string>; /** * Disable NAT rule? */ disabled?: pulumi.Input<boolean>; /** * Dynamic destination translation */ dynamicDestinationTranslation?: pulumi.Input<inputs.NatRuleDynamicDestinationTranslation>; /** * The folder in which the resource is defined */ folder?: pulumi.Input<string>; /** * Source zone(s) of the original packet */ froms: pulumi.Input<pulumi.Input<string>[]>; /** * NAT rule name */ name?: pulumi.Input<string>; /** * NAT type */ natType?: pulumi.Input<string>; /** * The relative position of the rule */ position?: pulumi.Input<string>; /** * The service of the original packet */ service: pulumi.Input<string>; /** * The snippet in which the resource is defined */ snippet?: pulumi.Input<string>; /** * Source translation */ sourceTranslation?: pulumi.Input<inputs.NatRuleSourceTranslation>; /** * Source address(es) of the original packet */ sources: pulumi.Input<pulumi.Input<string>[]>; /** * NAT rule tags */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * Destination interface of the original packet */ toInterface?: pulumi.Input<string>; /** * Destination zone of the original packet */ tos: pulumi.Input<pulumi.Input<string>[]>; }