Data source for listing Terraform/OpenTofu Providers from the IaCM Provider Registry.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const all = harness.platform.getInfraProviders({});
export const providerCount = all.then(all => all.providers).length;
export const providerTypes = all.then(all => .map(p => (p.type)));
import pulumi
import pulumi_harness as harness
all = harness.platform.get_infra_providers()
pulumi.export("providerCount", len(all.providers))
pulumi.export("providerTypes", [p.type for p in all.providers])
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var all = Harness.Platform.GetInfraProviders.Invoke();
return new Dictionary<string, object?>
{
["providerCount"] = all.Apply(getInfraProvidersResult => getInfraProvidersResult.Providers).Length,
["providerTypes"] = .Select(p =>
{
return p.Type;
}).ToList(),
};
});
Example coming soon!
Example coming soon!
Using getInfraProviders
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 getInfraProviders(opts?: InvokeOptions): Promise<GetInfraProvidersResult>
function getInfraProvidersOutput(opts?: InvokeOptions): Output<GetInfraProvidersResult>def get_infra_providers(opts: Optional[InvokeOptions] = None) -> GetInfraProvidersResult
def get_infra_providers_output(opts: Optional[InvokeOptions] = None) -> Output[GetInfraProvidersResult]func GetInfraProviders(ctx *Context, opts ...InvokeOption) (*GetInfraProvidersResult, error)
func GetInfraProvidersOutput(ctx *Context, opts ...InvokeOption) GetInfraProvidersResultOutput> Note: This function is named GetInfraProviders in the Go SDK.
public static class GetInfraProviders
{
public static Task<GetInfraProvidersResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetInfraProvidersResult> Invoke(InvokeOptions? opts = null)
}public static CompletableFuture<GetInfraProvidersResult> getInfraProviders(InvokeOptions options)
public static Output<GetInfraProvidersResult> getInfraProviders(InvokeOptions options)
fn::invoke:
function: harness:platform/getInfraProviders:getInfraProviders
arguments:
# arguments dictionarygetInfraProviders Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Providers
List<Get
Infra Providers Provider> - List of providers.
- Id string
- The provider-assigned unique ID for this managed resource.
- Providers
[]Get
Infra Providers Provider - List of providers.
- id String
- The provider-assigned unique ID for this managed resource.
- providers
List<Get
Infra Providers Provider> - List of providers.
- id string
- The provider-assigned unique ID for this managed resource.
- providers
Get
Infra Providers Provider[] - List of providers.
- id str
- The provider-assigned unique ID for this managed resource.
- providers
Sequence[Get
Infra Providers Provider] - List of providers.
- id String
- The provider-assigned unique ID for this managed resource.
- providers List<Property Map>
- List of providers.
Supporting Types
GetInfraProvidersProvider
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
