edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center
edgecenter.getSecret
Explore with Pulumi AI
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center
Represent secret
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as edgecenter from "@pulumi/edgecenter";
const pr = edgecenter.getProject({
    name: "test",
});
const rg = edgecenter.getRegion({
    name: "ED-10 Preprod",
});
const lbHttps = Promise.all([rg, pr]).then(([rg, pr]) => edgecenter.getSecret({
    name: "lb_https",
    regionId: rg.id,
    projectId: pr.id,
}));
export const view = lbHttps;
import pulumi
import pulumi_edgecenter as edgecenter
pr = edgecenter.get_project(name="test")
rg = edgecenter.get_region(name="ED-10 Preprod")
lb_https = edgecenter.get_secret(name="lb_https",
    region_id=rg.id,
    project_id=pr.id)
pulumi.export("view", lb_https)
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		pr, err := edgecenter.LookupProject(ctx, &edgecenter.LookupProjectArgs{
			Name: pulumi.StringRef("test"),
		}, nil)
		if err != nil {
			return err
		}
		rg, err := edgecenter.GetRegion(ctx, &edgecenter.GetRegionArgs{
			Name: "ED-10 Preprod",
		}, nil)
		if err != nil {
			return err
		}
		lbHttps, err := edgecenter.LookupSecret(ctx, &edgecenter.LookupSecretArgs{
			Name:      "lb_https",
			RegionId:  pulumi.Float64Ref(rg.Id),
			ProjectId: pulumi.Float64Ref(pr.Id),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("view", lbHttps)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;
return await Deployment.RunAsync(() => 
{
    var pr = Edgecenter.GetProject.Invoke(new()
    {
        Name = "test",
    });
    var rg = Edgecenter.GetRegion.Invoke(new()
    {
        Name = "ED-10 Preprod",
    });
    var lbHttps = Edgecenter.GetSecret.Invoke(new()
    {
        Name = "lb_https",
        RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
        ProjectId = pr.Apply(getProjectResult => getProjectResult.Id),
    });
    return new Dictionary<string, object?>
    {
        ["view"] = lbHttps,
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.EdgecenterFunctions;
import com.pulumi.edgecenter.inputs.GetProjectArgs;
import com.pulumi.edgecenter.inputs.GetRegionArgs;
import com.pulumi.edgecenter.inputs.GetSecretArgs;
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 pr = EdgecenterFunctions.getProject(GetProjectArgs.builder()
            .name("test")
            .build());
        final var rg = EdgecenterFunctions.getRegion(GetRegionArgs.builder()
            .name("ED-10 Preprod")
            .build());
        final var lbHttps = EdgecenterFunctions.getSecret(GetSecretArgs.builder()
            .name("lb_https")
            .regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
            .projectId(pr.applyValue(getProjectResult -> getProjectResult.id()))
            .build());
        ctx.export("view", lbHttps.applyValue(getSecretResult -> getSecretResult));
    }
}
variables:
  pr:
    fn::invoke:
      function: edgecenter:getProject
      arguments:
        name: test
  rg:
    fn::invoke:
      function: edgecenter:getRegion
      arguments:
        name: ED-10 Preprod
  lbHttps:
    fn::invoke:
      function: edgecenter:getSecret
      arguments:
        name: lb_https
        regionId: ${rg.id}
        projectId: ${pr.id}
outputs:
  view: ${lbHttps}
Using getSecret
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 getSecret(args: GetSecretArgs, opts?: InvokeOptions): Promise<GetSecretResult>
function getSecretOutput(args: GetSecretOutputArgs, opts?: InvokeOptions): Output<GetSecretResult>def get_secret(id: Optional[str] = None,
               name: Optional[str] = None,
               project_id: Optional[float] = None,
               project_name: Optional[str] = None,
               region_id: Optional[float] = None,
               region_name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetSecretResult
def get_secret_output(id: Optional[pulumi.Input[str]] = None,
               name: Optional[pulumi.Input[str]] = None,
               project_id: Optional[pulumi.Input[float]] = None,
               project_name: Optional[pulumi.Input[str]] = None,
               region_id: Optional[pulumi.Input[float]] = None,
               region_name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetSecretResult]func LookupSecret(ctx *Context, args *LookupSecretArgs, opts ...InvokeOption) (*LookupSecretResult, error)
func LookupSecretOutput(ctx *Context, args *LookupSecretOutputArgs, opts ...InvokeOption) LookupSecretResultOutput> Note: This function is named LookupSecret in the Go SDK.
public static class GetSecret 
{
    public static Task<GetSecretResult> InvokeAsync(GetSecretArgs args, InvokeOptions? opts = null)
    public static Output<GetSecretResult> Invoke(GetSecretInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSecretResult> getSecret(GetSecretArgs args, InvokeOptions options)
public static Output<GetSecretResult> getSecret(GetSecretArgs args, InvokeOptions options)
fn::invoke:
  function: edgecenter:index/getSecret:getSecret
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the secret.
- Id string
- The ID of this resource.
- ProjectId double
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- ProjectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- RegionId double
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- RegionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- Name string
- The name of the secret.
- Id string
- The ID of this resource.
- ProjectId float64
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- ProjectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- RegionId float64
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- RegionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- name String
- The name of the secret.
- id String
- The ID of this resource.
- projectId Double
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName String
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId Double
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName String
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- name string
- The name of the secret.
- id string
- The ID of this resource.
- projectId number
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId number
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- name str
- The name of the secret.
- id str
- The ID of this resource.
- project_id float
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project_name str
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- region_id float
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region_name str
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- name String
- The name of the secret.
- id String
- The ID of this resource.
- projectId Number
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName String
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId Number
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName String
- The name of the region. Either 'regionid' or 'regionname' must be specified.
getSecret Result
The following output properties are available:
- Algorithm string
- The encryption algorithm used for the secret.
- BitLength double
- The bit length of the encryption algorithm.
- ContentTypes Dictionary<string, string>
- The content types associated with the secret's payload.
- Created string
- Datetime when the secret was created. The format is 2025-12-28T19:14:44.180394
- Expiration string
- Datetime when the secret will expire. The format is 2025-12-28T19:14:44.180394
- Id string
- The ID of this resource.
- Mode string
- The mode of the encryption algorithm.
- Name string
- The name of the secret.
- Status string
- The current status of the secret.
- ProjectId double
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- ProjectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- RegionId double
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- RegionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- Algorithm string
- The encryption algorithm used for the secret.
- BitLength float64
- The bit length of the encryption algorithm.
- ContentTypes map[string]string
- The content types associated with the secret's payload.
- Created string
- Datetime when the secret was created. The format is 2025-12-28T19:14:44.180394
- Expiration string
- Datetime when the secret will expire. The format is 2025-12-28T19:14:44.180394
- Id string
- The ID of this resource.
- Mode string
- The mode of the encryption algorithm.
- Name string
- The name of the secret.
- Status string
- The current status of the secret.
- ProjectId float64
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- ProjectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- RegionId float64
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- RegionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- algorithm String
- The encryption algorithm used for the secret.
- bitLength Double
- The bit length of the encryption algorithm.
- contentTypes Map<String,String>
- The content types associated with the secret's payload.
- created String
- Datetime when the secret was created. The format is 2025-12-28T19:14:44.180394
- expiration String
- Datetime when the secret will expire. The format is 2025-12-28T19:14:44.180394
- id String
- The ID of this resource.
- mode String
- The mode of the encryption algorithm.
- name String
- The name of the secret.
- status String
- The current status of the secret.
- projectId Double
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName String
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId Double
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName String
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- algorithm string
- The encryption algorithm used for the secret.
- bitLength number
- The bit length of the encryption algorithm.
- contentTypes {[key: string]: string}
- The content types associated with the secret's payload.
- created string
- Datetime when the secret was created. The format is 2025-12-28T19:14:44.180394
- expiration string
- Datetime when the secret will expire. The format is 2025-12-28T19:14:44.180394
- id string
- The ID of this resource.
- mode string
- The mode of the encryption algorithm.
- name string
- The name of the secret.
- status string
- The current status of the secret.
- projectId number
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName string
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId number
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName string
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- algorithm str
- The encryption algorithm used for the secret.
- bit_length float
- The bit length of the encryption algorithm.
- content_types Mapping[str, str]
- The content types associated with the secret's payload.
- created str
- Datetime when the secret was created. The format is 2025-12-28T19:14:44.180394
- expiration str
- Datetime when the secret will expire. The format is 2025-12-28T19:14:44.180394
- id str
- The ID of this resource.
- mode str
- The mode of the encryption algorithm.
- name str
- The name of the secret.
- status str
- The current status of the secret.
- project_id float
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project_name str
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- region_id float
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region_name str
- The name of the region. Either 'regionid' or 'regionname' must be specified.
- algorithm String
- The encryption algorithm used for the secret.
- bitLength Number
- The bit length of the encryption algorithm.
- contentTypes Map<String>
- The content types associated with the secret's payload.
- created String
- Datetime when the secret was created. The format is 2025-12-28T19:14:44.180394
- expiration String
- Datetime when the secret will expire. The format is 2025-12-28T19:14:44.180394
- id String
- The ID of this resource.
- mode String
- The mode of the encryption algorithm.
- name String
- The name of the secret.
- status String
- The current status of the secret.
- projectId Number
- The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- projectName String
- The name of the project. Either 'projectid' or 'projectname' must be specified.
- regionId Number
- The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- regionName String
- The name of the region. Either 'regionid' or 'regionname' must be specified.
Package Details
- Repository
- edgecenter edge-center/terraform-provider-edgecenter
- License
- Notes
- This Pulumi package is based on the edgecenterTerraform Provider.
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center