gcore.FastedgeApp
Explore with Pulumi AI
FastEdge application.
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,
},
],
});
const testBinary = new gcore.FastedgeBinary("testBinary", {filename: "test.wasm"});
const appFromBinary = new gcore.FastedgeApp("appFromBinary", {
status: "enabled",
comment: "Terraform test app 1",
binary: testBinary.fastedgeBinaryId,
env: {
foo: "bar",
},
});
const testTemplate = new gcore.FastedgeTemplate("testTemplate", {
binary: testBinary.fastedgeBinaryId,
shortDescr: "short description",
longDescr: "long description",
params: [
{
name: "foo",
type: "string",
mandatory: true,
descr: "Parameter foo",
},
{
name: "bar",
type: "number",
descr: "Parameter bar",
},
],
});
const appFromTemplate = new gcore.FastedgeApp("appFromTemplate", {
status: "enabled",
comment: "Terraform test app 2",
template: testTemplate.fastedgeTemplateId,
env: {
foo: "foo_value",
bar: "123",
},
secrets: {
baz: testSecret.fastedgeSecretId,
},
});
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,
},
])
test_binary = gcore.FastedgeBinary("testBinary", filename="test.wasm")
app_from_binary = gcore.FastedgeApp("appFromBinary",
status="enabled",
comment="Terraform test app 1",
binary=test_binary.fastedge_binary_id,
env={
"foo": "bar",
})
test_template = gcore.FastedgeTemplate("testTemplate",
binary=test_binary.fastedge_binary_id,
short_descr="short description",
long_descr="long description",
params=[
{
"name": "foo",
"type": "string",
"mandatory": True,
"descr": "Parameter foo",
},
{
"name": "bar",
"type": "number",
"descr": "Parameter bar",
},
])
app_from_template = gcore.FastedgeApp("appFromTemplate",
status="enabled",
comment="Terraform test app 2",
template=test_template.fastedge_template_id,
env={
"foo": "foo_value",
"bar": "123",
},
secrets={
"baz": test_secret.fastedge_secret_id,
})
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
}
testSecret, 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
}
testBinary, err := gcore.NewFastedgeBinary(ctx, "testBinary", &gcore.FastedgeBinaryArgs{
Filename: pulumi.String("test.wasm"),
})
if err != nil {
return err
}
_, err = gcore.NewFastedgeApp(ctx, "appFromBinary", &gcore.FastedgeAppArgs{
Status: pulumi.String("enabled"),
Comment: pulumi.String("Terraform test app 1"),
Binary: testBinary.FastedgeBinaryId,
Env: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
})
if err != nil {
return err
}
testTemplate, err := gcore.NewFastedgeTemplate(ctx, "testTemplate", &gcore.FastedgeTemplateArgs{
Binary: testBinary.FastedgeBinaryId,
ShortDescr: pulumi.String("short description"),
LongDescr: pulumi.String("long description"),
Params: gcore.FastedgeTemplateParamArray{
&gcore.FastedgeTemplateParamArgs{
Name: pulumi.String("foo"),
Type: pulumi.String("string"),
Mandatory: pulumi.Bool(true),
Descr: pulumi.String("Parameter foo"),
},
&gcore.FastedgeTemplateParamArgs{
Name: pulumi.String("bar"),
Type: pulumi.String("number"),
Descr: pulumi.String("Parameter bar"),
},
},
})
if err != nil {
return err
}
_, err = gcore.NewFastedgeApp(ctx, "appFromTemplate", &gcore.FastedgeAppArgs{
Status: pulumi.String("enabled"),
Comment: pulumi.String("Terraform test app 2"),
Template: testTemplate.FastedgeTemplateId,
Env: pulumi.StringMap{
"foo": pulumi.String("foo_value"),
"bar": pulumi.String("123"),
},
Secrets: pulumi.Float64Map{
"baz": testSecret.FastedgeSecretId,
},
})
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,
},
},
});
var testBinary = new Gcore.FastedgeBinary("testBinary", new()
{
Filename = "test.wasm",
});
var appFromBinary = new Gcore.FastedgeApp("appFromBinary", new()
{
Status = "enabled",
Comment = "Terraform test app 1",
Binary = testBinary.FastedgeBinaryId,
Env =
{
{ "foo", "bar" },
},
});
var testTemplate = new Gcore.FastedgeTemplate("testTemplate", new()
{
Binary = testBinary.FastedgeBinaryId,
ShortDescr = "short description",
LongDescr = "long description",
Params = new[]
{
new Gcore.Inputs.FastedgeTemplateParamArgs
{
Name = "foo",
Type = "string",
Mandatory = true,
Descr = "Parameter foo",
},
new Gcore.Inputs.FastedgeTemplateParamArgs
{
Name = "bar",
Type = "number",
Descr = "Parameter bar",
},
},
});
var appFromTemplate = new Gcore.FastedgeApp("appFromTemplate", new()
{
Status = "enabled",
Comment = "Terraform test app 2",
Template = testTemplate.FastedgeTemplateId,
Env =
{
{ "foo", "foo_value" },
{ "bar", "123" },
},
Secrets =
{
{ "baz", testSecret.FastedgeSecretId },
},
});
});
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 com.pulumi.gcore.FastedgeBinary;
import com.pulumi.gcore.FastedgeBinaryArgs;
import com.pulumi.gcore.FastedgeApp;
import com.pulumi.gcore.FastedgeAppArgs;
import com.pulumi.gcore.FastedgeTemplate;
import com.pulumi.gcore.FastedgeTemplateArgs;
import com.pulumi.gcore.inputs.FastedgeTemplateParamArgs;
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());
var testBinary = new FastedgeBinary("testBinary", FastedgeBinaryArgs.builder()
.filename("test.wasm")
.build());
var appFromBinary = new FastedgeApp("appFromBinary", FastedgeAppArgs.builder()
.status("enabled")
.comment("Terraform test app 1")
.binary(testBinary.fastedgeBinaryId())
.env(Map.of("foo", "bar"))
.build());
var testTemplate = new FastedgeTemplate("testTemplate", FastedgeTemplateArgs.builder()
.binary(testBinary.fastedgeBinaryId())
.shortDescr("short description")
.longDescr("long description")
.params(
FastedgeTemplateParamArgs.builder()
.name("foo")
.type("string")
.mandatory(true)
.descr("Parameter foo")
.build(),
FastedgeTemplateParamArgs.builder()
.name("bar")
.type("number")
.descr("Parameter bar")
.build())
.build());
var appFromTemplate = new FastedgeApp("appFromTemplate", FastedgeAppArgs.builder()
.status("enabled")
.comment("Terraform test app 2")
.template(testTemplate.fastedgeTemplateId())
.env(Map.ofEntries(
Map.entry("foo", "foo_value"),
Map.entry("bar", 123)
))
.secrets(Map.of("baz", testSecret.fastedgeSecretId()))
.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}
testBinary:
type: gcore:FastedgeBinary
properties:
filename: test.wasm
appFromBinary:
type: gcore:FastedgeApp
properties:
status: enabled
comment: Terraform test app 1
binary: ${testBinary.fastedgeBinaryId}
env:
foo: bar
testTemplate:
type: gcore:FastedgeTemplate
properties:
binary: ${testBinary.fastedgeBinaryId}
shortDescr: short description
longDescr: long description
params:
- name: foo
type: string
mandatory: true
descr: Parameter foo
- name: bar
type: number
descr: Parameter bar
appFromTemplate:
type: gcore:FastedgeApp
properties:
status: enabled
comment: Terraform test app 2
template: ${testTemplate.fastedgeTemplateId}
env:
foo: foo_value
bar: 123
secrets:
baz: ${testSecret.fastedgeSecretId}
Create FastedgeApp Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FastedgeApp(name: string, args: FastedgeAppArgs, opts?: CustomResourceOptions);
@overload
def FastedgeApp(resource_name: str,
args: FastedgeAppArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FastedgeApp(resource_name: str,
opts: Optional[ResourceOptions] = None,
status: Optional[str] = None,
binary: Optional[float] = None,
comment: Optional[str] = None,
debug: Optional[bool] = None,
env: Optional[Mapping[str, str]] = None,
fastedge_app_id: Optional[str] = None,
name: Optional[str] = None,
rsp_headers: Optional[Mapping[str, str]] = None,
secrets: Optional[Mapping[str, float]] = None,
template: Optional[float] = None)
func NewFastedgeApp(ctx *Context, name string, args FastedgeAppArgs, opts ...ResourceOption) (*FastedgeApp, error)
public FastedgeApp(string name, FastedgeAppArgs args, CustomResourceOptions? opts = null)
public FastedgeApp(String name, FastedgeAppArgs args)
public FastedgeApp(String name, FastedgeAppArgs args, CustomResourceOptions options)
type: gcore:FastedgeApp
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 FastedgeAppArgs
- 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 FastedgeAppArgs
- 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 FastedgeAppArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FastedgeAppArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FastedgeAppArgs
- 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 fastedgeAppResource = new Gcore.FastedgeApp("fastedgeAppResource", new()
{
Status = "string",
Binary = 0,
Comment = "string",
Debug = false,
Env =
{
{ "string", "string" },
},
FastedgeAppId = "string",
Name = "string",
RspHeaders =
{
{ "string", "string" },
},
Secrets =
{
{ "string", 0 },
},
Template = 0,
});
example, err := gcore.NewFastedgeApp(ctx, "fastedgeAppResource", &gcore.FastedgeAppArgs{
Status: pulumi.String("string"),
Binary: pulumi.Float64(0),
Comment: pulumi.String("string"),
Debug: pulumi.Bool(false),
Env: pulumi.StringMap{
"string": pulumi.String("string"),
},
FastedgeAppId: pulumi.String("string"),
Name: pulumi.String("string"),
RspHeaders: pulumi.StringMap{
"string": pulumi.String("string"),
},
Secrets: pulumi.Float64Map{
"string": pulumi.Float64(0),
},
Template: pulumi.Float64(0),
})
var fastedgeAppResource = new FastedgeApp("fastedgeAppResource", FastedgeAppArgs.builder()
.status("string")
.binary(0)
.comment("string")
.debug(false)
.env(Map.of("string", "string"))
.fastedgeAppId("string")
.name("string")
.rspHeaders(Map.of("string", "string"))
.secrets(Map.of("string", 0))
.template(0)
.build());
fastedge_app_resource = gcore.FastedgeApp("fastedgeAppResource",
status="string",
binary=0,
comment="string",
debug=False,
env={
"string": "string",
},
fastedge_app_id="string",
name="string",
rsp_headers={
"string": "string",
},
secrets={
"string": 0,
},
template=0)
const fastedgeAppResource = new gcore.FastedgeApp("fastedgeAppResource", {
status: "string",
binary: 0,
comment: "string",
debug: false,
env: {
string: "string",
},
fastedgeAppId: "string",
name: "string",
rspHeaders: {
string: "string",
},
secrets: {
string: 0,
},
template: 0,
});
type: gcore:FastedgeApp
properties:
binary: 0
comment: string
debug: false
env:
string: string
fastedgeAppId: string
name: string
rspHeaders:
string: string
secrets:
string: 0
status: string
template: 0
FastedgeApp 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 FastedgeApp resource accepts the following input properties:
- Status string
- Status code. Possible values are: enabled, disabled, suspended.
- Binary double
- WebAssembly binary id.
- Comment string
- Application comment.
- Debug bool
- Logging enabled.
- Env Dictionary<string, string>
- Environment variables.
- Fastedge
App stringId - The ID of this resource.
- Name string
- Application name.
- Rsp
Headers Dictionary<string, string> - Response headers.
- Secrets Dictionary<string, double>
- Secret variables.
- Template double
- Application template id.
- Status string
- Status code. Possible values are: enabled, disabled, suspended.
- Binary float64
- WebAssembly binary id.
- Comment string
- Application comment.
- Debug bool
- Logging enabled.
- Env map[string]string
- Environment variables.
- Fastedge
App stringId - The ID of this resource.
- Name string
- Application name.
- Rsp
Headers map[string]string - Response headers.
- Secrets map[string]float64
- Secret variables.
- Template float64
- Application template id.
- status String
- Status code. Possible values are: enabled, disabled, suspended.
- binary Double
- WebAssembly binary id.
- comment String
- Application comment.
- debug Boolean
- Logging enabled.
- env Map<String,String>
- Environment variables.
- fastedge
App StringId - The ID of this resource.
- name String
- Application name.
- rsp
Headers Map<String,String> - Response headers.
- secrets Map<String,Double>
- Secret variables.
- template Double
- Application template id.
- status string
- Status code. Possible values are: enabled, disabled, suspended.
- binary number
- WebAssembly binary id.
- comment string
- Application comment.
- debug boolean
- Logging enabled.
- env {[key: string]: string}
- Environment variables.
- fastedge
App stringId - The ID of this resource.
- name string
- Application name.
- rsp
Headers {[key: string]: string} - Response headers.
- secrets {[key: string]: number}
- Secret variables.
- template number
- Application template id.
- status str
- Status code. Possible values are: enabled, disabled, suspended.
- binary float
- WebAssembly binary id.
- comment str
- Application comment.
- debug bool
- Logging enabled.
- env Mapping[str, str]
- Environment variables.
- fastedge_
app_ strid - The ID of this resource.
- name str
- Application name.
- rsp_
headers Mapping[str, str] - Response headers.
- secrets Mapping[str, float]
- Secret variables.
- template float
- Application template id.
- status String
- Status code. Possible values are: enabled, disabled, suspended.
- binary Number
- WebAssembly binary id.
- comment String
- Application comment.
- debug Boolean
- Logging enabled.
- env Map<String>
- Environment variables.
- fastedge
App StringId - The ID of this resource.
- name String
- Application name.
- rsp
Headers Map<String> - Response headers.
- secrets Map<Number>
- Secret variables.
- template Number
- Application template id.
Outputs
All input properties are implicitly available as output properties. Additionally, the FastedgeApp 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 FastedgeApp Resource
Get an existing FastedgeApp 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?: FastedgeAppState, opts?: CustomResourceOptions): FastedgeApp
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
binary: Optional[float] = None,
comment: Optional[str] = None,
debug: Optional[bool] = None,
env: Optional[Mapping[str, str]] = None,
fastedge_app_id: Optional[str] = None,
name: Optional[str] = None,
rsp_headers: Optional[Mapping[str, str]] = None,
secrets: Optional[Mapping[str, float]] = None,
status: Optional[str] = None,
template: Optional[float] = None) -> FastedgeApp
func GetFastedgeApp(ctx *Context, name string, id IDInput, state *FastedgeAppState, opts ...ResourceOption) (*FastedgeApp, error)
public static FastedgeApp Get(string name, Input<string> id, FastedgeAppState? state, CustomResourceOptions? opts = null)
public static FastedgeApp get(String name, Output<String> id, FastedgeAppState state, CustomResourceOptions options)
resources: _: type: gcore:FastedgeApp 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.
- Binary double
- WebAssembly binary id.
- Comment string
- Application comment.
- Debug bool
- Logging enabled.
- Env Dictionary<string, string>
- Environment variables.
- Fastedge
App stringId - The ID of this resource.
- Name string
- Application name.
- Rsp
Headers Dictionary<string, string> - Response headers.
- Secrets Dictionary<string, double>
- Secret variables.
- Status string
- Status code. Possible values are: enabled, disabled, suspended.
- Template double
- Application template id.
- Binary float64
- WebAssembly binary id.
- Comment string
- Application comment.
- Debug bool
- Logging enabled.
- Env map[string]string
- Environment variables.
- Fastedge
App stringId - The ID of this resource.
- Name string
- Application name.
- Rsp
Headers map[string]string - Response headers.
- Secrets map[string]float64
- Secret variables.
- Status string
- Status code. Possible values are: enabled, disabled, suspended.
- Template float64
- Application template id.
- binary Double
- WebAssembly binary id.
- comment String
- Application comment.
- debug Boolean
- Logging enabled.
- env Map<String,String>
- Environment variables.
- fastedge
App StringId - The ID of this resource.
- name String
- Application name.
- rsp
Headers Map<String,String> - Response headers.
- secrets Map<String,Double>
- Secret variables.
- status String
- Status code. Possible values are: enabled, disabled, suspended.
- template Double
- Application template id.
- binary number
- WebAssembly binary id.
- comment string
- Application comment.
- debug boolean
- Logging enabled.
- env {[key: string]: string}
- Environment variables.
- fastedge
App stringId - The ID of this resource.
- name string
- Application name.
- rsp
Headers {[key: string]: string} - Response headers.
- secrets {[key: string]: number}
- Secret variables.
- status string
- Status code. Possible values are: enabled, disabled, suspended.
- template number
- Application template id.
- binary float
- WebAssembly binary id.
- comment str
- Application comment.
- debug bool
- Logging enabled.
- env Mapping[str, str]
- Environment variables.
- fastedge_
app_ strid - The ID of this resource.
- name str
- Application name.
- rsp_
headers Mapping[str, str] - Response headers.
- secrets Mapping[str, float]
- Secret variables.
- status str
- Status code. Possible values are: enabled, disabled, suspended.
- template float
- Application template id.
- binary Number
- WebAssembly binary id.
- comment String
- Application comment.
- debug Boolean
- Logging enabled.
- env Map<String>
- Environment variables.
- fastedge
App StringId - The ID of this resource.
- name String
- Application name.
- rsp
Headers Map<String> - Response headers.
- secrets Map<Number>
- Secret variables.
- status String
- Status code. Possible values are: enabled, disabled, suspended.
- template Number
- Application template id.
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcore
Terraform Provider.