hsdp.AiWorkspace
Explore with Pulumi AI
Manages HSDP AI Workspace instances
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as hsdp from "@pulumi/hsdp";
const workspace = hsdp.getConfig({
service: "workspace",
});
const ws = workspace.then(workspace => hsdp.getAiWorkspaceServiceInstance({
baseUrl: workspace.url,
organizationId: _var.workspace_tenant_org_id,
}));
const workspace1 = new hsdp.AiWorkspace("workspace1", {
endpoint: data.hsdp_ai_inference_service_instance.inference.endpoint,
description: "Test workspace for my world changing algorithm",
computeTarget: {
identifier: hsdp_ai_workspace_compute_target.target.id,
},
sourceCode: {
url: "git@github.com:loafoe/algo.git",
branch: "main",
commitId: "e1f9366",
sshKey: "...",
},
labels: ["CNN"],
});
import pulumi
import pulumi_hsdp as hsdp
workspace = hsdp.get_config(service="workspace")
ws = hsdp.get_ai_workspace_service_instance(base_url=workspace.url,
organization_id=var["workspace_tenant_org_id"])
workspace1 = hsdp.AiWorkspace("workspace1",
endpoint=data["hsdp_ai_inference_service_instance"]["inference"]["endpoint"],
description="Test workspace for my world changing algorithm",
compute_target={
"identifier": hsdp_ai_workspace_compute_target["target"]["id"],
},
source_code={
"url": "git@github.com:loafoe/algo.git",
"branch": "main",
"commit_id": "e1f9366",
"ssh_key": "...",
},
labels=["CNN"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/hsdp/hsdp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
workspace, err := hsdp.GetConfig(ctx, &hsdp.GetConfigArgs{
Service: "workspace",
}, nil)
if err != nil {
return err
}
_, err = hsdp.GetAiWorkspaceServiceInstance(ctx, &hsdp.GetAiWorkspaceServiceInstanceArgs{
BaseUrl: workspace.Url,
OrganizationId: _var.Workspace_tenant_org_id,
}, nil)
if err != nil {
return err
}
_, err = hsdp.NewAiWorkspace(ctx, "workspace1", &hsdp.AiWorkspaceArgs{
Endpoint: pulumi.Any(data.Hsdp_ai_inference_service_instance.Inference.Endpoint),
Description: pulumi.String("Test workspace for my world changing algorithm"),
ComputeTarget: &hsdp.AiWorkspaceComputeTargetTypeArgs{
Identifier: pulumi.Any(hsdp_ai_workspace_compute_target.Target.Id),
},
SourceCode: &hsdp.AiWorkspaceSourceCodeArgs{
Url: pulumi.String("git@github.com:loafoe/algo.git"),
Branch: pulumi.String("main"),
CommitId: pulumi.String("e1f9366"),
SshKey: pulumi.String("..."),
},
Labels: pulumi.StringArray{
pulumi.String("CNN"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Hsdp = Pulumi.Hsdp;
return await Deployment.RunAsync(() =>
{
var workspace = Hsdp.GetConfig.Invoke(new()
{
Service = "workspace",
});
var ws = Hsdp.GetAiWorkspaceServiceInstance.Invoke(new()
{
BaseUrl = workspace.Apply(getConfigResult => getConfigResult.Url),
OrganizationId = @var.Workspace_tenant_org_id,
});
var workspace1 = new Hsdp.AiWorkspace("workspace1", new()
{
Endpoint = data.Hsdp_ai_inference_service_instance.Inference.Endpoint,
Description = "Test workspace for my world changing algorithm",
ComputeTarget = new Hsdp.Inputs.AiWorkspaceComputeTargetArgs
{
Identifier = hsdp_ai_workspace_compute_target.Target.Id,
},
SourceCode = new Hsdp.Inputs.AiWorkspaceSourceCodeArgs
{
Url = "git@github.com:loafoe/algo.git",
Branch = "main",
CommitId = "e1f9366",
SshKey = "...",
},
Labels = new[]
{
"CNN",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hsdp.HsdpFunctions;
import com.pulumi.hsdp.inputs.GetConfigArgs;
import com.pulumi.hsdp.inputs.GetAiWorkspaceServiceInstanceArgs;
import com.pulumi.hsdp.AiWorkspace;
import com.pulumi.hsdp.AiWorkspaceArgs;
import com.pulumi.hsdp.inputs.AiWorkspaceComputeTargetArgs;
import com.pulumi.hsdp.inputs.AiWorkspaceSourceCodeArgs;
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 workspace = HsdpFunctions.getConfig(GetConfigArgs.builder()
.service("workspace")
.build());
final var ws = HsdpFunctions.getAiWorkspaceServiceInstance(GetAiWorkspaceServiceInstanceArgs.builder()
.baseUrl(workspace.applyValue(getConfigResult -> getConfigResult.url()))
.organizationId(var_.workspace_tenant_org_id())
.build());
var workspace1 = new AiWorkspace("workspace1", AiWorkspaceArgs.builder()
.endpoint(data.hsdp_ai_inference_service_instance().inference().endpoint())
.description("Test workspace for my world changing algorithm")
.computeTarget(AiWorkspaceComputeTargetArgs.builder()
.identifier(hsdp_ai_workspace_compute_target.target().id())
.build())
.sourceCode(AiWorkspaceSourceCodeArgs.builder()
.url("git@github.com:loafoe/algo.git")
.branch("main")
.commitId("e1f9366")
.sshKey("...")
.build())
.labels("CNN")
.build());
}
}
resources:
workspace1:
type: hsdp:AiWorkspace
properties:
endpoint: ${data.hsdp_ai_inference_service_instance.inference.endpoint}
description: Test workspace for my world changing algorithm
computeTarget:
identifier: ${hsdp_ai_workspace_compute_target.target.id}
sourceCode:
url: git@github.com:loafoe/algo.git
branch: main
commitId: e1f9366
sshKey: '...'
labels:
- CNN
variables:
workspace:
fn::invoke:
function: hsdp:getConfig
arguments:
service: workspace
ws:
fn::invoke:
function: hsdp:getAiWorkspaceServiceInstance
arguments:
baseUrl: ${workspace.url}
organizationId: ${var.workspace_tenant_org_id}
Create AiWorkspace Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AiWorkspace(name: string, args: AiWorkspaceArgs, opts?: CustomResourceOptions);
@overload
def AiWorkspace(resource_name: str,
args: AiWorkspaceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AiWorkspace(resource_name: str,
opts: Optional[ResourceOptions] = None,
endpoint: Optional[str] = None,
additional_configuration: Optional[str] = None,
ai_workspace_id: Optional[str] = None,
compute_target: Optional[AiWorkspaceComputeTargetArgs] = None,
description: Optional[str] = None,
labels: Optional[Sequence[str]] = None,
name: Optional[str] = None,
source_code: Optional[AiWorkspaceSourceCodeArgs] = None)
func NewAiWorkspace(ctx *Context, name string, args AiWorkspaceArgs, opts ...ResourceOption) (*AiWorkspace, error)
public AiWorkspace(string name, AiWorkspaceArgs args, CustomResourceOptions? opts = null)
public AiWorkspace(String name, AiWorkspaceArgs args)
public AiWorkspace(String name, AiWorkspaceArgs args, CustomResourceOptions options)
type: hsdp:AiWorkspace
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 AiWorkspaceArgs
- 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 AiWorkspaceArgs
- 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 AiWorkspaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AiWorkspaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AiWorkspaceArgs
- 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 aiWorkspaceResource = new Hsdp.AiWorkspace("aiWorkspaceResource", new()
{
Endpoint = "string",
AdditionalConfiguration = "string",
AiWorkspaceId = "string",
ComputeTarget = new Hsdp.Inputs.AiWorkspaceComputeTargetArgs
{
Identifier = "string",
Reference = "string",
},
Description = "string",
Labels = new[]
{
"string",
},
Name = "string",
SourceCode = new Hsdp.Inputs.AiWorkspaceSourceCodeArgs
{
Url = "string",
Branch = "string",
CommitId = "string",
SshKey = "string",
},
});
example, err := hsdp.NewAiWorkspace(ctx, "aiWorkspaceResource", &hsdp.AiWorkspaceArgs{
Endpoint: pulumi.String("string"),
AdditionalConfiguration: pulumi.String("string"),
AiWorkspaceId: pulumi.String("string"),
ComputeTarget: &hsdp.AiWorkspaceComputeTargetTypeArgs{
Identifier: pulumi.String("string"),
Reference: pulumi.String("string"),
},
Description: pulumi.String("string"),
Labels: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
SourceCode: &hsdp.AiWorkspaceSourceCodeArgs{
Url: pulumi.String("string"),
Branch: pulumi.String("string"),
CommitId: pulumi.String("string"),
SshKey: pulumi.String("string"),
},
})
var aiWorkspaceResource = new AiWorkspace("aiWorkspaceResource", AiWorkspaceArgs.builder()
.endpoint("string")
.additionalConfiguration("string")
.aiWorkspaceId("string")
.computeTarget(AiWorkspaceComputeTargetArgs.builder()
.identifier("string")
.reference("string")
.build())
.description("string")
.labels("string")
.name("string")
.sourceCode(AiWorkspaceSourceCodeArgs.builder()
.url("string")
.branch("string")
.commitId("string")
.sshKey("string")
.build())
.build());
ai_workspace_resource = hsdp.AiWorkspace("aiWorkspaceResource",
endpoint="string",
additional_configuration="string",
ai_workspace_id="string",
compute_target={
"identifier": "string",
"reference": "string",
},
description="string",
labels=["string"],
name="string",
source_code={
"url": "string",
"branch": "string",
"commit_id": "string",
"ssh_key": "string",
})
const aiWorkspaceResource = new hsdp.AiWorkspace("aiWorkspaceResource", {
endpoint: "string",
additionalConfiguration: "string",
aiWorkspaceId: "string",
computeTarget: {
identifier: "string",
reference: "string",
},
description: "string",
labels: ["string"],
name: "string",
sourceCode: {
url: "string",
branch: "string",
commitId: "string",
sshKey: "string",
},
});
type: hsdp:AiWorkspace
properties:
additionalConfiguration: string
aiWorkspaceId: string
computeTarget:
identifier: string
reference: string
description: string
endpoint: string
labels:
- string
name: string
sourceCode:
branch: string
commitId: string
sshKey: string
url: string
AiWorkspace 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 AiWorkspace resource accepts the following input properties:
- Endpoint string
- The AI Inference instance endpoint
- Additional
Configuration string - Ai
Workspace stringId - The GUID of the Model
- Compute
Target AiWorkspace Compute Target - Description string
- Description of the Compute Target
- Labels List<string>
- Name string
- The name of the Model
- Source
Code AiWorkspace Source Code
- Endpoint string
- The AI Inference instance endpoint
- Additional
Configuration string - Ai
Workspace stringId - The GUID of the Model
- Compute
Target AiWorkspace Compute Target Type Args - Description string
- Description of the Compute Target
- Labels []string
- Name string
- The name of the Model
- Source
Code AiWorkspace Source Code Args
- endpoint String
- The AI Inference instance endpoint
- additional
Configuration String - ai
Workspace StringId - The GUID of the Model
- compute
Target AiWorkspace Compute Target - description String
- Description of the Compute Target
- labels List<String>
- name String
- The name of the Model
- source
Code AiWorkspace Source Code
- endpoint string
- The AI Inference instance endpoint
- additional
Configuration string - ai
Workspace stringId - The GUID of the Model
- compute
Target AiWorkspace Compute Target - description string
- Description of the Compute Target
- labels string[]
- name string
- The name of the Model
- source
Code AiWorkspace Source Code
- endpoint str
- The AI Inference instance endpoint
- additional_
configuration str - ai_
workspace_ strid - The GUID of the Model
- compute_
target AiWorkspace Compute Target Args - description str
- Description of the Compute Target
- labels Sequence[str]
- name str
- The name of the Model
- source_
code AiWorkspace Source Code Args
- endpoint String
- The AI Inference instance endpoint
- additional
Configuration String - ai
Workspace StringId - The GUID of the Model
- compute
Target Property Map - description String
- Description of the Compute Target
- labels List<String>
- name String
- The name of the Model
- source
Code Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the AiWorkspace resource produces the following output properties:
- created str
- The date this Model was created
- created_
by str - Who created the Model
- duration float
- id str
- The provider-assigned unique ID for this managed resource.
- reference str
- status str
- status_
message str
Look up Existing AiWorkspace Resource
Get an existing AiWorkspace 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?: AiWorkspaceState, opts?: CustomResourceOptions): AiWorkspace
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
additional_configuration: Optional[str] = None,
ai_workspace_id: Optional[str] = None,
compute_target: Optional[AiWorkspaceComputeTargetArgs] = None,
created: Optional[str] = None,
created_by: Optional[str] = None,
description: Optional[str] = None,
duration: Optional[float] = None,
endpoint: Optional[str] = None,
labels: Optional[Sequence[str]] = None,
name: Optional[str] = None,
reference: Optional[str] = None,
source_code: Optional[AiWorkspaceSourceCodeArgs] = None,
status: Optional[str] = None,
status_message: Optional[str] = None) -> AiWorkspace
func GetAiWorkspace(ctx *Context, name string, id IDInput, state *AiWorkspaceState, opts ...ResourceOption) (*AiWorkspace, error)
public static AiWorkspace Get(string name, Input<string> id, AiWorkspaceState? state, CustomResourceOptions? opts = null)
public static AiWorkspace get(String name, Output<String> id, AiWorkspaceState state, CustomResourceOptions options)
resources: _: type: hsdp:AiWorkspace 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.
- Additional
Configuration string - Ai
Workspace stringId - The GUID of the Model
- Compute
Target AiWorkspace Compute Target - Created string
- The date this Model was created
- Created
By string - Who created the Model
- Description string
- Description of the Compute Target
- Duration double
- Endpoint string
- The AI Inference instance endpoint
- Labels List<string>
- Name string
- The name of the Model
- Reference string
- Source
Code AiWorkspace Source Code - Status string
- Status
Message string
- Additional
Configuration string - Ai
Workspace stringId - The GUID of the Model
- Compute
Target AiWorkspace Compute Target Type Args - Created string
- The date this Model was created
- Created
By string - Who created the Model
- Description string
- Description of the Compute Target
- Duration float64
- Endpoint string
- The AI Inference instance endpoint
- Labels []string
- Name string
- The name of the Model
- Reference string
- Source
Code AiWorkspace Source Code Args - Status string
- Status
Message string
- additional
Configuration String - ai
Workspace StringId - The GUID of the Model
- compute
Target AiWorkspace Compute Target - created String
- The date this Model was created
- created
By String - Who created the Model
- description String
- Description of the Compute Target
- duration Double
- endpoint String
- The AI Inference instance endpoint
- labels List<String>
- name String
- The name of the Model
- reference String
- source
Code AiWorkspace Source Code - status String
- status
Message String
- additional
Configuration string - ai
Workspace stringId - The GUID of the Model
- compute
Target AiWorkspace Compute Target - created string
- The date this Model was created
- created
By string - Who created the Model
- description string
- Description of the Compute Target
- duration number
- endpoint string
- The AI Inference instance endpoint
- labels string[]
- name string
- The name of the Model
- reference string
- source
Code AiWorkspace Source Code - status string
- status
Message string
- additional_
configuration str - ai_
workspace_ strid - The GUID of the Model
- compute_
target AiWorkspace Compute Target Args - created str
- The date this Model was created
- created_
by str - Who created the Model
- description str
- Description of the Compute Target
- duration float
- endpoint str
- The AI Inference instance endpoint
- labels Sequence[str]
- name str
- The name of the Model
- reference str
- source_
code AiWorkspace Source Code Args - status str
- status_
message str
- additional
Configuration String - ai
Workspace StringId - The GUID of the Model
- compute
Target Property Map - created String
- The date this Model was created
- created
By String - Who created the Model
- description String
- Description of the Compute Target
- duration Number
- endpoint String
- The AI Inference instance endpoint
- labels List<String>
- name String
- The name of the Model
- reference String
- source
Code Property Map - status String
- status
Message String
Supporting Types
AiWorkspaceComputeTarget, AiWorkspaceComputeTargetArgs
- Identifier string
- Reference string
- Reference to the compute target
- Identifier string
- Reference string
- Reference to the compute target
- identifier String
- reference String
- Reference to the compute target
- identifier string
- reference string
- Reference to the compute target
- identifier str
- reference str
- Reference to the compute target
- identifier String
- reference String
- Reference to the compute target
AiWorkspaceSourceCode, AiWorkspaceSourceCodeArgs
Package Details
- Repository
- hsdp philips-software/terraform-provider-hsdp
- License
- Notes
- This Pulumi package is based on the
hsdp
Terraform Provider.