1. Packages
  2. Equinix
  3. API Docs
  4. metal
  5. getProject
Equinix v0.21.0 published on Friday, Feb 28, 2025 by Equinix

equinix.metal.getProject

Explore with Pulumi AI

Equinix v0.21.0 published on Friday, Feb 28, 2025 by Equinix

Use this datasource to retrieve attributes of the Project API resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as equinix from "@pulumi/equinix";

const tfProject1 = equinix.metal.getProject({
    name: "Terraform Fun",
});
export const usersOfTerraformFun = tfProject1.then(tfProject1 => tfProject1.userIds);
Copy
import pulumi
import pulumi_equinix as equinix

tf_project1 = equinix.metal.get_project(name="Terraform Fun")
pulumi.export("usersOfTerraformFun", tf_project1.user_ids)
Copy
package main

import (
	"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tfProject1, err := metal.LookupProject(ctx, &metal.LookupProjectArgs{
			Name: pulumi.StringRef("Terraform Fun"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("usersOfTerraformFun", tfProject1.UserIds)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Equinix = Pulumi.Equinix;

return await Deployment.RunAsync(() => 
{
    var tfProject1 = Equinix.Metal.GetProject.Invoke(new()
    {
        Name = "Terraform Fun",
    });

    return new Dictionary<string, object?>
    {
        ["usersOfTerraformFun"] = tfProject1.Apply(getProjectResult => getProjectResult.UserIds),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.equinix.metal.MetalFunctions;
import com.pulumi.equinix.metal.inputs.GetProjectArgs;
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 tfProject1 = MetalFunctions.getProject(GetProjectArgs.builder()
            .name("Terraform Fun")
            .build());

        ctx.export("usersOfTerraformFun", tfProject1.applyValue(getProjectResult -> getProjectResult.userIds()));
    }
}
Copy
variables:
  tfProject1:
    fn::invoke:
      Function: equinix:metal:getProject
      Arguments:
        name: Terraform Fun
outputs:
  usersOfTerraformFun: ${tfProject1.userIds}
Copy

Using getProject

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 getProject(args: GetProjectArgs, opts?: InvokeOptions): Promise<GetProjectResult>
function getProjectOutput(args: GetProjectOutputArgs, opts?: InvokeOptions): Output<GetProjectResult>
Copy
def get_project(name: Optional[str] = None,
                project_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetProjectResult
def get_project_output(name: Optional[pulumi.Input[str]] = None,
                project_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetProjectResult]
Copy
func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)
func LookupProjectOutput(ctx *Context, args *LookupProjectOutputArgs, opts ...InvokeOption) LookupProjectResultOutput
Copy

> Note: This function is named LookupProject in the Go SDK.

public static class GetProject 
{
    public static Task<GetProjectResult> InvokeAsync(GetProjectArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectResult> Invoke(GetProjectInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
public static Output<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: equinix:metal/getProject:getProject
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name string
The name which is used to look up the project.
ProjectId string
The UUID by which to look up the project.
Name string
The name which is used to look up the project.
ProjectId string
The UUID by which to look up the project.
name String
The name which is used to look up the project.
projectId String
The UUID by which to look up the project.
name string
The name which is used to look up the project.
projectId string
The UUID by which to look up the project.
name str
The name which is used to look up the project.
project_id str
The UUID by which to look up the project.
name String
The name which is used to look up the project.
projectId String
The UUID by which to look up the project.

getProject Result

The following output properties are available:

BackendTransfer bool
Whether Backend Transfer is enabled for this project.
BgpConfig GetProjectBgpConfig
Optional BGP settings. Refer to Equinix Metal guide for BGP.
Created string
The timestamp for when the project was created.
Id string
Name string
OrganizationId string
The UUID of this project's parent organization.
PaymentMethodId string
The UUID of payment method for this project.
ProjectId string
Updated string
The timestamp for the last time the project was updated.
UserIds List<string>
List of UUIDs of user accounts which belong to this project.
BackendTransfer bool
Whether Backend Transfer is enabled for this project.
BgpConfig GetProjectBgpConfig
Optional BGP settings. Refer to Equinix Metal guide for BGP.
Created string
The timestamp for when the project was created.
Id string
Name string
OrganizationId string
The UUID of this project's parent organization.
PaymentMethodId string
The UUID of payment method for this project.
ProjectId string
Updated string
The timestamp for the last time the project was updated.
UserIds []string
List of UUIDs of user accounts which belong to this project.
backendTransfer Boolean
Whether Backend Transfer is enabled for this project.
bgpConfig GetProjectBgpConfig
Optional BGP settings. Refer to Equinix Metal guide for BGP.
created String
The timestamp for when the project was created.
id String
name String
organizationId String
The UUID of this project's parent organization.
paymentMethodId String
The UUID of payment method for this project.
projectId String
updated String
The timestamp for the last time the project was updated.
userIds List<String>
List of UUIDs of user accounts which belong to this project.
backendTransfer boolean
Whether Backend Transfer is enabled for this project.
bgpConfig GetProjectBgpConfig
Optional BGP settings. Refer to Equinix Metal guide for BGP.
created string
The timestamp for when the project was created.
id string
name string
organizationId string
The UUID of this project's parent organization.
paymentMethodId string
The UUID of payment method for this project.
projectId string
updated string
The timestamp for the last time the project was updated.
userIds string[]
List of UUIDs of user accounts which belong to this project.
backend_transfer bool
Whether Backend Transfer is enabled for this project.
bgp_config GetProjectBgpConfig
Optional BGP settings. Refer to Equinix Metal guide for BGP.
created str
The timestamp for when the project was created.
id str
name str
organization_id str
The UUID of this project's parent organization.
payment_method_id str
The UUID of payment method for this project.
project_id str
updated str
The timestamp for the last time the project was updated.
user_ids Sequence[str]
List of UUIDs of user accounts which belong to this project.
backendTransfer Boolean
Whether Backend Transfer is enabled for this project.
bgpConfig Property Map
Optional BGP settings. Refer to Equinix Metal guide for BGP.
created String
The timestamp for when the project was created.
id String
name String
organizationId String
The UUID of this project's parent organization.
paymentMethodId String
The UUID of payment method for this project.
projectId String
updated String
The timestamp for the last time the project was updated.
userIds List<String>
List of UUIDs of user accounts which belong to this project.

Supporting Types

GetProjectBgpConfig

Asn This property is required. int
Autonomous System Number for local BGP deployment.
DeploymentType This property is required. string
One of private, public.
MaxPrefix This property is required. int
The maximum number of route filters allowed per server.
Md5 This property is required. string
Password for BGP session in plaintext (not a checksum).
Status This property is required. string
Status of BGP configuration in the project.
Asn This property is required. int
Autonomous System Number for local BGP deployment.
DeploymentType This property is required. string
One of private, public.
MaxPrefix This property is required. int
The maximum number of route filters allowed per server.
Md5 This property is required. string
Password for BGP session in plaintext (not a checksum).
Status This property is required. string
Status of BGP configuration in the project.
asn This property is required. Integer
Autonomous System Number for local BGP deployment.
deploymentType This property is required. String
One of private, public.
maxPrefix This property is required. Integer
The maximum number of route filters allowed per server.
md5 This property is required. String
Password for BGP session in plaintext (not a checksum).
status This property is required. String
Status of BGP configuration in the project.
asn This property is required. number
Autonomous System Number for local BGP deployment.
deploymentType This property is required. string
One of private, public.
maxPrefix This property is required. number
The maximum number of route filters allowed per server.
md5 This property is required. string
Password for BGP session in plaintext (not a checksum).
status This property is required. string
Status of BGP configuration in the project.
asn This property is required. int
Autonomous System Number for local BGP deployment.
deployment_type This property is required. str
One of private, public.
max_prefix This property is required. int
The maximum number of route filters allowed per server.
md5 This property is required. str
Password for BGP session in plaintext (not a checksum).
status This property is required. str
Status of BGP configuration in the project.
asn This property is required. Number
Autonomous System Number for local BGP deployment.
deploymentType This property is required. String
One of private, public.
maxPrefix This property is required. Number
The maximum number of route filters allowed per server.
md5 This property is required. String
Password for BGP session in plaintext (not a checksum).
status This property is required. String
Status of BGP configuration in the project.

Package Details

Repository
equinix equinix/pulumi-equinix
License
Apache-2.0
Notes
This Pulumi package is based on the equinix Terraform Provider.
Equinix v0.21.0 published on Friday, Feb 28, 2025 by Equinix