1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. InfraProviderVersion
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 Provider Versions in the IaCM Provider Registry.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@pulumi/harness";
    
    // First, create a provider
    const aws = new harness.platform.InfraProvider("aws", {
        type: "aws",
        description: "AWS provider for IaCM",
    });
    // Then create a version for that provider
    const awsV5 = new harness.platform.InfraProviderVersion("aws_v5", {
        providerId: aws.id,
        version: "5.0.0",
        gpgKeyId: "your-gpg-key-id",
        protocols: [
            "5.0",
            "6.0",
        ],
    });
    const awsV4 = new harness.platform.InfraProviderVersion("aws_v4", {
        providerId: aws.id,
        version: "4.67.0",
        gpgKeyId: "your-gpg-key-id",
        protocols: ["5.0"],
    });
    
    import pulumi
    import pulumi_harness as harness
    
    # First, create a provider
    aws = harness.platform.InfraProvider("aws",
        type="aws",
        description="AWS provider for IaCM")
    # Then create a version for that provider
    aws_v5 = harness.platform.InfraProviderVersion("aws_v5",
        provider_id=aws.id,
        version="5.0.0",
        gpg_key_id="your-gpg-key-id",
        protocols=[
            "5.0",
            "6.0",
        ])
    aws_v4 = harness.platform.InfraProviderVersion("aws_v4",
        provider_id=aws.id,
        version="4.67.0",
        gpg_key_id="your-gpg-key-id",
        protocols=["5.0"])
    
    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 {
    		// First, create a provider
    		aws, err := platform.NewInfraProvider(ctx, "aws", &platform.InfraProviderArgs{
    			Type:        pulumi.String("aws"),
    			Description: pulumi.String("AWS provider for IaCM"),
    		})
    		if err != nil {
    			return err
    		}
    		// Then create a version for that provider
    		_, err = platform.NewInfraProviderVersion(ctx, "aws_v5", &platform.InfraProviderVersionArgs{
    			ProviderId: aws.ID(),
    			Version:    pulumi.String("5.0.0"),
    			GpgKeyId:   pulumi.String("your-gpg-key-id"),
    			Protocols: pulumi.StringArray{
    				pulumi.String("5.0"),
    				pulumi.String("6.0"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = platform.NewInfraProviderVersion(ctx, "aws_v4", &platform.InfraProviderVersionArgs{
    			ProviderId: aws.ID(),
    			Version:    pulumi.String("4.67.0"),
    			GpgKeyId:   pulumi.String("your-gpg-key-id"),
    			Protocols: pulumi.StringArray{
    				pulumi.String("5.0"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Pulumi.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        // First, create a provider
        var aws = new Harness.Platform.InfraProvider("aws", new()
        {
            Type = "aws",
            Description = "AWS provider for IaCM",
        });
    
        // Then create a version for that provider
        var awsV5 = new Harness.Platform.InfraProviderVersion("aws_v5", new()
        {
            ProviderId = aws.Id,
            Version = "5.0.0",
            GpgKeyId = "your-gpg-key-id",
            Protocols = new[]
            {
                "5.0",
                "6.0",
            },
        });
    
        var awsV4 = new Harness.Platform.InfraProviderVersion("aws_v4", new()
        {
            ProviderId = aws.Id,
            Version = "4.67.0",
            GpgKeyId = "your-gpg-key-id",
            Protocols = new[]
            {
                "5.0",
            },
        });
    
    });
    
    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 com.pulumi.harness.platform.InfraProviderVersion;
    import com.pulumi.harness.platform.InfraProviderVersionArgs;
    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) {
            // First, create a provider
            var aws = new InfraProvider("aws", InfraProviderArgs.builder()
                .type("aws")
                .description("AWS provider for IaCM")
                .build());
    
            // Then create a version for that provider
            var awsV5 = new InfraProviderVersion("awsV5", InfraProviderVersionArgs.builder()
                .providerId(aws.id())
                .version("5.0.0")
                .gpgKeyId("your-gpg-key-id")
                .protocols(            
                    "5.0",
                    "6.0")
                .build());
    
            var awsV4 = new InfraProviderVersion("awsV4", InfraProviderVersionArgs.builder()
                .providerId(aws.id())
                .version("4.67.0")
                .gpgKeyId("your-gpg-key-id")
                .protocols("5.0")
                .build());
    
        }
    }
    
    resources:
      # First, create a provider
      aws:
        type: harness:platform:InfraProvider
        properties:
          type: aws
          description: AWS provider for IaCM
      # Then create a version for that provider
      awsV5:
        type: harness:platform:InfraProviderVersion
        name: aws_v5
        properties:
          providerId: ${aws.id}
          version: 5.0.0
          gpgKeyId: your-gpg-key-id
          protocols:
            - '5.0'
            - '6.0'
      awsV4:
        type: harness:platform:InfraProviderVersion
        name: aws_v4
        properties:
          providerId: ${aws.id}
          version: 4.67.0
          gpgKeyId: your-gpg-key-id
          protocols:
            - '5.0'
    

    Create InfraProviderVersion Resource

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

    Constructor syntax

    new InfraProviderVersion(name: string, args: InfraProviderVersionArgs, opts?: CustomResourceOptions);
    @overload
    def InfraProviderVersion(resource_name: str,
                             args: InfraProviderVersionInitArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def InfraProviderVersion(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             gpg_key_id: Optional[str] = None,
                             protocols: Optional[Sequence[str]] = None,
                             provider_id: Optional[str] = None,
                             version: Optional[str] = None)
    func NewInfraProviderVersion(ctx *Context, name string, args InfraProviderVersionArgs, opts ...ResourceOption) (*InfraProviderVersion, error)
    public InfraProviderVersion(string name, InfraProviderVersionArgs args, CustomResourceOptions? opts = null)
    public InfraProviderVersion(String name, InfraProviderVersionArgs args)
    public InfraProviderVersion(String name, InfraProviderVersionArgs args, CustomResourceOptions options)
    
    type: harness:platform:InfraProviderVersion
    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 InfraProviderVersionArgs
    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 InfraProviderVersionInitArgs
    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 InfraProviderVersionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InfraProviderVersionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InfraProviderVersionArgs
    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 infraProviderVersionResource = new Harness.Platform.InfraProviderVersion("infraProviderVersionResource", new()
    {
        GpgKeyId = "string",
        Protocols = new[]
        {
            "string",
        },
        ProviderId = "string",
        Version = "string",
    });
    
    example, err := platform.NewInfraProviderVersion(ctx, "infraProviderVersionResource", &platform.InfraProviderVersionArgs{
    	GpgKeyId: pulumi.String("string"),
    	Protocols: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ProviderId: pulumi.String("string"),
    	Version:    pulumi.String("string"),
    })
    
    var infraProviderVersionResource = new InfraProviderVersion("infraProviderVersionResource", InfraProviderVersionArgs.builder()
        .gpgKeyId("string")
        .protocols("string")
        .providerId("string")
        .version("string")
        .build());
    
    infra_provider_version_resource = harness.platform.InfraProviderVersion("infraProviderVersionResource",
        gpg_key_id="string",
        protocols=["string"],
        provider_id="string",
        version="string")
    
    const infraProviderVersionResource = new harness.platform.InfraProviderVersion("infraProviderVersionResource", {
        gpgKeyId: "string",
        protocols: ["string"],
        providerId: "string",
        version: "string",
    });
    
    type: harness:platform:InfraProviderVersion
    properties:
        gpgKeyId: string
        protocols:
            - string
        providerId: string
        version: string
    

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

    GpgKeyId string
    GPG key ID for signing.
    Protocols List<string>
    Supported Terraform protocol versions (e.g., ['5.0', '6.0']).
    ProviderId string
    The ID of the provider this version belongs to.
    Version string
    Version number (e.g., 1.0.0).
    GpgKeyId string
    GPG key ID for signing.
    Protocols []string
    Supported Terraform protocol versions (e.g., ['5.0', '6.0']).
    ProviderId string
    The ID of the provider this version belongs to.
    Version string
    Version number (e.g., 1.0.0).
    gpgKeyId String
    GPG key ID for signing.
    protocols List<String>
    Supported Terraform protocol versions (e.g., ['5.0', '6.0']).
    providerId String
    The ID of the provider this version belongs to.
    version String
    Version number (e.g., 1.0.0).
    gpgKeyId string
    GPG key ID for signing.
    protocols string[]
    Supported Terraform protocol versions (e.g., ['5.0', '6.0']).
    providerId string
    The ID of the provider this version belongs to.
    version string
    Version number (e.g., 1.0.0).
    gpg_key_id str
    GPG key ID for signing.
    protocols Sequence[str]
    Supported Terraform protocol versions (e.g., ['5.0', '6.0']).
    provider_id str
    The ID of the provider this version belongs to.
    version str
    Version number (e.g., 1.0.0).
    gpgKeyId String
    GPG key ID for signing.
    protocols List<String>
    Supported Terraform protocol versions (e.g., ['5.0', '6.0']).
    providerId String
    The ID of the provider this version belongs to.
    version String
    Version number (e.g., 1.0.0).

    Outputs

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

    Get an existing InfraProviderVersion 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?: InfraProviderVersionState, opts?: CustomResourceOptions): InfraProviderVersion
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            gpg_key_id: Optional[str] = None,
            protocols: Optional[Sequence[str]] = None,
            provider_id: Optional[str] = None,
            version: Optional[str] = None) -> InfraProviderVersion
    func GetInfraProviderVersion(ctx *Context, name string, id IDInput, state *InfraProviderVersionState, opts ...ResourceOption) (*InfraProviderVersion, error)
    public static InfraProviderVersion Get(string name, Input<string> id, InfraProviderVersionState? state, CustomResourceOptions? opts = null)
    public static InfraProviderVersion get(String name, Output<String> id, InfraProviderVersionState state, CustomResourceOptions options)
    resources:  _:    type: harness:platform:InfraProviderVersion    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:
    GpgKeyId string
    GPG key ID for signing.
    Protocols List<string>
    Supported Terraform protocol versions (e.g., ['5.0', '6.0']).
    ProviderId string
    The ID of the provider this version belongs to.
    Version string
    Version number (e.g., 1.0.0).
    GpgKeyId string
    GPG key ID for signing.
    Protocols []string
    Supported Terraform protocol versions (e.g., ['5.0', '6.0']).
    ProviderId string
    The ID of the provider this version belongs to.
    Version string
    Version number (e.g., 1.0.0).
    gpgKeyId String
    GPG key ID for signing.
    protocols List<String>
    Supported Terraform protocol versions (e.g., ['5.0', '6.0']).
    providerId String
    The ID of the provider this version belongs to.
    version String
    Version number (e.g., 1.0.0).
    gpgKeyId string
    GPG key ID for signing.
    protocols string[]
    Supported Terraform protocol versions (e.g., ['5.0', '6.0']).
    providerId string
    The ID of the provider this version belongs to.
    version string
    Version number (e.g., 1.0.0).
    gpg_key_id str
    GPG key ID for signing.
    protocols Sequence[str]
    Supported Terraform protocol versions (e.g., ['5.0', '6.0']).
    provider_id str
    The ID of the provider this version belongs to.
    version str
    Version number (e.g., 1.0.0).
    gpgKeyId String
    GPG key ID for signing.
    protocols List<String>
    Supported Terraform protocol versions (e.g., ['5.0', '6.0']).
    providerId String
    The ID of the provider this version belongs to.
    version String
    Version number (e.g., 1.0.0).

    Import

    The pulumi import command can be used, for example:

    $ pulumi import harness:platform/infraProviderVersion:InfraProviderVersion example <provider_id>/<version>
    

    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.