Viewing docs for Harness v0.11.6
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
Viewing docs for Harness v0.11.6
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
Data source for retrieving a Terraform/OpenTofu Provider from the IaCM Provider Registry.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const aws = harness.platform.getInfraProvider({
id: "123",
});
export const providerType = aws.then(aws => aws.type);
export const providerVersions = aws.then(aws => aws.versions);
import pulumi
import pulumi_harness as harness
aws = harness.platform.get_infra_provider(id="123")
pulumi.export("providerType", aws.type)
pulumi.export("providerVersions", aws.versions)
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 {
aws, err := platform.LookupInfraProvider(ctx, &platform.LookupInfraProviderArgs{
Id: "123",
}, nil)
if err != nil {
return err
}
ctx.Export("providerType", aws.Type)
ctx.Export("providerVersions", aws.Versions)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var aws = Harness.Platform.GetInfraProvider.Invoke(new()
{
Id = "123",
});
return new Dictionary<string, object?>
{
["providerType"] = aws.Apply(getInfraProviderResult => getInfraProviderResult.Type),
["providerVersions"] = aws.Apply(getInfraProviderResult => getInfraProviderResult.Versions),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.PlatformFunctions;
import com.pulumi.harness.platform.inputs.GetInfraProviderArgs;
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 aws = PlatformFunctions.getInfraProvider(GetInfraProviderArgs.builder()
.id("123")
.build());
ctx.export("providerType", aws.type());
ctx.export("providerVersions", aws.versions());
}
}
variables:
aws:
fn::invoke:
function: harness:platform:getInfraProvider
arguments:
id: '123'
outputs:
providerType: ${aws.type}
providerVersions: ${aws.versions}
Using getInfraProvider
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getInfraProvider(args: GetInfraProviderArgs, opts?: InvokeOptions): Promise<GetInfraProviderResult>
function getInfraProviderOutput(args: GetInfraProviderOutputArgs, opts?: InvokeOptions): Output<GetInfraProviderResult>def get_infra_provider(id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInfraProviderResult
def get_infra_provider_output(id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInfraProviderResult]func LookupInfraProvider(ctx *Context, args *LookupInfraProviderArgs, opts ...InvokeOption) (*LookupInfraProviderResult, error)
func LookupInfraProviderOutput(ctx *Context, args *LookupInfraProviderOutputArgs, opts ...InvokeOption) LookupInfraProviderResultOutput> Note: This function is named LookupInfraProvider in the Go SDK.
public static class GetInfraProvider
{
public static Task<GetInfraProviderResult> InvokeAsync(GetInfraProviderArgs args, InvokeOptions? opts = null)
public static Output<GetInfraProviderResult> Invoke(GetInfraProviderInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetInfraProviderResult> getInfraProvider(GetInfraProviderArgs args, InvokeOptions options)
public static Output<GetInfraProviderResult> getInfraProvider(GetInfraProviderArgs args, InvokeOptions options)
fn::invoke:
function: harness:platform/getInfraProvider:getInfraProvider
arguments:
# arguments dictionaryThe following arguments are supported:
- Id string
- Unique identifier of the provider.
- Id string
- Unique identifier of the provider.
- id String
- Unique identifier of the provider.
- id string
- Unique identifier of the provider.
- id str
- Unique identifier of the provider.
- id String
- Unique identifier of the provider.
getInfraProvider Result
The following output properties are available:
- Account string
- Account that owns the provider.
- Created int
- Timestamp when the provider was created.
- Description string
- Description of the provider.
- Id string
- Unique identifier of the provider.
- Type string
- Provider type (e.g., aws, azurerm, google).
- Updated int
- Timestamp when the provider was last updated.
- Versions
List<Get
Infra Provider Version> - 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.
- Id string
- Unique identifier of the provider.
- Type string
- Provider type (e.g., aws, azurerm, google).
- Updated int
- Timestamp when the provider was last updated.
- Versions
[]Get
Infra Provider Version Type - 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.
- id String
- Unique identifier of the provider.
- type String
- Provider type (e.g., aws, azurerm, google).
- updated Integer
- Timestamp when the provider was last updated.
- versions
List<Get
Infra Provider Version> - 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.
- id string
- Unique identifier of the provider.
- type string
- Provider type (e.g., aws, azurerm, google).
- updated number
- Timestamp when the provider was last updated.
- versions
Get
Infra Provider Version[] - 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.
- id str
- Unique identifier of the provider.
- type str
- Provider type (e.g., aws, azurerm, google).
- updated int
- Timestamp when the provider was last updated.
- versions
Sequence[Get
Infra Provider Version] - 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.
- id String
- Unique identifier 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
GetInfraProviderVersion
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
Viewing docs for Harness v0.11.6
published on Thursday, Mar 12, 2026 by Pulumi
published on Thursday, Mar 12, 2026 by Pulumi
