gcore.FaasKey
Explore with Pulumi AI
Represents FaaS API key
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const secretFaasKey = new gcore.FaasKey("secretFaasKey", {
description: "Keys description",
projectId: 1,
regionId: 1,
});
export const secret = resource.gcore_faas_key.secret;
import pulumi
import pulumi_gcore as gcore
secret_faas_key = gcore.FaasKey("secretFaasKey",
description="Keys description",
project_id=1,
region_id=1)
pulumi.export("secret", resource["gcore_faas_key"]["secret"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gcore.NewFaasKey(ctx, "secretFaasKey", &gcore.FaasKeyArgs{
Description: pulumi.String("Keys description"),
ProjectId: pulumi.Float64(1),
RegionId: pulumi.Float64(1),
})
if err != nil {
return err
}
ctx.Export("secret", resource.Gcore_faas_key.Secret)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
var secretFaasKey = new Gcore.FaasKey("secretFaasKey", new()
{
Description = "Keys description",
ProjectId = 1,
RegionId = 1,
});
return new Dictionary<string, object?>
{
["secret"] = resource.Gcore_faas_key.Secret,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.FaasKey;
import com.pulumi.gcore.FaasKeyArgs;
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) {
var secretFaasKey = new FaasKey("secretFaasKey", FaasKeyArgs.builder()
.description("Keys description")
.projectId(1)
.regionId(1)
.build());
ctx.export("secret", resource.gcore_faas_key().secret());
}
}
resources:
secretFaasKey:
type: gcore:FaasKey
properties:
description: Keys description
projectId: 1
regionId: 1
outputs:
# To get sensitive value use `terraform output secret`
secret: ${resource.gcore_faas_key.secret}
Create FaasKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FaasKey(name: string, args?: FaasKeyArgs, opts?: CustomResourceOptions);
@overload
def FaasKey(resource_name: str,
args: Optional[FaasKeyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def FaasKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
expire: Optional[str] = None,
faas_key_id: Optional[str] = None,
functions: Optional[Sequence[FaasKeyFunctionArgs]] = 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)
func NewFaasKey(ctx *Context, name string, args *FaasKeyArgs, opts ...ResourceOption) (*FaasKey, error)
public FaasKey(string name, FaasKeyArgs? args = null, CustomResourceOptions? opts = null)
public FaasKey(String name, FaasKeyArgs args)
public FaasKey(String name, FaasKeyArgs args, CustomResourceOptions options)
type: gcore:FaasKey
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 FaasKeyArgs
- 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 FaasKeyArgs
- 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 FaasKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FaasKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FaasKeyArgs
- 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 faasKeyResource = new Gcore.FaasKey("faasKeyResource", new()
{
Description = "string",
Expire = "string",
FaasKeyId = "string",
Functions = new[]
{
new Gcore.Inputs.FaasKeyFunctionArgs
{
Name = "string",
Namespace = "string",
},
},
Name = "string",
ProjectId = 0,
ProjectName = "string",
RegionId = 0,
RegionName = "string",
});
example, err := gcore.NewFaasKey(ctx, "faasKeyResource", &gcore.FaasKeyArgs{
Description: pulumi.String("string"),
Expire: pulumi.String("string"),
FaasKeyId: pulumi.String("string"),
Functions: gcore.FaasKeyFunctionArray{
&gcore.FaasKeyFunctionArgs{
Name: pulumi.String("string"),
Namespace: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
ProjectId: pulumi.Float64(0),
ProjectName: pulumi.String("string"),
RegionId: pulumi.Float64(0),
RegionName: pulumi.String("string"),
})
var faasKeyResource = new FaasKey("faasKeyResource", FaasKeyArgs.builder()
.description("string")
.expire("string")
.faasKeyId("string")
.functions(FaasKeyFunctionArgs.builder()
.name("string")
.namespace("string")
.build())
.name("string")
.projectId(0)
.projectName("string")
.regionId(0)
.regionName("string")
.build());
faas_key_resource = gcore.FaasKey("faasKeyResource",
description="string",
expire="string",
faas_key_id="string",
functions=[{
"name": "string",
"namespace": "string",
}],
name="string",
project_id=0,
project_name="string",
region_id=0,
region_name="string")
const faasKeyResource = new gcore.FaasKey("faasKeyResource", {
description: "string",
expire: "string",
faasKeyId: "string",
functions: [{
name: "string",
namespace: "string",
}],
name: "string",
projectId: 0,
projectName: "string",
regionId: 0,
regionName: "string",
});
type: gcore:FaasKey
properties:
description: string
expire: string
faasKeyId: string
functions:
- name: string
namespace: string
name: string
projectId: 0
projectName: string
regionId: 0
regionName: string
FaasKey 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 FaasKey resource accepts the following input properties:
- Description string
- Expire string
- Faas
Key stringId - The ID of this resource.
- Functions
List<Faas
Key Function> - Name string
- Project
Id double - Project
Name string - Region
Id double - Region
Name string
- Description string
- Expire string
- Faas
Key stringId - The ID of this resource.
- Functions
[]Faas
Key Function Args - Name string
- Project
Id float64 - Project
Name string - Region
Id float64 - Region
Name string
- description String
- expire String
- faas
Key StringId - The ID of this resource.
- functions
List<Faas
Key Function> - name String
- project
Id Double - project
Name String - region
Id Double - region
Name String
- description string
- expire string
- faas
Key stringId - The ID of this resource.
- functions
Faas
Key Function[] - name string
- project
Id number - project
Name string - region
Id number - region
Name string
- description str
- expire str
- faas_
key_ strid - The ID of this resource.
- functions
Sequence[Faas
Key Function Args] - name str
- project_
id float - project_
name str - region_
id float - region_
name str
- description String
- expire String
- faas
Key StringId - The ID of this resource.
- functions List<Property Map>
- name String
- project
Id Number - project
Name String - region
Id Number - region
Name String
Outputs
All input properties are implicitly available as output properties. Additionally, the FaasKey resource produces the following output properties:
- created_
at str - id str
- The provider-assigned unique ID for this managed resource.
- secret str
- API key secret
- status str
Look up Existing FaasKey Resource
Get an existing FaasKey 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?: FaasKeyState, opts?: CustomResourceOptions): FaasKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
expire: Optional[str] = None,
faas_key_id: Optional[str] = None,
functions: Optional[Sequence[FaasKeyFunctionArgs]] = 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,
secret: Optional[str] = None,
status: Optional[str] = None) -> FaasKey
func GetFaasKey(ctx *Context, name string, id IDInput, state *FaasKeyState, opts ...ResourceOption) (*FaasKey, error)
public static FaasKey Get(string name, Input<string> id, FaasKeyState? state, CustomResourceOptions? opts = null)
public static FaasKey get(String name, Output<String> id, FaasKeyState state, CustomResourceOptions options)
resources: _: type: gcore:FaasKey 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.
- Created
At string - Description string
- Expire string
- Faas
Key stringId - The ID of this resource.
- Functions
List<Faas
Key Function> - Name string
- Project
Id double - Project
Name string - Region
Id double - Region
Name string - Secret string
- API key secret
- Status string
- Created
At string - Description string
- Expire string
- Faas
Key stringId - The ID of this resource.
- Functions
[]Faas
Key Function Args - Name string
- Project
Id float64 - Project
Name string - Region
Id float64 - Region
Name string - Secret string
- API key secret
- Status string
- created
At String - description String
- expire String
- faas
Key StringId - The ID of this resource.
- functions
List<Faas
Key Function> - name String
- project
Id Double - project
Name String - region
Id Double - region
Name String - secret String
- API key secret
- status String
- created
At string - description string
- expire string
- faas
Key stringId - The ID of this resource.
- functions
Faas
Key Function[] - name string
- project
Id number - project
Name string - region
Id number - region
Name string - secret string
- API key secret
- status string
- created_
at str - description str
- expire str
- faas_
key_ strid - The ID of this resource.
- functions
Sequence[Faas
Key Function Args] - name str
- project_
id float - project_
name str - region_
id float - region_
name str - secret str
- API key secret
- status str
- created
At String - description String
- expire String
- faas
Key StringId - The ID of this resource.
- functions List<Property Map>
- name String
- project
Id Number - project
Name String - region
Id Number - region
Name String - secret String
- API key secret
- status String
Supporting Types
FaasKeyFunction, FaasKeyFunctionArgs
Import
import using <project_id>:<region_id>:<key_name> format
$ pulumi import gcore:index/faasKey:FaasKey test 1:6:test_key
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcore
Terraform Provider.