Data source for listing Terraform/OpenTofu Provider Versions from the IaCM Provider Registry.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
import * as std from "@pulumi/std";
const awsVersions = harness.platform.getInfraProviderVersions({
account: "your-account-id",
type: "aws",
});
export const allAwsVersions = awsVersions.then(awsVersions => awsVersions.versions);
const v6CompatibleVersions = Promise.all([awsVersions, std.contains({
input: v.protocols,
element: "6.0",
})]).then(([awsVersions, invoke]) => .filter(v => invoke.result).map(v => (v)));
import pulumi
import pulumi_harness as harness
import pulumi_std as std
aws_versions = harness.platform.get_infra_provider_versions(account="your-account-id",
type="aws")
pulumi.export("allAwsVersions", aws_versions.versions)
v6_compatible_versions = [v for v in aws_versions.versions if std.contains(input=v.protocols,
element="6.0").result]
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var awsVersions = Harness.Platform.GetInfraProviderVersions.Invoke(new()
{
Account = "your-account-id",
Type = "aws",
});
var v6CompatibleVersions = Output.Tuple(awsVersions, Std.Contains.Invoke(new()
{
Input = v.Protocols,
Element = "6.0",
})).Apply(values =>
{
var awsVersions = values.Item1;
var invoke = values.Item2;
return ;
});
return new Dictionary<string, object?>
{
["allAwsVersions"] = awsVersions.Apply(getInfraProviderVersionsResult => getInfraProviderVersionsResult.Versions),
};
});
Example coming soon!
Example coming soon!
Using getInfraProviderVersions
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 getInfraProviderVersions(args: GetInfraProviderVersionsArgs, opts?: InvokeOptions): Promise<GetInfraProviderVersionsResult>
function getInfraProviderVersionsOutput(args: GetInfraProviderVersionsOutputArgs, opts?: InvokeOptions): Output<GetInfraProviderVersionsResult>def get_infra_provider_versions(account: Optional[str] = None,
type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInfraProviderVersionsResult
def get_infra_provider_versions_output(account: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInfraProviderVersionsResult]func GetInfraProviderVersions(ctx *Context, args *GetInfraProviderVersionsArgs, opts ...InvokeOption) (*GetInfraProviderVersionsResult, error)
func GetInfraProviderVersionsOutput(ctx *Context, args *GetInfraProviderVersionsOutputArgs, opts ...InvokeOption) GetInfraProviderVersionsResultOutput> Note: This function is named GetInfraProviderVersions in the Go SDK.
public static class GetInfraProviderVersions
{
public static Task<GetInfraProviderVersionsResult> InvokeAsync(GetInfraProviderVersionsArgs args, InvokeOptions? opts = null)
public static Output<GetInfraProviderVersionsResult> Invoke(GetInfraProviderVersionsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetInfraProviderVersionsResult> getInfraProviderVersions(GetInfraProviderVersionsArgs args, InvokeOptions options)
public static Output<GetInfraProviderVersionsResult> getInfraProviderVersions(GetInfraProviderVersionsArgs args, InvokeOptions options)
fn::invoke:
function: harness:platform/getInfraProviderVersions:getInfraProviderVersions
arguments:
# arguments dictionaryThe following arguments are supported:
getInfraProviderVersions Result
The following output properties are available:
- Account string
- Account identifier.
- Id string
- The provider-assigned unique ID for this managed resource.
- Type string
- Provider type (e.g., aws, azurerm, google).
- Versions
List<Get
Infra Provider Versions Version> - List of provider versions.
- Account string
- Account identifier.
- Id string
- The provider-assigned unique ID for this managed resource.
- Type string
- Provider type (e.g., aws, azurerm, google).
- Versions
[]Get
Infra Provider Versions Version - List of provider versions.
- account String
- Account identifier.
- id String
- The provider-assigned unique ID for this managed resource.
- type String
- Provider type (e.g., aws, azurerm, google).
- versions
List<Get
Infra Provider Versions Version> - List of provider versions.
- account string
- Account identifier.
- id string
- The provider-assigned unique ID for this managed resource.
- type string
- Provider type (e.g., aws, azurerm, google).
- versions
Get
Infra Provider Versions Version[] - List of provider versions.
- account str
- Account identifier.
- id str
- The provider-assigned unique ID for this managed resource.
- type str
- Provider type (e.g., aws, azurerm, google).
- versions
Sequence[Get
Infra Provider Versions Version] - List of provider versions.
- account String
- Account identifier.
- id String
- The provider-assigned unique ID for this managed resource.
- type String
- Provider type (e.g., aws, azurerm, google).
- versions List<Property Map>
- List of provider versions.
Supporting Types
GetInfraProviderVersionsVersion
- Platforms
List<Get
Infra Provider Versions Version Platform> - Supported platforms.
- Protocols List<string>
- Supported Terraform protocol versions.
- Version string
- Version number.
- Platforms
[]Get
Infra Provider Versions Version Platform - Supported platforms.
- Protocols []string
- Supported Terraform protocol versions.
- Version string
- Version number.
- platforms
List<Get
Infra Provider Versions Version Platform> - Supported platforms.
- protocols List<String>
- Supported Terraform protocol versions.
- version String
- Version number.
- platforms
Get
Infra Provider Versions Version Platform[] - Supported platforms.
- protocols string[]
- Supported Terraform protocol versions.
- version string
- Version number.
- platforms
Sequence[Get
Infra Provider Versions Version Platform] - Supported platforms.
- protocols Sequence[str]
- Supported Terraform protocol versions.
- version str
- Version number.
- platforms List<Property Map>
- Supported platforms.
- protocols List<String>
- Supported Terraform protocol versions.
- version String
- Version number.
GetInfraProviderVersionsVersionPlatform
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
