1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. InfraProvider
Viewing docs for Harness v0.11.6
published on Thursday, Mar 12, 2026 by Pulumi
harness logo
Viewing docs for Harness v0.11.6
published on Thursday, Mar 12, 2026 by Pulumi

    Resource for managing Terraform/OpenTofu Providers in the IaCM Provider Registry.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    const aws = new harness.platform.InfraProvider("aws", {
        type: "aws",
        description: "AWS provider for IaCM",
    });
    const azurerm = new harness.platform.InfraProvider("azurerm", {
        type: "azurerm",
        description: "Azure provider for IaCM",
    });
    const google = new harness.platform.InfraProvider("google", {
        type: "google",
        description: "Google Cloud provider for IaCM",
    });
    
    import pulumi
    import pulumi_harness as harness
    
    aws = harness.platform.InfraProvider("aws",
        type="aws",
        description="AWS provider for IaCM")
    azurerm = harness.platform.InfraProvider("azurerm",
        type="azurerm",
        description="Azure provider for IaCM")
    google = harness.platform.InfraProvider("google",
        type="google",
        description="Google Cloud provider for IaCM")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := platform.NewInfraProvider(ctx, "aws", &platform.InfraProviderArgs{
    			Type:        pulumi.String("aws"),
    			Description: pulumi.String("AWS provider for IaCM"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = platform.NewInfraProvider(ctx, "azurerm", &platform.InfraProviderArgs{
    			Type:        pulumi.String("azurerm"),
    			Description: pulumi.String("Azure provider for IaCM"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = platform.NewInfraProvider(ctx, "google", &platform.InfraProviderArgs{
    			Type:        pulumi.String("google"),
    			Description: pulumi.String("Google Cloud provider for IaCM"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var aws = new Harness.Platform.InfraProvider("aws", new()
        {
            Type = "aws",
            Description = "AWS provider for IaCM",
        });
    
        var azurerm = new Harness.Platform.InfraProvider("azurerm", new()
        {
            Type = "azurerm",
            Description = "Azure provider for IaCM",
        });
    
        var google = new Harness.Platform.InfraProvider("google", new()
        {
            Type = "google",
            Description = "Google Cloud provider for IaCM",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harness.platform.InfraProvider;
    import com.pulumi.harness.platform.InfraProviderArgs;
    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 aws = new InfraProvider("aws", InfraProviderArgs.builder()
                .type("aws")
                .description("AWS provider for IaCM")
                .build());
    
            var azurerm = new InfraProvider("azurerm", InfraProviderArgs.builder()
                .type("azurerm")
                .description("Azure provider for IaCM")
                .build());
    
            var google = new InfraProvider("google", InfraProviderArgs.builder()
                .type("google")
                .description("Google Cloud provider for IaCM")
                .build());
    
        }
    }
    
    resources:
      aws:
        type: harness:platform:InfraProvider
        properties:
          type: aws
          description: AWS provider for IaCM
      azurerm:
        type: harness:platform:InfraProvider
        properties:
          type: azurerm
          description: Azure provider for IaCM
      google:
        type: harness:platform:InfraProvider
        properties:
          type: google
          description: Google Cloud provider for IaCM
    

    Create InfraProvider Resource

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

    Constructor syntax

    new InfraProvider(name: string, args: InfraProviderArgs, opts?: CustomResourceOptions);
    @overload
    def InfraProvider(resource_name: str,
                      args: InfraProviderArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def InfraProvider(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      type: Optional[str] = None,
                      description: Optional[str] = None)
    func NewInfraProvider(ctx *Context, name string, args InfraProviderArgs, opts ...ResourceOption) (*InfraProvider, error)
    public InfraProvider(string name, InfraProviderArgs args, CustomResourceOptions? opts = null)
    public InfraProvider(String name, InfraProviderArgs args)
    public InfraProvider(String name, InfraProviderArgs args, CustomResourceOptions options)
    
    type: harness:platform:InfraProvider
    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 InfraProviderArgs
    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 InfraProviderArgs
    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 InfraProviderArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InfraProviderArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InfraProviderArgs
    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 infraProviderResource = new Harness.Platform.InfraProvider("infraProviderResource", new()
    {
        Type = "string",
        Description = "string",
    });
    
    example, err := platform.NewInfraProvider(ctx, "infraProviderResource", &platform.InfraProviderArgs{
    	Type:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    })
    
    var infraProviderResource = new InfraProvider("infraProviderResource", InfraProviderArgs.builder()
        .type("string")
        .description("string")
        .build());
    
    infra_provider_resource = harness.platform.InfraProvider("infraProviderResource",
        type="string",
        description="string")
    
    const infraProviderResource = new harness.platform.InfraProvider("infraProviderResource", {
        type: "string",
        description: "string",
    });
    
    type: harness:platform:InfraProvider
    properties:
        description: string
        type: string
    

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

    Type string
    Provider type (e.g., aws, azurerm, google).
    Description string
    Description of the provider.
    Type string
    Provider type (e.g., aws, azurerm, google).
    Description string
    Description of the provider.
    type String
    Provider type (e.g., aws, azurerm, google).
    description String
    Description of the provider.
    type string
    Provider type (e.g., aws, azurerm, google).
    description string
    Description of the provider.
    type str
    Provider type (e.g., aws, azurerm, google).
    description str
    Description of the provider.
    type String
    Provider type (e.g., aws, azurerm, google).
    description String
    Description of the provider.

    Outputs

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

    Account string
    Account that owns the provider.
    Created int
    Timestamp when the provider was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Updated int
    Timestamp when the provider was last updated.
    Versions List<InfraProviderVersion>
    List of provider versions.
    Account string
    Account that owns the provider.
    Created int
    Timestamp when the provider was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Updated int
    Timestamp when the provider was last updated.
    Versions []InfraProviderVersionType
    List of provider versions.
    account String
    Account that owns the provider.
    created Integer
    Timestamp when the provider was created.
    id String
    The provider-assigned unique ID for this managed resource.
    updated Integer
    Timestamp when the provider was last updated.
    versions List<InfraProviderVersion>
    List of provider versions.
    account string
    Account that owns the provider.
    created number
    Timestamp when the provider was created.
    id string
    The provider-assigned unique ID for this managed resource.
    updated number
    Timestamp when the provider was last updated.
    versions InfraProviderVersion[]
    List of provider versions.
    account str
    Account that owns the provider.
    created int
    Timestamp when the provider was created.
    id str
    The provider-assigned unique ID for this managed resource.
    updated int
    Timestamp when the provider was last updated.
    versions Sequence[InfraProviderVersion]
    List of provider versions.
    account String
    Account that owns the provider.
    created Number
    Timestamp when the provider was created.
    id String
    The provider-assigned unique ID for this managed resource.
    updated Number
    Timestamp when the provider was last updated.
    versions List<Property Map>
    List of provider versions.

    Look up Existing InfraProvider Resource

    Get an existing InfraProvider 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?: InfraProviderState, opts?: CustomResourceOptions): InfraProvider
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account: Optional[str] = None,
            created: Optional[int] = None,
            description: Optional[str] = None,
            type: Optional[str] = None,
            updated: Optional[int] = None,
            versions: Optional[Sequence[InfraProviderVersionArgs]] = None) -> InfraProvider
    func GetInfraProvider(ctx *Context, name string, id IDInput, state *InfraProviderState, opts ...ResourceOption) (*InfraProvider, error)
    public static InfraProvider Get(string name, Input<string> id, InfraProviderState? state, CustomResourceOptions? opts = null)
    public static InfraProvider get(String name, Output<String> id, InfraProviderState state, CustomResourceOptions options)
    resources:  _:    type: harness:platform:InfraProvider    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:
    Account string
    Account that owns the provider.
    Created int
    Timestamp when the provider was created.
    Description string
    Description of the provider.
    Type string
    Provider type (e.g., aws, azurerm, google).
    Updated int
    Timestamp when the provider was last updated.
    Versions List<InfraProviderVersion>
    List of provider versions.
    Account string
    Account that owns the provider.
    Created int
    Timestamp when the provider was created.
    Description string
    Description of the provider.
    Type string
    Provider type (e.g., aws, azurerm, google).
    Updated int
    Timestamp when the provider was last updated.
    Versions []InfraProviderVersionTypeArgs
    List of provider versions.
    account String
    Account that owns the provider.
    created Integer
    Timestamp when the provider was created.
    description String
    Description of the provider.
    type String
    Provider type (e.g., aws, azurerm, google).
    updated Integer
    Timestamp when the provider was last updated.
    versions List<InfraProviderVersion>
    List of provider versions.
    account string
    Account that owns the provider.
    created number
    Timestamp when the provider was created.
    description string
    Description of the provider.
    type string
    Provider type (e.g., aws, azurerm, google).
    updated number
    Timestamp when the provider was last updated.
    versions InfraProviderVersion[]
    List of provider versions.
    account str
    Account that owns the provider.
    created int
    Timestamp when the provider was created.
    description str
    Description of the provider.
    type str
    Provider type (e.g., aws, azurerm, google).
    updated int
    Timestamp when the provider was last updated.
    versions Sequence[InfraProviderVersionArgs]
    List of provider versions.
    account String
    Account that owns the provider.
    created Number
    Timestamp when the provider was created.
    description String
    Description of the provider.
    type String
    Provider type (e.g., aws, azurerm, google).
    updated Number
    Timestamp when the provider was last updated.
    versions List<Property Map>
    List of provider versions.

    Supporting Types

    InfraProviderVersion, InfraProviderVersionArgs

    Files List<string>
    List of uploaded files for this version.
    Synced bool
    Whether the version is synced.
    Version string
    Version number.
    Files []string
    List of uploaded files for this version.
    Synced bool
    Whether the version is synced.
    Version string
    Version number.
    files List<String>
    List of uploaded files for this version.
    synced Boolean
    Whether the version is synced.
    version String
    Version number.
    files string[]
    List of uploaded files for this version.
    synced boolean
    Whether the version is synced.
    version string
    Version number.
    files Sequence[str]
    List of uploaded files for this version.
    synced bool
    Whether the version is synced.
    version str
    Version number.
    files List<String>
    List of uploaded files for this version.
    synced Boolean
    Whether the version is synced.
    version String
    Version number.

    Import

    The pulumi import command can be used, for example:

    $ pulumi import harness:platform/infraProvider:InfraProvider example <provider_id>
    

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

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Viewing docs for Harness v0.11.6
    published on Thursday, Mar 12, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.