1. Packages
  2. ArgoCD
  3. API Docs
  4. RepositoryCertificate
Argo CD v1.0.1 published on Friday, Feb 21, 2025 by Three141

argocd.RepositoryCertificate

Explore with Pulumi AI

argocd logo
Argo CD v1.0.1 published on Friday, Feb 21, 2025 by Three141

    Manages custom TLS certificates used by ArgoCD for connecting Git repositories.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as argocd from "@three14/pulumi-argocd";
    
    // HTTPS certificate
    const private_git_repository_https = new argocd.RepositoryCertificate("private-git-repository-https", {https: {
        serverName: "private-git-repository.local",
        certData: "-----BEGIN CERTIFICATE-----\\nfoo\\nbar\\n-----END CERTIFICATE-----\n",
    }});
    // SSH certificate
    const private_git_repository_ssh = new argocd.RepositoryCertificate("private-git-repository-ssh", {ssh: {
        serverName: "private-git-repository.local",
        certSubtype: "ssh-rsa",
        certData: "AAAAB3NzaC1yc2EAAAADAQABAAABgQCiPZAufKgxwRgxP9qy2Gtub0FI8qJGtL8Ldb7KatBeRUQQPn8QK7ZYjzYDvP1GOutFMaQT0rKIqaGImIBsztNCno...\n",
    }});
    
    import pulumi
    import pulumi_argocd as argocd
    
    # HTTPS certificate
    private_git_repository_https = argocd.RepositoryCertificate("private-git-repository-https", https={
        "server_name": "private-git-repository.local",
        "cert_data": "-----BEGIN CERTIFICATE-----\\nfoo\\nbar\\n-----END CERTIFICATE-----\n",
    })
    # SSH certificate
    private_git_repository_ssh = argocd.RepositoryCertificate("private-git-repository-ssh", ssh={
        "server_name": "private-git-repository.local",
        "cert_subtype": "ssh-rsa",
        "cert_data": "AAAAB3NzaC1yc2EAAAADAQABAAABgQCiPZAufKgxwRgxP9qy2Gtub0FI8qJGtL8Ldb7KatBeRUQQPn8QK7ZYjzYDvP1GOutFMaQT0rKIqaGImIBsztNCno...\n",
    })
    
    package main
    
    import (
    	"github.com/Three141/pulumi-argocd/sdk/go/argocd"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// HTTPS certificate
    		_, err := argocd.NewRepositoryCertificate(ctx, "private-git-repository-https", &argocd.RepositoryCertificateArgs{
    			Https: &argocd.RepositoryCertificateHttpsArgs{
    				ServerName: pulumi.String("private-git-repository.local"),
    				CertData:   pulumi.String("-----BEGIN CERTIFICATE-----\\nfoo\\nbar\\n-----END CERTIFICATE-----\n"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// SSH certificate
    		_, err = argocd.NewRepositoryCertificate(ctx, "private-git-repository-ssh", &argocd.RepositoryCertificateArgs{
    			Ssh: &argocd.RepositoryCertificateSshArgs{
    				ServerName:  pulumi.String("private-git-repository.local"),
    				CertSubtype: pulumi.String("ssh-rsa"),
    				CertData:    pulumi.String("AAAAB3NzaC1yc2EAAAADAQABAAABgQCiPZAufKgxwRgxP9qy2Gtub0FI8qJGtL8Ldb7KatBeRUQQPn8QK7ZYjzYDvP1GOutFMaQT0rKIqaGImIBsztNCno...\n"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Argocd = Three14.Argocd;
    
    return await Deployment.RunAsync(() => 
    {
        // HTTPS certificate
        var private_git_repository_https = new Argocd.RepositoryCertificate("private-git-repository-https", new()
        {
            Https = new Argocd.Inputs.RepositoryCertificateHttpsArgs
            {
                ServerName = "private-git-repository.local",
                CertData = @"-----BEGIN CERTIFICATE-----\nfoo\nbar\n-----END CERTIFICATE-----
    ",
            },
        });
    
        // SSH certificate
        var private_git_repository_ssh = new Argocd.RepositoryCertificate("private-git-repository-ssh", new()
        {
            Ssh = new Argocd.Inputs.RepositoryCertificateSshArgs
            {
                ServerName = "private-git-repository.local",
                CertSubtype = "ssh-rsa",
                CertData = @"AAAAB3NzaC1yc2EAAAADAQABAAABgQCiPZAufKgxwRgxP9qy2Gtub0FI8qJGtL8Ldb7KatBeRUQQPn8QK7ZYjzYDvP1GOutFMaQT0rKIqaGImIBsztNCno...
    ",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.argocd.RepositoryCertificate;
    import com.pulumi.argocd.RepositoryCertificateArgs;
    import com.pulumi.argocd.inputs.RepositoryCertificateHttpsArgs;
    import com.pulumi.argocd.inputs.RepositoryCertificateSshArgs;
    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) {
            // HTTPS certificate
            var private_git_repository_https = new RepositoryCertificate("private-git-repository-https", RepositoryCertificateArgs.builder()
                .https(RepositoryCertificateHttpsArgs.builder()
                    .serverName("private-git-repository.local")
                    .certData("""
    -----BEGIN CERTIFICATE-----\nfoo\nbar\n-----END CERTIFICATE-----
                    """)
                    .build())
                .build());
    
            // SSH certificate
            var private_git_repository_ssh = new RepositoryCertificate("private-git-repository-ssh", RepositoryCertificateArgs.builder()
                .ssh(RepositoryCertificateSshArgs.builder()
                    .serverName("private-git-repository.local")
                    .certSubtype("ssh-rsa")
                    .certData("""
    AAAAB3NzaC1yc2EAAAADAQABAAABgQCiPZAufKgxwRgxP9qy2Gtub0FI8qJGtL8Ldb7KatBeRUQQPn8QK7ZYjzYDvP1GOutFMaQT0rKIqaGImIBsztNCno...
                    """)
                    .build())
                .build());
    
        }
    }
    
    resources:
      # HTTPS certificate
      private-git-repository-https:
        type: argocd:RepositoryCertificate
        properties:
          https:
            serverName: private-git-repository.local
            certData: |
              -----BEGIN CERTIFICATE-----\nfoo\nbar\n-----END CERTIFICATE-----          
      # SSH certificate
      private-git-repository-ssh:
        type: argocd:RepositoryCertificate
        properties:
          ssh:
            serverName: private-git-repository.local
            certSubtype: ssh-rsa
            certData: |
              AAAAB3NzaC1yc2EAAAADAQABAAABgQCiPZAufKgxwRgxP9qy2Gtub0FI8qJGtL8Ldb7KatBeRUQQPn8QK7ZYjzYDvP1GOutFMaQT0rKIqaGImIBsztNCno...          
    

    Create RepositoryCertificate Resource

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

    Constructor syntax

    new RepositoryCertificate(name: string, args?: RepositoryCertificateArgs, opts?: CustomResourceOptions);
    @overload
    def RepositoryCertificate(resource_name: str,
                              args: Optional[RepositoryCertificateArgs] = None,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def RepositoryCertificate(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              https: Optional[RepositoryCertificateHttpsArgs] = None,
                              ssh: Optional[RepositoryCertificateSshArgs] = None)
    func NewRepositoryCertificate(ctx *Context, name string, args *RepositoryCertificateArgs, opts ...ResourceOption) (*RepositoryCertificate, error)
    public RepositoryCertificate(string name, RepositoryCertificateArgs? args = null, CustomResourceOptions? opts = null)
    public RepositoryCertificate(String name, RepositoryCertificateArgs args)
    public RepositoryCertificate(String name, RepositoryCertificateArgs args, CustomResourceOptions options)
    
    type: argocd:RepositoryCertificate
    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 RepositoryCertificateArgs
    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 RepositoryCertificateArgs
    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 RepositoryCertificateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RepositoryCertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RepositoryCertificateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var repositoryCertificateResource = new Argocd.RepositoryCertificate("repositoryCertificateResource", new()
    {
        Https = new Argocd.Inputs.RepositoryCertificateHttpsArgs
        {
            CertData = "string",
            ServerName = "string",
            CertInfo = "string",
            CertSubtype = "string",
        },
        Ssh = new Argocd.Inputs.RepositoryCertificateSshArgs
        {
            CertData = "string",
            CertSubtype = "string",
            ServerName = "string",
            CertInfo = "string",
        },
    });
    
    example, err := argocd.NewRepositoryCertificate(ctx, "repositoryCertificateResource", &argocd.RepositoryCertificateArgs{
    	Https: &argocd.RepositoryCertificateHttpsArgs{
    		CertData:    pulumi.String("string"),
    		ServerName:  pulumi.String("string"),
    		CertInfo:    pulumi.String("string"),
    		CertSubtype: pulumi.String("string"),
    	},
    	Ssh: &argocd.RepositoryCertificateSshArgs{
    		CertData:    pulumi.String("string"),
    		CertSubtype: pulumi.String("string"),
    		ServerName:  pulumi.String("string"),
    		CertInfo:    pulumi.String("string"),
    	},
    })
    
    var repositoryCertificateResource = new RepositoryCertificate("repositoryCertificateResource", RepositoryCertificateArgs.builder()
        .https(RepositoryCertificateHttpsArgs.builder()
            .certData("string")
            .serverName("string")
            .certInfo("string")
            .certSubtype("string")
            .build())
        .ssh(RepositoryCertificateSshArgs.builder()
            .certData("string")
            .certSubtype("string")
            .serverName("string")
            .certInfo("string")
            .build())
        .build());
    
    repository_certificate_resource = argocd.RepositoryCertificate("repositoryCertificateResource",
        https={
            "cert_data": "string",
            "server_name": "string",
            "cert_info": "string",
            "cert_subtype": "string",
        },
        ssh={
            "cert_data": "string",
            "cert_subtype": "string",
            "server_name": "string",
            "cert_info": "string",
        })
    
    const repositoryCertificateResource = new argocd.RepositoryCertificate("repositoryCertificateResource", {
        https: {
            certData: "string",
            serverName: "string",
            certInfo: "string",
            certSubtype: "string",
        },
        ssh: {
            certData: "string",
            certSubtype: "string",
            serverName: "string",
            certInfo: "string",
        },
    });
    
    type: argocd:RepositoryCertificate
    properties:
        https:
            certData: string
            certInfo: string
            certSubtype: string
            serverName: string
        ssh:
            certData: string
            certInfo: string
            certSubtype: string
            serverName: string
    

    RepositoryCertificate Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The RepositoryCertificate resource accepts the following input properties:

    Https RepositoryCertificateHttpsArgs
    Defines a https certificate.
    Ssh RepositoryCertificateSshArgs
    Defines a ssh certificate.
    https RepositoryCertificateHttps
    Defines a https certificate.
    ssh RepositoryCertificateSsh
    Defines a ssh certificate.
    https RepositoryCertificateHttps
    Defines a https certificate.
    ssh RepositoryCertificateSsh
    Defines a ssh certificate.
    https RepositoryCertificateHttpsArgs
    Defines a https certificate.
    ssh RepositoryCertificateSshArgs
    Defines a ssh certificate.
    https Property Map
    Defines a https certificate.
    ssh Property Map
    Defines a ssh certificate.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RepositoryCertificate 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 RepositoryCertificate Resource

    Get an existing RepositoryCertificate 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?: RepositoryCertificateState, opts?: CustomResourceOptions): RepositoryCertificate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            https: Optional[RepositoryCertificateHttpsArgs] = None,
            ssh: Optional[RepositoryCertificateSshArgs] = None) -> RepositoryCertificate
    func GetRepositoryCertificate(ctx *Context, name string, id IDInput, state *RepositoryCertificateState, opts ...ResourceOption) (*RepositoryCertificate, error)
    public static RepositoryCertificate Get(string name, Input<string> id, RepositoryCertificateState? state, CustomResourceOptions? opts = null)
    public static RepositoryCertificate get(String name, Output<String> id, RepositoryCertificateState state, CustomResourceOptions options)
    resources:  _:    type: argocd:RepositoryCertificate    get:      id: ${id}
    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:
    Https RepositoryCertificateHttpsArgs
    Defines a https certificate.
    Ssh RepositoryCertificateSshArgs
    Defines a ssh certificate.
    https RepositoryCertificateHttps
    Defines a https certificate.
    ssh RepositoryCertificateSsh
    Defines a ssh certificate.
    https RepositoryCertificateHttps
    Defines a https certificate.
    ssh RepositoryCertificateSsh
    Defines a ssh certificate.
    https RepositoryCertificateHttpsArgs
    Defines a https certificate.
    ssh RepositoryCertificateSshArgs
    Defines a ssh certificate.
    https Property Map
    Defines a https certificate.
    ssh Property Map
    Defines a ssh certificate.

    Supporting Types

    RepositoryCertificateHttps, RepositoryCertificateHttpsArgs

    CertData string
    The actual certificate data, dependent on the certificate type.
    ServerName string
    DNS name of the server this certificate is intended for.
    CertInfo string
    Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName).
    CertSubtype string
    The sub type of the cert, i.e. ssh-rsa.
    CertData string
    The actual certificate data, dependent on the certificate type.
    ServerName string
    DNS name of the server this certificate is intended for.
    CertInfo string
    Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName).
    CertSubtype string
    The sub type of the cert, i.e. ssh-rsa.
    certData String
    The actual certificate data, dependent on the certificate type.
    serverName String
    DNS name of the server this certificate is intended for.
    certInfo String
    Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName).
    certSubtype String
    The sub type of the cert, i.e. ssh-rsa.
    certData string
    The actual certificate data, dependent on the certificate type.
    serverName string
    DNS name of the server this certificate is intended for.
    certInfo string
    Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName).
    certSubtype string
    The sub type of the cert, i.e. ssh-rsa.
    cert_data str
    The actual certificate data, dependent on the certificate type.
    server_name str
    DNS name of the server this certificate is intended for.
    cert_info str
    Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName).
    cert_subtype str
    The sub type of the cert, i.e. ssh-rsa.
    certData String
    The actual certificate data, dependent on the certificate type.
    serverName String
    DNS name of the server this certificate is intended for.
    certInfo String
    Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName).
    certSubtype String
    The sub type of the cert, i.e. ssh-rsa.

    RepositoryCertificateSsh, RepositoryCertificateSshArgs

    CertData string
    The actual certificate data, dependent on the certificate type.
    CertSubtype string
    The sub type of the cert, i.e. ssh-rsa.
    ServerName string
    DNS name of the server this certificate is intended for.
    CertInfo string
    Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName).
    CertData string
    The actual certificate data, dependent on the certificate type.
    CertSubtype string
    The sub type of the cert, i.e. ssh-rsa.
    ServerName string
    DNS name of the server this certificate is intended for.
    CertInfo string
    Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName).
    certData String
    The actual certificate data, dependent on the certificate type.
    certSubtype String
    The sub type of the cert, i.e. ssh-rsa.
    serverName String
    DNS name of the server this certificate is intended for.
    certInfo String
    Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName).
    certData string
    The actual certificate data, dependent on the certificate type.
    certSubtype string
    The sub type of the cert, i.e. ssh-rsa.
    serverName string
    DNS name of the server this certificate is intended for.
    certInfo string
    Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName).
    cert_data str
    The actual certificate data, dependent on the certificate type.
    cert_subtype str
    The sub type of the cert, i.e. ssh-rsa.
    server_name str
    DNS name of the server this certificate is intended for.
    cert_info str
    Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName).
    certData String
    The actual certificate data, dependent on the certificate type.
    certSubtype String
    The sub type of the cert, i.e. ssh-rsa.
    serverName String
    DNS name of the server this certificate is intended for.
    certInfo String
    Additional certificate info, dependent on the certificate type (e.g. SSH fingerprint, X509 CommonName).

    Package Details

    Repository
    argocd Three141/pulumi-argocd
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the argocd Terraform Provider.
    argocd logo
    Argo CD v1.0.1 published on Friday, Feb 21, 2025 by Three141