1. Packages
  2. Harness
  3. API Docs
  4. cloudprovider
  5. Tanzu
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

harness.cloudprovider.Tanzu

Explore with Pulumi AI

harness logo
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

    Resource for creating a Tanzu cloud provider. This resource uses the config-as-code API’s. When updating the name or path of this resource you should typically also set the create_before_destroy = true lifecycle setting.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Lbrlabs.PulumiPackage.Harness;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Harness.GetSecretManager.Invoke(new()
        {
            Default = true,
        });
    
        var tanzuPassword = new Harness.EncryptedText("tanzuPassword", new()
        {
            Value = "<PASSWORD>",
            SecretManagerId = @default.Apply(@default => @default.Apply(getSecretManagerResult => getSecretManagerResult.Id)),
        });
    
        var example = new Harness.Cloudprovider.Tanzu("example", new()
        {
            Endpoint = "https://endpoint.com",
            SkipValidation = true,
            Username = "<USERNAME>",
            PasswordSecretName = tanzuPassword.Name,
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-harness/sdk/go/harness"
    	"github.com/lbrlabs/pulumi-harness/sdk/go/harness/cloudprovider"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := harness.GetSecretManager(ctx, &harness.GetSecretManagerArgs{
    			Default: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		tanzuPassword, err := harness.NewEncryptedText(ctx, "tanzuPassword", &harness.EncryptedTextArgs{
    			Value:           pulumi.String("<PASSWORD>"),
    			SecretManagerId: *pulumi.String(_default.Id),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cloudprovider.NewTanzu(ctx, "example", &cloudprovider.TanzuArgs{
    			Endpoint:           pulumi.String("https://endpoint.com"),
    			SkipValidation:     pulumi.Bool(true),
    			Username:           pulumi.String("<USERNAME>"),
    			PasswordSecretName: tanzuPassword.Name,
    		})
    		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.harness.HarnessFunctions;
    import com.pulumi.harness.inputs.GetSecretManagerArgs;
    import com.pulumi.harness.EncryptedText;
    import com.pulumi.harness.EncryptedTextArgs;
    import com.pulumi.harness.cloudprovider.Tanzu;
    import com.pulumi.harness.cloudprovider.TanzuArgs;
    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) {
            final var default = HarnessFunctions.getSecretManager(GetSecretManagerArgs.builder()
                .default_(true)
                .build());
    
            var tanzuPassword = new EncryptedText("tanzuPassword", EncryptedTextArgs.builder()        
                .value("<PASSWORD>")
                .secretManagerId(default_.id())
                .build());
    
            var example = new Tanzu("example", TanzuArgs.builder()        
                .endpoint("https://endpoint.com")
                .skipValidation(true)
                .username("<USERNAME>")
                .passwordSecretName(tanzuPassword.name())
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_harness as harness
    import pulumi_harness as harness
    
    default = harness.get_secret_manager(default=True)
    tanzu_password = harness.EncryptedText("tanzuPassword",
        value="<PASSWORD>",
        secret_manager_id=default.id)
    example = harness.cloudprovider.Tanzu("example",
        endpoint="https://endpoint.com",
        skip_validation=True,
        username="<USERNAME>",
        password_secret_name=tanzu_password.name)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@lbrlabs/pulumi-harness";
    import * as harness from "@pulumi/harness";
    
    const default = harness.getSecretManager({
        "default": true,
    });
    const tanzuPassword = new harness.EncryptedText("tanzuPassword", {
        value: "<PASSWORD>",
        secretManagerId: _default.then(_default => _default.id),
    });
    const example = new harness.cloudprovider.Tanzu("example", {
        endpoint: "https://endpoint.com",
        skipValidation: true,
        username: "<USERNAME>",
        passwordSecretName: tanzuPassword.name,
    });
    
    resources:
      tanzuPassword:
        type: harness:EncryptedText
        properties:
          value: <PASSWORD>
          secretManagerId: ${default.id}
      example:
        type: harness:cloudprovider:Tanzu
        properties:
          endpoint: https://endpoint.com
          skipValidation: true
          username: <USERNAME>
          passwordSecretName: ${tanzuPassword.name}
    variables:
      default:
        fn::invoke:
          Function: harness:getSecretManager
          Arguments:
            default: true
    

    Create Tanzu Resource

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

    Constructor syntax

    new Tanzu(name: string, args: TanzuArgs, opts?: CustomResourceOptions);
    @overload
    def Tanzu(resource_name: str,
              args: TanzuArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Tanzu(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              endpoint: Optional[str] = None,
              password_secret_name: Optional[str] = None,
              name: Optional[str] = None,
              skip_validation: Optional[bool] = None,
              username: Optional[str] = None,
              username_secret_name: Optional[str] = None)
    func NewTanzu(ctx *Context, name string, args TanzuArgs, opts ...ResourceOption) (*Tanzu, error)
    public Tanzu(string name, TanzuArgs args, CustomResourceOptions? opts = null)
    public Tanzu(String name, TanzuArgs args)
    public Tanzu(String name, TanzuArgs args, CustomResourceOptions options)
    
    type: harness:cloudprovider:Tanzu
    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 TanzuArgs
    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 TanzuArgs
    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 TanzuArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TanzuArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TanzuArgs
    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 tanzuResource = new Harness.Cloudprovider.Tanzu("tanzuResource", new()
    {
        Endpoint = "string",
        PasswordSecretName = "string",
        Name = "string",
        SkipValidation = false,
        Username = "string",
        UsernameSecretName = "string",
    });
    
    example, err := cloudprovider.NewTanzu(ctx, "tanzuResource", &cloudprovider.TanzuArgs{
    	Endpoint:           pulumi.String("string"),
    	PasswordSecretName: pulumi.String("string"),
    	Name:               pulumi.String("string"),
    	SkipValidation:     pulumi.Bool(false),
    	Username:           pulumi.String("string"),
    	UsernameSecretName: pulumi.String("string"),
    })
    
    var tanzuResource = new Tanzu("tanzuResource", TanzuArgs.builder()        
        .endpoint("string")
        .passwordSecretName("string")
        .name("string")
        .skipValidation(false)
        .username("string")
        .usernameSecretName("string")
        .build());
    
    tanzu_resource = harness.cloudprovider.Tanzu("tanzuResource",
        endpoint="string",
        password_secret_name="string",
        name="string",
        skip_validation=False,
        username="string",
        username_secret_name="string")
    
    const tanzuResource = new harness.cloudprovider.Tanzu("tanzuResource", {
        endpoint: "string",
        passwordSecretName: "string",
        name: "string",
        skipValidation: false,
        username: "string",
        usernameSecretName: "string",
    });
    
    type: harness:cloudprovider:Tanzu
    properties:
        endpoint: string
        name: string
        passwordSecretName: string
        skipValidation: false
        username: string
        usernameSecretName: string
    

    Tanzu 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 Tanzu resource accepts the following input properties:

    Endpoint string
    The url of the Tanzu platform.
    PasswordSecretName string
    The name of the Harness secret containing the password to use to authenticate to Tanzu.
    Name string
    The name of the cloud provider.
    SkipValidation bool
    Skip validation of Tanzu configuration.
    Username string
    The username to use to authenticate to Tanzu.
    UsernameSecretName string
    The name of the Harness secret containing the username to authenticate to Tanzu with.
    Endpoint string
    The url of the Tanzu platform.
    PasswordSecretName string
    The name of the Harness secret containing the password to use to authenticate to Tanzu.
    Name string
    The name of the cloud provider.
    SkipValidation bool
    Skip validation of Tanzu configuration.
    Username string
    The username to use to authenticate to Tanzu.
    UsernameSecretName string
    The name of the Harness secret containing the username to authenticate to Tanzu with.
    endpoint String
    The url of the Tanzu platform.
    passwordSecretName String
    The name of the Harness secret containing the password to use to authenticate to Tanzu.
    name String
    The name of the cloud provider.
    skipValidation Boolean
    Skip validation of Tanzu configuration.
    username String
    The username to use to authenticate to Tanzu.
    usernameSecretName String
    The name of the Harness secret containing the username to authenticate to Tanzu with.
    endpoint string
    The url of the Tanzu platform.
    passwordSecretName string
    The name of the Harness secret containing the password to use to authenticate to Tanzu.
    name string
    The name of the cloud provider.
    skipValidation boolean
    Skip validation of Tanzu configuration.
    username string
    The username to use to authenticate to Tanzu.
    usernameSecretName string
    The name of the Harness secret containing the username to authenticate to Tanzu with.
    endpoint str
    The url of the Tanzu platform.
    password_secret_name str
    The name of the Harness secret containing the password to use to authenticate to Tanzu.
    name str
    The name of the cloud provider.
    skip_validation bool
    Skip validation of Tanzu configuration.
    username str
    The username to use to authenticate to Tanzu.
    username_secret_name str
    The name of the Harness secret containing the username to authenticate to Tanzu with.
    endpoint String
    The url of the Tanzu platform.
    passwordSecretName String
    The name of the Harness secret containing the password to use to authenticate to Tanzu.
    name String
    The name of the cloud provider.
    skipValidation Boolean
    Skip validation of Tanzu configuration.
    username String
    The username to use to authenticate to Tanzu.
    usernameSecretName String
    The name of the Harness secret containing the username to authenticate to Tanzu with.

    Outputs

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

    Get an existing Tanzu 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?: TanzuState, opts?: CustomResourceOptions): Tanzu
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            endpoint: Optional[str] = None,
            name: Optional[str] = None,
            password_secret_name: Optional[str] = None,
            skip_validation: Optional[bool] = None,
            username: Optional[str] = None,
            username_secret_name: Optional[str] = None) -> Tanzu
    func GetTanzu(ctx *Context, name string, id IDInput, state *TanzuState, opts ...ResourceOption) (*Tanzu, error)
    public static Tanzu Get(string name, Input<string> id, TanzuState? state, CustomResourceOptions? opts = null)
    public static Tanzu get(String name, Output<String> id, TanzuState 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:
    Endpoint string
    The url of the Tanzu platform.
    Name string
    The name of the cloud provider.
    PasswordSecretName string
    The name of the Harness secret containing the password to use to authenticate to Tanzu.
    SkipValidation bool
    Skip validation of Tanzu configuration.
    Username string
    The username to use to authenticate to Tanzu.
    UsernameSecretName string
    The name of the Harness secret containing the username to authenticate to Tanzu with.
    Endpoint string
    The url of the Tanzu platform.
    Name string
    The name of the cloud provider.
    PasswordSecretName string
    The name of the Harness secret containing the password to use to authenticate to Tanzu.
    SkipValidation bool
    Skip validation of Tanzu configuration.
    Username string
    The username to use to authenticate to Tanzu.
    UsernameSecretName string
    The name of the Harness secret containing the username to authenticate to Tanzu with.
    endpoint String
    The url of the Tanzu platform.
    name String
    The name of the cloud provider.
    passwordSecretName String
    The name of the Harness secret containing the password to use to authenticate to Tanzu.
    skipValidation Boolean
    Skip validation of Tanzu configuration.
    username String
    The username to use to authenticate to Tanzu.
    usernameSecretName String
    The name of the Harness secret containing the username to authenticate to Tanzu with.
    endpoint string
    The url of the Tanzu platform.
    name string
    The name of the cloud provider.
    passwordSecretName string
    The name of the Harness secret containing the password to use to authenticate to Tanzu.
    skipValidation boolean
    Skip validation of Tanzu configuration.
    username string
    The username to use to authenticate to Tanzu.
    usernameSecretName string
    The name of the Harness secret containing the username to authenticate to Tanzu with.
    endpoint str
    The url of the Tanzu platform.
    name str
    The name of the cloud provider.
    password_secret_name str
    The name of the Harness secret containing the password to use to authenticate to Tanzu.
    skip_validation bool
    Skip validation of Tanzu configuration.
    username str
    The username to use to authenticate to Tanzu.
    username_secret_name str
    The name of the Harness secret containing the username to authenticate to Tanzu with.
    endpoint String
    The url of the Tanzu platform.
    name String
    The name of the cloud provider.
    passwordSecretName String
    The name of the Harness secret containing the password to use to authenticate to Tanzu.
    skipValidation Boolean
    Skip validation of Tanzu configuration.
    username String
    The username to use to authenticate to Tanzu.
    usernameSecretName String
    The name of the Harness secret containing the username to authenticate to Tanzu with.

    Import

    Import using the Harness Tanzu cloud provider id.

     $ pulumi import harness:cloudprovider/tanzu:Tanzu example <provider_id>
    

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

    Package Details

    Repository
    harness lbrlabs/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs