Data source for retrieving a specific Terraform/OpenTofu Provider Version from the IaCM Provider Registry.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const awsV5 = harness.platform.getInfraProviderVersion({
providerId: "provider_id",
version: "5.0.0",
});
export const gpgKeyId = awsV5.then(awsV5 => awsV5.gpgKeyId);
export const protocols = awsV5.then(awsV5 => awsV5.protocols);
import pulumi
import pulumi_harness as harness
aws_v5 = harness.platform.get_infra_provider_version(provider_id="provider_id",
version="5.0.0")
pulumi.export("gpgKeyId", aws_v5.gpg_key_id)
pulumi.export("protocols", aws_v5.protocols)
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 {
awsV5, err := platform.LookupInfraProviderVersion(ctx, &platform.LookupInfraProviderVersionArgs{
ProviderId: "provider_id",
Version: "5.0.0",
}, nil)
if err != nil {
return err
}
ctx.Export("gpgKeyId", awsV5.GpgKeyId)
ctx.Export("protocols", awsV5.Protocols)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var awsV5 = Harness.Platform.GetInfraProviderVersion.Invoke(new()
{
ProviderId = "provider_id",
Version = "5.0.0",
});
return new Dictionary<string, object?>
{
["gpgKeyId"] = awsV5.Apply(getInfraProviderVersionResult => getInfraProviderVersionResult.GpgKeyId),
["protocols"] = awsV5.Apply(getInfraProviderVersionResult => getInfraProviderVersionResult.Protocols),
};
});
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.GetInfraProviderVersionArgs;
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 awsV5 = PlatformFunctions.getInfraProviderVersion(GetInfraProviderVersionArgs.builder()
.providerId("provider_id")
.version("5.0.0")
.build());
ctx.export("gpgKeyId", awsV5.gpgKeyId());
ctx.export("protocols", awsV5.protocols());
}
}
variables:
awsV5:
fn::invoke:
function: harness:platform:getInfraProviderVersion
arguments:
providerId: provider_id
version: 5.0.0
outputs:
gpgKeyId: ${awsV5.gpgKeyId}
protocols: ${awsV5.protocols}
Using getInfraProviderVersion
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 getInfraProviderVersion(args: GetInfraProviderVersionArgs, opts?: InvokeOptions): Promise<GetInfraProviderVersionResult>
function getInfraProviderVersionOutput(args: GetInfraProviderVersionOutputArgs, opts?: InvokeOptions): Output<GetInfraProviderVersionResult>def get_infra_provider_version(provider_id: Optional[str] = None,
version: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInfraProviderVersionResult
def get_infra_provider_version_output(provider_id: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInfraProviderVersionResult]func LookupInfraProviderVersion(ctx *Context, args *LookupInfraProviderVersionArgs, opts ...InvokeOption) (*LookupInfraProviderVersionResult, error)
func LookupInfraProviderVersionOutput(ctx *Context, args *LookupInfraProviderVersionOutputArgs, opts ...InvokeOption) LookupInfraProviderVersionResultOutput> Note: This function is named LookupInfraProviderVersion in the Go SDK.
public static class GetInfraProviderVersion
{
public static Task<GetInfraProviderVersionResult> InvokeAsync(GetInfraProviderVersionArgs args, InvokeOptions? opts = null)
public static Output<GetInfraProviderVersionResult> Invoke(GetInfraProviderVersionInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetInfraProviderVersionResult> getInfraProviderVersion(GetInfraProviderVersionArgs args, InvokeOptions options)
public static Output<GetInfraProviderVersionResult> getInfraProviderVersion(GetInfraProviderVersionArgs args, InvokeOptions options)
fn::invoke:
function: harness:platform/getInfraProviderVersion:getInfraProviderVersion
arguments:
# arguments dictionaryThe following arguments are supported:
- Provider
Id string - The ID of the provider this version belongs to.
- Version string
- Version number (e.g., 1.0.0).
- Provider
Id string - The ID of the provider this version belongs to.
- Version string
- Version number (e.g., 1.0.0).
- provider
Id String - The ID of the provider this version belongs to.
- version String
- Version number (e.g., 1.0.0).
- provider
Id string - The ID of the provider this version belongs to.
- version string
- Version number (e.g., 1.0.0).
- provider_
id str - The ID of the provider this version belongs to.
- version str
- Version number (e.g., 1.0.0).
- provider
Id String - The ID of the provider this version belongs to.
- version String
- Version number (e.g., 1.0.0).
getInfraProviderVersion Result
The following output properties are available:
- Gpg
Key stringId - GPG key ID for signing.
- Id string
- The provider-assigned unique ID for this managed resource.
- Protocols List<string>
- Supported Terraform protocol versions.
- Provider
Id string - The ID of the provider this version belongs to.
- Version string
- Version number (e.g., 1.0.0).
- Gpg
Key stringId - GPG key ID for signing.
- Id string
- The provider-assigned unique ID for this managed resource.
- Protocols []string
- Supported Terraform protocol versions.
- Provider
Id string - The ID of the provider this version belongs to.
- Version string
- Version number (e.g., 1.0.0).
- gpg
Key StringId - GPG key ID for signing.
- id String
- The provider-assigned unique ID for this managed resource.
- protocols List<String>
- Supported Terraform protocol versions.
- provider
Id String - The ID of the provider this version belongs to.
- version String
- Version number (e.g., 1.0.0).
- gpg
Key stringId - GPG key ID for signing.
- id string
- The provider-assigned unique ID for this managed resource.
- protocols string[]
- Supported Terraform protocol versions.
- provider
Id string - The ID of the provider this version belongs to.
- version string
- Version number (e.g., 1.0.0).
- gpg_
key_ strid - GPG key ID for signing.
- id str
- The provider-assigned unique ID for this managed resource.
- protocols Sequence[str]
- Supported Terraform protocol versions.
- provider_
id str - The ID of the provider this version belongs to.
- version str
- Version number (e.g., 1.0.0).
- gpg
Key StringId - GPG key ID for signing.
- id String
- The provider-assigned unique ID for this managed resource.
- protocols List<String>
- Supported Terraform protocol versions.
- provider
Id String - The ID of the provider this version belongs to.
- version String
- Version number (e.g., 1.0.0).
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
