1. Packages
  2. Gcore Provider
  3. API Docs
  4. FastedgeSecret
gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core

gcore.FastedgeSecret

Explore with Pulumi AI

gcore logo
gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core

    Represents FastEdge secret

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const config = new pulumi.Config();
    const appSecretSlot0 = config.get("appSecretSlot0") || "";
    const appSecretSlot1 = config.get("appSecretSlot1") || "";
    const testSecret = new gcore.FastedgeSecret("testSecret", {
        comment: "My test secret",
        slots: [
            {
                id: 0,
                value: appSecretSlot0,
            },
            {
                id: 1,
                value: appSecretSlot1,
            },
        ],
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    config = pulumi.Config()
    app_secret_slot0 = config.get("appSecretSlot0")
    if app_secret_slot0 is None:
        app_secret_slot0 = ""
    app_secret_slot1 = config.get("appSecretSlot1")
    if app_secret_slot1 is None:
        app_secret_slot1 = ""
    test_secret = gcore.FastedgeSecret("testSecret",
        comment="My test secret",
        slots=[
            {
                "id": 0,
                "value": app_secret_slot0,
            },
            {
                "id": 1,
                "value": app_secret_slot1,
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		appSecretSlot0 := ""
    		if param := cfg.Get("appSecretSlot0"); param != "" {
    			appSecretSlot0 = param
    		}
    		appSecretSlot1 := ""
    		if param := cfg.Get("appSecretSlot1"); param != "" {
    			appSecretSlot1 = param
    		}
    		_, err := gcore.NewFastedgeSecret(ctx, "testSecret", &gcore.FastedgeSecretArgs{
    			Comment: pulumi.String("My test secret"),
    			Slots: gcore.FastedgeSecretSlotArray{
    				&gcore.FastedgeSecretSlotArgs{
    					Id:    pulumi.Float64(0),
    					Value: pulumi.String(appSecretSlot0),
    				},
    				&gcore.FastedgeSecretSlotArgs{
    					Id:    pulumi.Float64(1),
    					Value: pulumi.String(appSecretSlot1),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var appSecretSlot0 = config.Get("appSecretSlot0") ?? "";
        var appSecretSlot1 = config.Get("appSecretSlot1") ?? "";
        var testSecret = new Gcore.FastedgeSecret("testSecret", new()
        {
            Comment = "My test secret",
            Slots = new[]
            {
                new Gcore.Inputs.FastedgeSecretSlotArgs
                {
                    Id = 0,
                    Value = appSecretSlot0,
                },
                new Gcore.Inputs.FastedgeSecretSlotArgs
                {
                    Id = 1,
                    Value = appSecretSlot1,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.FastedgeSecret;
    import com.pulumi.gcore.FastedgeSecretArgs;
    import com.pulumi.gcore.inputs.FastedgeSecretSlotArgs;
    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 config = ctx.config();
            final var appSecretSlot0 = config.get("appSecretSlot0").orElse("");
            final var appSecretSlot1 = config.get("appSecretSlot1").orElse("");
            var testSecret = new FastedgeSecret("testSecret", FastedgeSecretArgs.builder()
                .comment("My test secret")
                .slots(            
                    FastedgeSecretSlotArgs.builder()
                        .id(0)
                        .value(appSecretSlot0)
                        .build(),
                    FastedgeSecretSlotArgs.builder()
                        .id(1)
                        .value(appSecretSlot1)
                        .build())
                .build());
    
        }
    }
    
    configuration:
      appSecretSlot0:
        type: string
        default: ""
      appSecretSlot1:
        type: string
        default: ""
    resources:
      testSecret:
        type: gcore:FastedgeSecret
        properties:
          comment: My test secret
          slots:
            - id: 0
              value: ${appSecretSlot0}
            - id: 1
              value: ${appSecretSlot1}
    

    Create FastedgeSecret Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FastedgeSecret(name: string, args?: FastedgeSecretArgs, opts?: CustomResourceOptions);
    @overload
    def FastedgeSecret(resource_name: str,
                       args: Optional[FastedgeSecretArgs] = None,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def FastedgeSecret(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       comment: Optional[str] = None,
                       fastedge_secret_id: Optional[str] = None,
                       name: Optional[str] = None,
                       slots: Optional[Sequence[FastedgeSecretSlotArgs]] = None)
    func NewFastedgeSecret(ctx *Context, name string, args *FastedgeSecretArgs, opts ...ResourceOption) (*FastedgeSecret, error)
    public FastedgeSecret(string name, FastedgeSecretArgs? args = null, CustomResourceOptions? opts = null)
    public FastedgeSecret(String name, FastedgeSecretArgs args)
    public FastedgeSecret(String name, FastedgeSecretArgs args, CustomResourceOptions options)
    
    type: gcore:FastedgeSecret
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args FastedgeSecretArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FastedgeSecretArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FastedgeSecretArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FastedgeSecretArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FastedgeSecretArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var fastedgeSecretResource = new Gcore.FastedgeSecret("fastedgeSecretResource", new()
    {
        Comment = "string",
        FastedgeSecretId = "string",
        Name = "string",
        Slots = new[]
        {
            new Gcore.Inputs.FastedgeSecretSlotArgs
            {
                Id = 0,
                Value = "string",
                Checksum = "string",
            },
        },
    });
    
    example, err := gcore.NewFastedgeSecret(ctx, "fastedgeSecretResource", &gcore.FastedgeSecretArgs{
    	Comment:          pulumi.String("string"),
    	FastedgeSecretId: pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	Slots: gcore.FastedgeSecretSlotArray{
    		&gcore.FastedgeSecretSlotArgs{
    			Id:       pulumi.Float64(0),
    			Value:    pulumi.String("string"),
    			Checksum: pulumi.String("string"),
    		},
    	},
    })
    
    var fastedgeSecretResource = new FastedgeSecret("fastedgeSecretResource", FastedgeSecretArgs.builder()
        .comment("string")
        .fastedgeSecretId("string")
        .name("string")
        .slots(FastedgeSecretSlotArgs.builder()
            .id(0)
            .value("string")
            .checksum("string")
            .build())
        .build());
    
    fastedge_secret_resource = gcore.FastedgeSecret("fastedgeSecretResource",
        comment="string",
        fastedge_secret_id="string",
        name="string",
        slots=[{
            "id": 0,
            "value": "string",
            "checksum": "string",
        }])
    
    const fastedgeSecretResource = new gcore.FastedgeSecret("fastedgeSecretResource", {
        comment: "string",
        fastedgeSecretId: "string",
        name: "string",
        slots: [{
            id: 0,
            value: "string",
            checksum: "string",
        }],
    });
    
    type: gcore:FastedgeSecret
    properties:
        comment: string
        fastedgeSecretId: string
        name: string
        slots:
            - checksum: string
              id: 0
              value: string
    

    FastedgeSecret Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The FastedgeSecret resource accepts the following input properties:

    Comment string
    Secret description.
    FastedgeSecretId string
    The ID of this resource.
    Name string
    Secret name.
    Slots List<FastedgeSecretSlot>
    Secret slot.
    Comment string
    Secret description.
    FastedgeSecretId string
    The ID of this resource.
    Name string
    Secret name.
    Slots []FastedgeSecretSlotArgs
    Secret slot.
    comment String
    Secret description.
    fastedgeSecretId String
    The ID of this resource.
    name String
    Secret name.
    slots List<FastedgeSecretSlot>
    Secret slot.
    comment string
    Secret description.
    fastedgeSecretId string
    The ID of this resource.
    name string
    Secret name.
    slots FastedgeSecretSlot[]
    Secret slot.
    comment str
    Secret description.
    fastedge_secret_id str
    The ID of this resource.
    name str
    Secret name.
    slots Sequence[FastedgeSecretSlotArgs]
    Secret slot.
    comment String
    Secret description.
    fastedgeSecretId String
    The ID of this resource.
    name String
    Secret name.
    slots List<Property Map>
    Secret slot.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FastedgeSecret resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing FastedgeSecret Resource

    Get an existing FastedgeSecret resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FastedgeSecretState, opts?: CustomResourceOptions): FastedgeSecret
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comment: Optional[str] = None,
            fastedge_secret_id: Optional[str] = None,
            name: Optional[str] = None,
            slots: Optional[Sequence[FastedgeSecretSlotArgs]] = None) -> FastedgeSecret
    func GetFastedgeSecret(ctx *Context, name string, id IDInput, state *FastedgeSecretState, opts ...ResourceOption) (*FastedgeSecret, error)
    public static FastedgeSecret Get(string name, Input<string> id, FastedgeSecretState? state, CustomResourceOptions? opts = null)
    public static FastedgeSecret get(String name, Output<String> id, FastedgeSecretState state, CustomResourceOptions options)
    resources:  _:    type: gcore:FastedgeSecret    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Comment string
    Secret description.
    FastedgeSecretId string
    The ID of this resource.
    Name string
    Secret name.
    Slots List<FastedgeSecretSlot>
    Secret slot.
    Comment string
    Secret description.
    FastedgeSecretId string
    The ID of this resource.
    Name string
    Secret name.
    Slots []FastedgeSecretSlotArgs
    Secret slot.
    comment String
    Secret description.
    fastedgeSecretId String
    The ID of this resource.
    name String
    Secret name.
    slots List<FastedgeSecretSlot>
    Secret slot.
    comment string
    Secret description.
    fastedgeSecretId string
    The ID of this resource.
    name string
    Secret name.
    slots FastedgeSecretSlot[]
    Secret slot.
    comment str
    Secret description.
    fastedge_secret_id str
    The ID of this resource.
    name str
    Secret name.
    slots Sequence[FastedgeSecretSlotArgs]
    Secret slot.
    comment String
    Secret description.
    fastedgeSecretId String
    The ID of this resource.
    name String
    Secret name.
    slots List<Property Map>
    Secret slot.

    Supporting Types

    FastedgeSecretSlot, FastedgeSecretSlotArgs

    Id double
    Secret slot id, often used as 'effective from' timestamp.
    Value string
    Secret value.
    Checksum string
    Secret value checksum.
    Id float64
    Secret slot id, often used as 'effective from' timestamp.
    Value string
    Secret value.
    Checksum string
    Secret value checksum.
    id Double
    Secret slot id, often used as 'effective from' timestamp.
    value String
    Secret value.
    checksum String
    Secret value checksum.
    id number
    Secret slot id, often used as 'effective from' timestamp.
    value string
    Secret value.
    checksum string
    Secret value checksum.
    id float
    Secret slot id, often used as 'effective from' timestamp.
    value str
    Secret value.
    checksum str
    Secret value checksum.
    id Number
    Secret slot id, often used as 'effective from' timestamp.
    value String
    Secret value.
    checksum String
    Secret value checksum.

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    gcore logo
    gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core