gcore.InferenceSecret
Explore with Pulumi AI
Represent inference secret. Specify this secret if you are using an AWS SQS-based trigger for inference deployment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const project = gcore.getProject({
name: "Default",
});
const aws = new gcore.InferenceSecret("aws", {
projectId: project.then(project => project.id),
dataAwsAccessKeyId: "my-aws-access-key-id",
dataAwsSecretAccessKey: "my-aws-access-key",
});
import pulumi
import pulumi_gcore as gcore
project = gcore.get_project(name="Default")
aws = gcore.InferenceSecret("aws",
project_id=project.id,
data_aws_access_key_id="my-aws-access-key-id",
data_aws_secret_access_key="my-aws-access-key")
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 {
project, err := gcore.GetProject(ctx, &gcore.GetProjectArgs{
Name: "Default",
}, nil)
if err != nil {
return err
}
_, err = gcore.NewInferenceSecret(ctx, "aws", &gcore.InferenceSecretArgs{
ProjectId: pulumi.String(project.Id),
DataAwsAccessKeyId: pulumi.String("my-aws-access-key-id"),
DataAwsSecretAccessKey: pulumi.String("my-aws-access-key"),
})
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 project = Gcore.GetProject.Invoke(new()
{
Name = "Default",
});
var aws = new Gcore.InferenceSecret("aws", new()
{
ProjectId = project.Apply(getProjectResult => getProjectResult.Id),
DataAwsAccessKeyId = "my-aws-access-key-id",
DataAwsSecretAccessKey = "my-aws-access-key",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.GcoreFunctions;
import com.pulumi.gcore.inputs.GetProjectArgs;
import com.pulumi.gcore.InferenceSecret;
import com.pulumi.gcore.InferenceSecretArgs;
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 project = GcoreFunctions.getProject(GetProjectArgs.builder()
.name("Default")
.build());
var aws = new InferenceSecret("aws", InferenceSecretArgs.builder()
.projectId(project.applyValue(getProjectResult -> getProjectResult.id()))
.dataAwsAccessKeyId("my-aws-access-key-id")
.dataAwsSecretAccessKey("my-aws-access-key")
.build());
}
}
resources:
aws:
type: gcore:InferenceSecret
properties:
projectId: ${project.id}
dataAwsAccessKeyId: my-aws-access-key-id
dataAwsSecretAccessKey: my-aws-access-key
variables:
project:
fn::invoke:
function: gcore:getProject
arguments:
name: Default
Create InferenceSecret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InferenceSecret(name: string, args: InferenceSecretArgs, opts?: CustomResourceOptions);
@overload
def InferenceSecret(resource_name: str,
args: InferenceSecretArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InferenceSecret(resource_name: str,
opts: Optional[ResourceOptions] = None,
data_aws_access_key_id: Optional[str] = None,
data_aws_secret_access_key: Optional[str] = None,
inference_secret_id: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None)
func NewInferenceSecret(ctx *Context, name string, args InferenceSecretArgs, opts ...ResourceOption) (*InferenceSecret, error)
public InferenceSecret(string name, InferenceSecretArgs args, CustomResourceOptions? opts = null)
public InferenceSecret(String name, InferenceSecretArgs args)
public InferenceSecret(String name, InferenceSecretArgs args, CustomResourceOptions options)
type: gcore:InferenceSecret
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 InferenceSecretArgs
- 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 InferenceSecretArgs
- 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 InferenceSecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InferenceSecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InferenceSecretArgs
- 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 inferenceSecretResource = new Gcore.InferenceSecret("inferenceSecretResource", new()
{
DataAwsAccessKeyId = "string",
DataAwsSecretAccessKey = "string",
InferenceSecretId = "string",
Name = "string",
ProjectId = 0,
ProjectName = "string",
});
example, err := gcore.NewInferenceSecret(ctx, "inferenceSecretResource", &gcore.InferenceSecretArgs{
DataAwsAccessKeyId: pulumi.String("string"),
DataAwsSecretAccessKey: pulumi.String("string"),
InferenceSecretId: pulumi.String("string"),
Name: pulumi.String("string"),
ProjectId: pulumi.Float64(0),
ProjectName: pulumi.String("string"),
})
var inferenceSecretResource = new InferenceSecret("inferenceSecretResource", InferenceSecretArgs.builder()
.dataAwsAccessKeyId("string")
.dataAwsSecretAccessKey("string")
.inferenceSecretId("string")
.name("string")
.projectId(0)
.projectName("string")
.build());
inference_secret_resource = gcore.InferenceSecret("inferenceSecretResource",
data_aws_access_key_id="string",
data_aws_secret_access_key="string",
inference_secret_id="string",
name="string",
project_id=0,
project_name="string")
const inferenceSecretResource = new gcore.InferenceSecret("inferenceSecretResource", {
dataAwsAccessKeyId: "string",
dataAwsSecretAccessKey: "string",
inferenceSecretId: "string",
name: "string",
projectId: 0,
projectName: "string",
});
type: gcore:InferenceSecret
properties:
dataAwsAccessKeyId: string
dataAwsSecretAccessKey: string
inferenceSecretId: string
name: string
projectId: 0
projectName: string
InferenceSecret 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 InferenceSecret resource accepts the following input properties:
- Data
Aws stringAccess Key Id - Data
Aws stringSecret Access Key - Inference
Secret stringId - The ID of this resource.
- Name string
- Project
Id double - Project
Name string
- Data
Aws stringAccess Key Id - Data
Aws stringSecret Access Key - Inference
Secret stringId - The ID of this resource.
- Name string
- Project
Id float64 - Project
Name string
- data
Aws StringAccess Key Id - data
Aws StringSecret Access Key - inference
Secret StringId - The ID of this resource.
- name String
- project
Id Double - project
Name String
- data
Aws stringAccess Key Id - data
Aws stringSecret Access Key - inference
Secret stringId - The ID of this resource.
- name string
- project
Id number - project
Name string
- data_
aws_ straccess_ key_ id - data_
aws_ strsecret_ access_ key - inference_
secret_ strid - The ID of this resource.
- name str
- project_
id float - project_
name str
- data
Aws StringAccess Key Id - data
Aws StringSecret Access Key - inference
Secret StringId - The ID of this resource.
- name String
- project
Id Number - project
Name String
Outputs
All input properties are implicitly available as output properties. Additionally, the InferenceSecret resource produces the following output properties:
Look up Existing InferenceSecret Resource
Get an existing InferenceSecret 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?: InferenceSecretState, opts?: CustomResourceOptions): InferenceSecret
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
data_aws_access_key_id: Optional[str] = None,
data_aws_secret_access_key: Optional[str] = None,
inference_secret_id: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
type: Optional[str] = None) -> InferenceSecret
func GetInferenceSecret(ctx *Context, name string, id IDInput, state *InferenceSecretState, opts ...ResourceOption) (*InferenceSecret, error)
public static InferenceSecret Get(string name, Input<string> id, InferenceSecretState? state, CustomResourceOptions? opts = null)
public static InferenceSecret get(String name, Output<String> id, InferenceSecretState state, CustomResourceOptions options)
resources: _: type: gcore:InferenceSecret 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.
- Data
Aws stringAccess Key Id - Data
Aws stringSecret Access Key - Inference
Secret stringId - The ID of this resource.
- Name string
- Project
Id double - Project
Name string - Type string
- Data
Aws stringAccess Key Id - Data
Aws stringSecret Access Key - Inference
Secret stringId - The ID of this resource.
- Name string
- Project
Id float64 - Project
Name string - Type string
- data
Aws StringAccess Key Id - data
Aws StringSecret Access Key - inference
Secret StringId - The ID of this resource.
- name String
- project
Id Double - project
Name String - type String
- data
Aws stringAccess Key Id - data
Aws stringSecret Access Key - inference
Secret stringId - The ID of this resource.
- name string
- project
Id number - project
Name string - type string
- data_
aws_ straccess_ key_ id - data_
aws_ strsecret_ access_ key - inference_
secret_ strid - The ID of this resource.
- name str
- project_
id float - project_
name str - type str
- data
Aws StringAccess Key Id - data
Aws StringSecret Access Key - inference
Secret StringId - The ID of this resource.
- name String
- project
Id Number - project
Name String - type String
Import
import using <project_id>:<secret_name> format
$ pulumi import gcore:index/inferenceSecret:InferenceSecret aws 1:my-secret-name
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.