1. Packages
  2. Gcore Provider
  3. API Docs
  4. InferenceSecret
gcore 0.20.0 published on Tuesday, Apr 22, 2025 by g-core

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
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
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. InferenceSecretArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. InferenceSecretArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. InferenceSecretArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
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"),
})
Copy
var inferenceSecretResource = new InferenceSecret("inferenceSecretResource", InferenceSecretArgs.builder()
    .dataAwsAccessKeyId("string")
    .dataAwsSecretAccessKey("string")
    .inferenceSecretId("string")
    .name("string")
    .projectId(0)
    .projectName("string")
    .build());
Copy
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")
Copy
const inferenceSecretResource = new gcore.InferenceSecret("inferenceSecretResource", {
    dataAwsAccessKeyId: "string",
    dataAwsSecretAccessKey: "string",
    inferenceSecretId: "string",
    name: "string",
    projectId: 0,
    projectName: "string",
});
Copy
type: gcore:InferenceSecret
properties:
    dataAwsAccessKeyId: string
    dataAwsSecretAccessKey: string
    inferenceSecretId: string
    name: string
    projectId: 0
    projectName: string
Copy

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:

DataAwsAccessKeyId This property is required. string
DataAwsSecretAccessKey This property is required. string
InferenceSecretId string
The ID of this resource.
Name string
ProjectId double
ProjectName string
DataAwsAccessKeyId This property is required. string
DataAwsSecretAccessKey This property is required. string
InferenceSecretId string
The ID of this resource.
Name string
ProjectId float64
ProjectName string
dataAwsAccessKeyId This property is required. String
dataAwsSecretAccessKey This property is required. String
inferenceSecretId String
The ID of this resource.
name String
projectId Double
projectName String
dataAwsAccessKeyId This property is required. string
dataAwsSecretAccessKey This property is required. string
inferenceSecretId string
The ID of this resource.
name string
projectId number
projectName string
data_aws_access_key_id This property is required. str
data_aws_secret_access_key This property is required. str
inference_secret_id str
The ID of this resource.
name str
project_id float
project_name str
dataAwsAccessKeyId This property is required. String
dataAwsSecretAccessKey This property is required. String
inferenceSecretId String
The ID of this resource.
name String
projectId Number
projectName String

Outputs

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

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

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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
DataAwsAccessKeyId string
DataAwsSecretAccessKey string
InferenceSecretId string
The ID of this resource.
Name string
ProjectId double
ProjectName string
Type string
DataAwsAccessKeyId string
DataAwsSecretAccessKey string
InferenceSecretId string
The ID of this resource.
Name string
ProjectId float64
ProjectName string
Type string
dataAwsAccessKeyId String
dataAwsSecretAccessKey String
inferenceSecretId String
The ID of this resource.
name String
projectId Double
projectName String
type String
dataAwsAccessKeyId string
dataAwsSecretAccessKey string
inferenceSecretId string
The ID of this resource.
name string
projectId number
projectName string
type string
dataAwsAccessKeyId String
dataAwsSecretAccessKey String
inferenceSecretId String
The ID of this resource.
name String
projectId Number
projectName String
type String

Import

import using <project_id>:<secret_name> format

$ pulumi import gcore:index/inferenceSecret:InferenceSecret aws 1:my-secret-name
Copy

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.