1. Packages
  2. Aviatrix
  3. API Docs
  4. AviatrixProxyConfig
Aviatrix v0.0.11 published on Saturday, Jun 17, 2023 by Aviatrix

aviatrix.AviatrixProxyConfig

Explore with Pulumi AI

aviatrix logo
Aviatrix v0.0.11 published on Saturday, Jun 17, 2023 by Aviatrix

    The aviatrix_proxy_config resource allows management of an Aviatrix Controller’s proxy configurations.

    Example Usage

    using System.Collections.Generic;
    using System.IO;
    using Pulumi;
    using Aviatrix = Pulumi.Aviatrix;
    
    return await Deployment.RunAsync(() => 
    {
        // Create an Aviatrix Controller Proxy Config
        var testProxyConfig = new Aviatrix.AviatrixProxyConfig("testProxyConfig", new()
        {
            HttpProxy = "172.31.52.145:3127",
            HttpsProxy = "172.31.52.145:3129",
            ProxyCaCertificate = File.ReadAllText("/path/to/ca.pem"),
        });
    
    });
    
    package main
    
    import (
    	"io/ioutil"
    
    	"github.com/astipkovits/pulumi-aviatrix/sdk/go/aviatrix"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := ioutil.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aviatrix.NewAviatrixProxyConfig(ctx, "testProxyConfig", &aviatrix.AviatrixProxyConfigArgs{
    			HttpProxy:          pulumi.String("172.31.52.145:3127"),
    			HttpsProxy:         pulumi.String("172.31.52.145:3129"),
    			ProxyCaCertificate: readFileOrPanic("/path/to/ca.pem"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aviatrix.AviatrixProxyConfig;
    import com.pulumi.aviatrix.AviatrixProxyConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testProxyConfig = new AviatrixProxyConfig("testProxyConfig", AviatrixProxyConfigArgs.builder()        
                .httpProxy("172.31.52.145:3127")
                .httpsProxy("172.31.52.145:3129")
                .proxyCaCertificate(Files.readString(Paths.get("/path/to/ca.pem")))
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aviatrix as aviatrix
    
    # Create an Aviatrix Controller Proxy Config
    test_proxy_config = aviatrix.AviatrixProxyConfig("testProxyConfig",
        http_proxy="172.31.52.145:3127",
        https_proxy="172.31.52.145:3129",
        proxy_ca_certificate=(lambda path: open(path).read())("/path/to/ca.pem"))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aviatrix from "@astipkovits/aviatrix";
    import * as fs from "fs";
    
    // Create an Aviatrix Controller Proxy Config
    const testProxyConfig = new aviatrix.AviatrixProxyConfig("testProxyConfig", {
        httpProxy: "172.31.52.145:3127",
        httpsProxy: "172.31.52.145:3129",
        proxyCaCertificate: fs.readFileSync("/path/to/ca.pem"),
    });
    
    resources:
      # Create an Aviatrix Controller Proxy Config
      testProxyConfig:
        type: aviatrix:AviatrixProxyConfig
        properties:
          httpProxy: 172.31.52.145:3127
          httpsProxy: 172.31.52.145:3129
          proxyCaCertificate:
            fn::readFile: /path/to/ca.pem
    

    Create AviatrixProxyConfig Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AviatrixProxyConfig(name: string, args: AviatrixProxyConfigArgs, opts?: CustomResourceOptions);
    @overload
    def AviatrixProxyConfig(resource_name: str,
                            args: AviatrixProxyConfigArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def AviatrixProxyConfig(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            http_proxy: Optional[str] = None,
                            https_proxy: Optional[str] = None,
                            proxy_ca_certificate: Optional[str] = None)
    func NewAviatrixProxyConfig(ctx *Context, name string, args AviatrixProxyConfigArgs, opts ...ResourceOption) (*AviatrixProxyConfig, error)
    public AviatrixProxyConfig(string name, AviatrixProxyConfigArgs args, CustomResourceOptions? opts = null)
    public AviatrixProxyConfig(String name, AviatrixProxyConfigArgs args)
    public AviatrixProxyConfig(String name, AviatrixProxyConfigArgs args, CustomResourceOptions options)
    
    type: aviatrix:AviatrixProxyConfig
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AviatrixProxyConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AviatrixProxyConfigArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AviatrixProxyConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AviatrixProxyConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AviatrixProxyConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var aviatrixProxyConfigResource = new Aviatrix.AviatrixProxyConfig("aviatrixProxyConfigResource", new()
    {
        HttpProxy = "string",
        HttpsProxy = "string",
        ProxyCaCertificate = "string",
    });
    
    example, err := aviatrix.NewAviatrixProxyConfig(ctx, "aviatrixProxyConfigResource", &aviatrix.AviatrixProxyConfigArgs{
    	HttpProxy:          pulumi.String("string"),
    	HttpsProxy:         pulumi.String("string"),
    	ProxyCaCertificate: pulumi.String("string"),
    })
    
    var aviatrixProxyConfigResource = new AviatrixProxyConfig("aviatrixProxyConfigResource", AviatrixProxyConfigArgs.builder()        
        .httpProxy("string")
        .httpsProxy("string")
        .proxyCaCertificate("string")
        .build());
    
    aviatrix_proxy_config_resource = aviatrix.AviatrixProxyConfig("aviatrixProxyConfigResource",
        http_proxy="string",
        https_proxy="string",
        proxy_ca_certificate="string")
    
    const aviatrixProxyConfigResource = new aviatrix.AviatrixProxyConfig("aviatrixProxyConfigResource", {
        httpProxy: "string",
        httpsProxy: "string",
        proxyCaCertificate: "string",
    });
    
    type: aviatrix:AviatrixProxyConfig
    properties:
        httpProxy: string
        httpsProxy: string
        proxyCaCertificate: string
    

    AviatrixProxyConfig Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The AviatrixProxyConfig resource accepts the following input properties:

    HttpProxy string
    Http proxy URL.
    HttpsProxy string
    Https proxy URL.
    ProxyCaCertificate string
    Server CA Certificate file. Use the file function to read from a file.
    HttpProxy string
    Http proxy URL.
    HttpsProxy string
    Https proxy URL.
    ProxyCaCertificate string
    Server CA Certificate file. Use the file function to read from a file.
    httpProxy String
    Http proxy URL.
    httpsProxy String
    Https proxy URL.
    proxyCaCertificate String
    Server CA Certificate file. Use the file function to read from a file.
    httpProxy string
    Http proxy URL.
    httpsProxy string
    Https proxy URL.
    proxyCaCertificate string
    Server CA Certificate file. Use the file function to read from a file.
    http_proxy str
    Http proxy URL.
    https_proxy str
    Https proxy URL.
    proxy_ca_certificate str
    Server CA Certificate file. Use the file function to read from a file.
    httpProxy String
    Http proxy URL.
    httpsProxy String
    Https proxy URL.
    proxyCaCertificate String
    Server CA Certificate file. Use the file function to read from a file.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AviatrixProxyConfig resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AviatrixProxyConfig Resource

    Get an existing AviatrixProxyConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AviatrixProxyConfigState, opts?: CustomResourceOptions): AviatrixProxyConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            http_proxy: Optional[str] = None,
            https_proxy: Optional[str] = None,
            proxy_ca_certificate: Optional[str] = None) -> AviatrixProxyConfig
    func GetAviatrixProxyConfig(ctx *Context, name string, id IDInput, state *AviatrixProxyConfigState, opts ...ResourceOption) (*AviatrixProxyConfig, error)
    public static AviatrixProxyConfig Get(string name, Input<string> id, AviatrixProxyConfigState? state, CustomResourceOptions? opts = null)
    public static AviatrixProxyConfig get(String name, Output<String> id, AviatrixProxyConfigState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    HttpProxy string
    Http proxy URL.
    HttpsProxy string
    Https proxy URL.
    ProxyCaCertificate string
    Server CA Certificate file. Use the file function to read from a file.
    HttpProxy string
    Http proxy URL.
    HttpsProxy string
    Https proxy URL.
    ProxyCaCertificate string
    Server CA Certificate file. Use the file function to read from a file.
    httpProxy String
    Http proxy URL.
    httpsProxy String
    Https proxy URL.
    proxyCaCertificate String
    Server CA Certificate file. Use the file function to read from a file.
    httpProxy string
    Http proxy URL.
    httpsProxy string
    Https proxy URL.
    proxyCaCertificate string
    Server CA Certificate file. Use the file function to read from a file.
    http_proxy str
    Http proxy URL.
    https_proxy str
    Https proxy URL.
    proxy_ca_certificate str
    Server CA Certificate file. Use the file function to read from a file.
    httpProxy String
    Http proxy URL.
    httpsProxy String
    Https proxy URL.
    proxyCaCertificate String
    Server CA Certificate file. Use the file function to read from a file.

    Import

    controller_proxy_config can be imported using controller IP, e.g. controller IP is 10.11.12.13

     $ pulumi import aviatrix:index/aviatrixProxyConfig:AviatrixProxyConfig test 10-11-12-13
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    aviatrix astipkovits/pulumi-aviatrix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aviatrix Terraform Provider.
    aviatrix logo
    Aviatrix v0.0.11 published on Saturday, Jun 17, 2023 by Aviatrix