<reponame>astipkovits/pulumi-aviatrix// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Aviatrix
{
    /// <summary>
    /// The **aviatrix_transit_gateway_peering** resource allows the creation and management of peerings between Aviatrix transit gateways.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Aviatrix = Pulumi.Aviatrix;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     // Create an Aviatrix Transit Gateway Peering
    ///     var testTransitGatewayPeering = new Aviatrix.AviatrixTransitGatewayPeering("testTransitGatewayPeering", new()
    ///     {
    ///         EnableInsaneModeEncryptionOverInternet = false,
    ///         EnablePeeringOverPrivateNetwork = false,
    ///         Gateway1ExcludedNetworkCidrs = new[]
    ///         {
    ///             "10.0.0.48/28",
    ///         },
    ///         Gateway1ExcludedTgwConnections = new[]
    ///         {
    ///             "vpn_connection_a",
    ///         },
    ///         Gateway2ExcludedNetworkCidrs = new[]
    ///         {
    ///             "10.0.0.48/28",
    ///         },
    ///         Gateway2ExcludedTgwConnections = new[]
    ///         {
    ///             "vpn_connection_b",
    ///         },
    ///         PrependAsPath1s = new[]
    ///         {
    ///             "65001",
    ///             "65001",
    ///             "65001",
    ///         },
    ///         PrependAsPath2s = new[]
    ///         {
    ///             "65002",
    ///         },
    ///         TransitGatewayName1 = "transit-Gw1",
    ///         TransitGatewayName2 = "transit-Gw2",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// **transit_gateway_peering** can be imported using the `transit_gateway_name1` and `transit_gateway_name2`, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import aviatrix:index/aviatrixTransitGatewayPeering:AviatrixTransitGatewayPeering test transit_gateway_name1~transit_gateway_name2
    /// ```
    /// </summary>
    [AviatrixResourceType("aviatrix:index/aviatrixTransitGatewayPeering:AviatrixTransitGatewayPeering")]
    public partial class AviatrixTransitGatewayPeering : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Advanced option. Enable Insane Mode Encryption over Internet. Transit gateways must be in Insane Mode. Currently, only inter-cloud connections between AWS and Azure are supported. Required with valid `tunnel_count`. Conflicts with `enable_peering_over_private_network` and `enable_single_tunnel_mode`. Type: Boolean. Default: false. Available as of provider version R2.19+.
        /// </summary>
        [Output("enableInsaneModeEncryptionOverInternet")]
        public Output<bool?> EnableInsaneModeEncryptionOverInternet { get; private set; } = null!;

        /// <summary>
        /// Indicates whether the maximum amount of HPE tunnels will be created. Only valid when the two transit gateways are each launched in Insane Mode and in the same cloud type. Default value: true. Available as of provider version R2.22.2+.
        /// </summary>
        [Output("enableMaxPerformance")]
        public Output<bool?> EnableMaxPerformance { get; private set; } = null!;

        /// <summary>
        /// Advanced option. Enable peering over private network. Only appears and applies to when the two Multi-cloud Transit Gateways are each launched in Insane Mode and in a different cloud type. Conflicts with `enable_insane_mode_encryption_over_internet` and `tunnel_count`. Type: Boolean. Default: false. Available in provider version R2.17.1+.
        /// </summary>
        [Output("enablePeeringOverPrivateNetwork")]
        public Output<bool?> EnablePeeringOverPrivateNetwork { get; private set; } = null!;

        /// <summary>
        /// Advanced option. Enable peering with Single-Tunnel mode. Only appears and applies to when the two Multi-cloud Transit Gateways are each launched in Insane Mode and in a different cloud type. Required with `enable_peering_over_private_network`. Conflicts with `enable_insane_mode_encryption_over_internet` and `tunnel_count`. Type: Boolean. Default: false. Available as of provider version R2.18+.
        /// </summary>
        [Output("enableSingleTunnelMode")]
        public Output<bool?> EnableSingleTunnelMode { get; private set; } = null!;

        /// <summary>
        /// List of excluded network CIDRs for the first transit gateway.
        /// </summary>
        [Output("gateway1ExcludedNetworkCidrs")]
        public Output<ImmutableArray<string>> Gateway1ExcludedNetworkCidrs { get; private set; } = null!;

        /// <summary>
        /// List of excluded TGW connections for the first transit gateway.
        /// </summary>
        [Output("gateway1ExcludedTgwConnections")]
        public Output<ImmutableArray<string>> Gateway1ExcludedTgwConnections { get; private set; } = null!;

        /// <summary>
        /// List of excluded network CIDRs for the second transit gateway.
        /// </summary>
        [Output("gateway2ExcludedNetworkCidrs")]
        public Output<ImmutableArray<string>> Gateway2ExcludedNetworkCidrs { get; private set; } = null!;

        /// <summary>
        /// List of excluded TGW connections for the second transit gateway.
        /// </summary>
        [Output("gateway2ExcludedTgwConnections")]
        public Output<ImmutableArray<string>> Gateway2ExcludedTgwConnections { get; private set; } = null!;

        /// <summary>
        /// AS Path Prepend for BGP connection. Can only use the transit's own local AS number, repeated up to 25 times. Applies on transit_gateway_name1. Available in provider version R2.17.2+.
        /// </summary>
        [Output("prependAsPath1s")]
        public Output<ImmutableArray<string>> PrependAsPath1s { get; private set; } = null!;

        /// <summary>
        /// AS Path Prepend for BGP connection. Can only use the transit's own local AS number, repeated up to 25 times. Applies on transit_gateway_name2. Available in provider version R2.17.2+.
        /// </summary>
        [Output("prependAsPath2s")]
        public Output<ImmutableArray<string>> PrependAsPath2s { get; private set; } = null!;

        /// <summary>
        /// The first transit gateway name to make a peer pair.
        /// </summary>
        [Output("transitGatewayName1")]
        public Output<string> TransitGatewayName1 { get; private set; } = null!;

        /// <summary>
        /// The second transit gateway name to make a peer pair.
        /// </summary>
        [Output("transitGatewayName2")]
        public Output<string> TransitGatewayName2 { get; private set; } = null!;

        /// <summary>
        /// Advanced option. Number of public tunnels. Required with `enable_insane_mode_encryption_over_internet`. Conflicts with `enable_peering_over_private_network` and `enable_single_tunnel_mode`. Type: Integer. Valid Range: 2-20. Available as of provider version R2.19+.
        /// </summary>
        [Output("tunnelCount")]
        public Output<int?> TunnelCount { get; private set; } = null!;


        /// <summary>
        /// Create a AviatrixTransitGatewayPeering resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public AviatrixTransitGatewayPeering(string name, AviatrixTransitGatewayPeeringArgs args, CustomResourceOptions? options = null)
            : base("aviatrix:index/aviatrixTransitGatewayPeering:AviatrixTransitGatewayPeering", name, args ?? new AviatrixTransitGatewayPeeringArgs(), MakeResourceOptions(options, ""))
        {
        }

        private AviatrixTransitGatewayPeering(string name, Input<string> id, AviatrixTransitGatewayPeeringState? state = null, CustomResourceOptions? options = null)
            : base("aviatrix:index/aviatrixTransitGatewayPeering:AviatrixTransitGatewayPeering", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/astipkovits",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing AviatrixTransitGatewayPeering resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static AviatrixTransitGatewayPeering Get(string name, Input<string> id, AviatrixTransitGatewayPeeringState? state = null, CustomResourceOptions? options = null)
        {
            return new AviatrixTransitGatewayPeering(name, id, state, options);
        }
    }

    public sealed class AviatrixTransitGatewayPeeringArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Advanced option. Enable Insane Mode Encryption over Internet. Transit gateways must be in Insane Mode. Currently, only inter-cloud connections between AWS and Azure are supported. Required with valid `tunnel_count`. Conflicts with `enable_peering_over_private_network` and `enable_single_tunnel_mode`. Type: Boolean. Default: false. Available as of provider version R2.19+.
        /// </summary>
        [Input("enableInsaneModeEncryptionOverInternet")]
        public Input<bool>? EnableInsaneModeEncryptionOverInternet { get; set; }

        /// <summary>
        /// Indicates whether the maximum amount of HPE tunnels will be created. Only valid when the two transit gateways are each launched in Insane Mode and in the same cloud type. Default value: true. Available as of provider version R2.22.2+.
        /// </summary>
        [Input("enableMaxPerformance")]
        public Input<bool>? EnableMaxPerformance { get; set; }

        /// <summary>
        /// Advanced option. Enable peering over private network. Only appears and applies to when the two Multi-cloud Transit Gateways are each launched in Insane Mode and in a different cloud type. Conflicts with `enable_insane_mode_encryption_over_internet` and `tunnel_count`. Type: Boolean. Default: false. Available in provider version R2.17.1+.
        /// </summary>
        [Input("enablePeeringOverPrivateNetwork")]
        public Input<bool>? EnablePeeringOverPrivateNetwork { get; set; }

        /// <summary>
        /// Advanced option. Enable peering with Single-Tunnel mode. Only appears and applies to when the two Multi-cloud Transit Gateways are each launched in Insane Mode and in a different cloud type. Required with `enable_peering_over_private_network`. Conflicts with `enable_insane_mode_encryption_over_internet` and `tunnel_count`. Type: Boolean. Default: false. Available as of provider version R2.18+.
        /// </summary>
        [Input("enableSingleTunnelMode")]
        public Input<bool>? EnableSingleTunnelMode { get; set; }

        [Input("gateway1ExcludedNetworkCidrs")]
        private InputList<string>? _gateway1ExcludedNetworkCidrs;

        /// <summary>
        /// List of excluded network CIDRs for the first transit gateway.
        /// </summary>
        public InputList<string> Gateway1ExcludedNetworkCidrs
        {
            get => _gateway1ExcludedNetworkCidrs ?? (_gateway1ExcludedNetworkCidrs = new InputList<string>());
            set => _gateway1ExcludedNetworkCidrs = value;
        }

        [Input("gateway1ExcludedTgwConnections")]
        private InputList<string>? _gateway1ExcludedTgwConnections;

        /// <summary>
        /// List of excluded TGW connections for the first transit gateway.
        /// </summary>
        public InputList<string> Gateway1ExcludedTgwConnections
        {
            get => _gateway1ExcludedTgwConnections ?? (_gateway1ExcludedTgwConnections = new InputList<string>());
            set => _gateway1ExcludedTgwConnections = value;
        }

        [Input("gateway2ExcludedNetworkCidrs")]
        private InputList<string>? _gateway2ExcludedNetworkCidrs;

        /// <summary>
        /// List of excluded network CIDRs for the second transit gateway.
        /// </summary>
        public InputList<string> Gateway2ExcludedNetworkCidrs
        {
            get => _gateway2ExcludedNetworkCidrs ?? (_gateway2ExcludedNetworkCidrs = new InputList<string>());
            set => _gateway2ExcludedNetworkCidrs = value;
        }

        [Input("gateway2ExcludedTgwConnections")]
        private InputList<string>? _gateway2ExcludedTgwConnections;

        /// <summary>
        /// List of excluded TGW connections for the second transit gateway.
        /// </summary>
        public InputList<string> Gateway2ExcludedTgwConnections
        {
            get => _gateway2ExcludedTgwConnections ?? (_gateway2ExcludedTgwConnections = new InputList<string>());
            set => _gateway2ExcludedTgwConnections = value;
        }

        [Input("prependAsPath1s")]
        private InputList<string>? _prependAsPath1s;

        /// <summary>
        /// AS Path Prepend for BGP connection. Can only use the transit's own local AS number, repeated up to 25 times. Applies on transit_gateway_name1. Available in provider version R2.17.2+.
        /// </summary>
        public InputList<string> PrependAsPath1s
        {
            get => _prependAsPath1s ?? (_prependAsPath1s = new InputList<string>());
            set => _prependAsPath1s = value;
        }

        [Input("prependAsPath2s")]
        private InputList<string>? _prependAsPath2s;

        /// <summary>
        /// AS Path Prepend for BGP connection. Can only use the transit's own local AS number, repeated up to 25 times. Applies on transit_gateway_name2. Available in provider version R2.17.2+.
        /// </summary>
        public InputList<string> PrependAsPath2s
        {
            get => _prependAsPath2s ?? (_prependAsPath2s = new InputList<string>());
            set => _prependAsPath2s = value;
        }

        /// <summary>
        /// The first transit gateway name to make a peer pair.
        /// </summary>
        [Input("transitGatewayName1", required: true)]
        public Input<string> TransitGatewayName1 { get; set; } = null!;

        /// <summary>
        /// The second transit gateway name to make a peer pair.
        /// </summary>
        [Input("transitGatewayName2", required: true)]
        public Input<string> TransitGatewayName2 { get; set; } = null!;

        /// <summary>
        /// Advanced option. Number of public tunnels. Required with `enable_insane_mode_encryption_over_internet`. Conflicts with `enable_peering_over_private_network` and `enable_single_tunnel_mode`. Type: Integer. Valid Range: 2-20. Available as of provider version R2.19+.
        /// </summary>
        [Input("tunnelCount")]
        public Input<int>? TunnelCount { get; set; }

        public AviatrixTransitGatewayPeeringArgs()
        {
        }
        public static new AviatrixTransitGatewayPeeringArgs Empty => new AviatrixTransitGatewayPeeringArgs();
    }

    public sealed class AviatrixTransitGatewayPeeringState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Advanced option. Enable Insane Mode Encryption over Internet. Transit gateways must be in Insane Mode. Currently, only inter-cloud connections between AWS and Azure are supported. Required with valid `tunnel_count`. Conflicts with `enable_peering_over_private_network` and `enable_single_tunnel_mode`. Type: Boolean. Default: false. Available as of provider version R2.19+.
        /// </summary>
        [Input("enableInsaneModeEncryptionOverInternet")]
        public Input<bool>? EnableInsaneModeEncryptionOverInternet { get; set; }

        /// <summary>
        /// Indicates whether the maximum amount of HPE tunnels will be created. Only valid when the two transit gateways are each launched in Insane Mode and in the same cloud type. Default value: true. Available as of provider version R2.22.2+.
        /// </summary>
        [Input("enableMaxPerformance")]
        public Input<bool>? EnableMaxPerformance { get; set; }

        /// <summary>
        /// Advanced option. Enable peering over private network. Only appears and applies to when the two Multi-cloud Transit Gateways are each launched in Insane Mode and in a different cloud type. Conflicts with `enable_insane_mode_encryption_over_internet` and `tunnel_count`. Type: Boolean. Default: false. Available in provider version R2.17.1+.
        /// </summary>
        [Input("enablePeeringOverPrivateNetwork")]
        public Input<bool>? EnablePeeringOverPrivateNetwork { get; set; }

        /// <summary>
        /// Advanced option. Enable peering with Single-Tunnel mode. Only appears and applies to when the two Multi-cloud Transit Gateways are each launched in Insane Mode and in a different cloud type. Required with `enable_peering_over_private_network`. Conflicts with `enable_insane_mode_encryption_over_internet` and `tunnel_count`. Type: Boolean. Default: false. Available as of provider version R2.18+.
        /// </summary>
        [Input("enableSingleTunnelMode")]
        public Input<bool>? EnableSingleTunnelMode { get; set; }

        [Input("gateway1ExcludedNetworkCidrs")]
        private InputList<string>? _gateway1ExcludedNetworkCidrs;

        /// <summary>
        /// List of excluded network CIDRs for the first transit gateway.
        /// </summary>
        public InputList<string> Gateway1ExcludedNetworkCidrs
        {
            get => _gateway1ExcludedNetworkCidrs ?? (_gateway1ExcludedNetworkCidrs = new InputList<string>());
            set => _gateway1ExcludedNetworkCidrs = value;
        }

        [Input("gateway1ExcludedTgwConnections")]
        private InputList<string>? _gateway1ExcludedTgwConnections;

        /// <summary>
        /// List of excluded TGW connections for the first transit gateway.
        /// </summary>
        public InputList<string> Gateway1ExcludedTgwConnections
        {
            get => _gateway1ExcludedTgwConnections ?? (_gateway1ExcludedTgwConnections = new InputList<string>());
            set => _gateway1ExcludedTgwConnections = value;
        }

        [Input("gateway2ExcludedNetworkCidrs")]
        private InputList<string>? _gateway2ExcludedNetworkCidrs;

        /// <summary>
        /// List of excluded network CIDRs for the second transit gateway.
        /// </summary>
        public InputList<string> Gateway2ExcludedNetworkCidrs
        {
            get => _gateway2ExcludedNetworkCidrs ?? (_gateway2ExcludedNetworkCidrs = new InputList<string>());
            set => _gateway2ExcludedNetworkCidrs = value;
        }

        [Input("gateway2ExcludedTgwConnections")]
        private InputList<string>? _gateway2ExcludedTgwConnections;

        /// <summary>
        /// List of excluded TGW connections for the second transit gateway.
        /// </summary>
        public InputList<string> Gateway2ExcludedTgwConnections
        {
            get => _gateway2ExcludedTgwConnections ?? (_gateway2ExcludedTgwConnections = new InputList<string>());
            set => _gateway2ExcludedTgwConnections = value;
        }

        [Input("prependAsPath1s")]
        private InputList<string>? _prependAsPath1s;

        /// <summary>
        /// AS Path Prepend for BGP connection. Can only use the transit's own local AS number, repeated up to 25 times. Applies on transit_gateway_name1. Available in provider version R2.17.2+.
        /// </summary>
        public InputList<string> PrependAsPath1s
        {
            get => _prependAsPath1s ?? (_prependAsPath1s = new InputList<string>());
            set => _prependAsPath1s = value;
        }

        [Input("prependAsPath2s")]
        private InputList<string>? _prependAsPath2s;

        /// <summary>
        /// AS Path Prepend for BGP connection. Can only use the transit's own local AS number, repeated up to 25 times. Applies on transit_gateway_name2. Available in provider version R2.17.2+.
        /// </summary>
        public InputList<string> PrependAsPath2s
        {
            get => _prependAsPath2s ?? (_prependAsPath2s = new InputList<string>());
            set => _prependAsPath2s = value;
        }

        /// <summary>
        /// The first transit gateway name to make a peer pair.
        /// </summary>
        [Input("transitGatewayName1")]
        public Input<string>? TransitGatewayName1 { get; set; }

        /// <summary>
        /// The second transit gateway name to make a peer pair.
        /// </summary>
        [Input("transitGatewayName2")]
        public Input<string>? TransitGatewayName2 { get; set; }

        /// <summary>
        /// Advanced option. Number of public tunnels. Required with `enable_insane_mode_encryption_over_internet`. Conflicts with `enable_peering_over_private_network` and `enable_single_tunnel_mode`. Type: Integer. Valid Range: 2-20. Available as of provider version R2.19+.
        /// </summary>
        [Input("tunnelCount")]
        public Input<int>? TunnelCount { get; set; }

        public AviatrixTransitGatewayPeeringState()
        {
        }
        public static new AviatrixTransitGatewayPeeringState Empty => new AviatrixTransitGatewayPeeringState();
    }
}
