1. Packages
  2. Prodvana
  3. API Docs
  4. RuntimeLink
Prodvana v0.1.20 published on Tuesday, Apr 2, 2024 by Prodvana

prodvana.RuntimeLink

Explore with Pulumi AI

(Alpha! This feature is still in progress.) A runtime_link resource represents a successfully linked runtime. This is most useful for Kubernetes runtimes – the agent must be installed and registered with the Prodvana service before the runtime can be used. Pair this with an explicit depends_on block ensures that the runtime is ready before attempting to use it. See the example below.

Example Usage

Coming soon!

Coming soon!

package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.prodvana.K8sRuntime;
import com.pulumi.kubernetes.kubernetes_namespace;
import com.pulumi.kubernetes.Kubernetes_namespaceArgs;
import com.pulumi.kubernetes.kubernetes_service_account;
import com.pulumi.kubernetes.Kubernetes_service_accountArgs;
import com.pulumi.kubernetes.kubernetes_cluster_role_binding;
import com.pulumi.kubernetes.Kubernetes_cluster_role_bindingArgs;
import com.pulumi.kubernetes.kubernetes_deployment;
import com.pulumi.kubernetes.Kubernetes_deploymentArgs;
import com.pulumi.prodvana.RuntimeLink;
import com.pulumi.prodvana.RuntimeLinkArgs;
import com.pulumi.prodvana.ReleaseChannel;
import com.pulumi.prodvana.ReleaseChannelArgs;
import com.pulumi.prodvana.inputs.ReleaseChannelRuntimeArgs;
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 exampleK8sRuntime = new K8sRuntime("exampleK8sRuntime");

        var prodvanakubernetes_namespace = new Kubernetes_namespace("prodvanakubernetes_namespace", Kubernetes_namespaceArgs.builder()        
            .metadata(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
            .build());

        var prodvanakubernetes_service_account = new Kubernetes_service_account("prodvanakubernetes_service_account", Kubernetes_service_accountArgs.builder()        
            .metadata(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
            .build());

        var prodvanakubernetes_cluster_role_binding = new Kubernetes_cluster_role_binding("prodvanakubernetes_cluster_role_binding", Kubernetes_cluster_role_bindingArgs.builder()        
            .metadata(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
            .roleRef(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
            .subject(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
            .build());

        var agent = new Kubernetes_deployment("agent", Kubernetes_deploymentArgs.builder()        
            .metadata(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
            .spec(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
            .build());

        var exampleRuntimeLink = new RuntimeLink("exampleRuntimeLink", RuntimeLinkArgs.builder()        
            .id(exampleK8sRuntime.id())
            .build());

        var exampleReleaseChannel = new ReleaseChannel("exampleReleaseChannel", ReleaseChannelArgs.builder()        
            .runtimes(ReleaseChannelRuntimeArgs.builder()
                .runtime(exampleRuntimeLink.name())
                .build())
            .build());

    }
}
Copy

Coming soon!

Coming soon!

resources:
  # create the runtime placeholder in Prodvana
  exampleK8sRuntime: # <...Full Kubernetes setup elided...>
    type: prodvana:K8sRuntime
  # deploy the Prodvana agent to the Kubernetes cluster
  # NOTE: this is an example and may not be complete, see
  # https://docs.prodvana.io for the latest agent configuration details
  prodvanakubernetes_namespace:
    type: kubernetes:kubernetes_namespace
    properties:
      metadata:
        - name: prodvana
  prodvanakubernetes_service_account:
    type: kubernetes:kubernetes_service_account
    properties:
      metadata:
        - name: prodvana
          namespace: ${prodvanakubernetes_namespace.metadata[0].name}
  prodvanakubernetes_cluster_role_binding:
    type: kubernetes:kubernetes_cluster_role_binding
    properties:
      metadata:
        - name: prodvana-access
      roleRef:
        - apiGroup: rbac.authorization.k8s.io
          kind: ClusterRole
          name: cluster-admin
      subject:
        - kind: ServiceAccount
          name: prodvana
          namespace: ${prodvanakubernetes_namespace.metadata[0].name}
  agent:
    type: kubernetes:kubernetes_deployment
    properties:
      metadata:
        - name: prodvana-agent
          namespace: ${prodvanakubernetes_namespace.metadata[0].name}
      spec:
        - replicas: 1
          selector:
            - matchLabels:
                app: prodvana-agent
          template:
            - metadata:
                - labels:
                    app: prodvana-agent
              spec:
                - serviceAccountName: ${prodvanakubernetes_service_account.metadata[0].name}
                  container:
                    - name: agent
                      image: ${resource.prodvana_k8s_runtime.cluster.agent_image}
                      args: ${resource.prodvana_k8s_runtime.cluster.agent_args}
  # this resource will complete only after the agent
  # registers itself with the Prodvana API
  exampleRuntimeLink:
    type: prodvana:RuntimeLink
    properties:
      id: ${exampleK8sRuntime.id}
  exampleReleaseChannel:
    type: prodvana:ReleaseChannel
    properties:
      runtimes:
        - runtime: ${exampleRuntimeLink.name}
Copy

Create RuntimeLink Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new RuntimeLink(name: string, args?: RuntimeLinkArgs, opts?: CustomResourceOptions);
@overload
def RuntimeLink(resource_name: str,
                args: Optional[RuntimeLinkArgs] = None,
                opts: Optional[ResourceOptions] = None)

@overload
def RuntimeLink(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                name: Optional[str] = None,
                timeout: Optional[str] = None)
func NewRuntimeLink(ctx *Context, name string, args *RuntimeLinkArgs, opts ...ResourceOption) (*RuntimeLink, error)
public RuntimeLink(string name, RuntimeLinkArgs? args = null, CustomResourceOptions? opts = null)
public RuntimeLink(String name, RuntimeLinkArgs args)
public RuntimeLink(String name, RuntimeLinkArgs args, CustomResourceOptions options)
type: prodvana:RuntimeLink
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 RuntimeLinkArgs
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 RuntimeLinkArgs
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 RuntimeLinkArgs
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 RuntimeLinkArgs
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. RuntimeLinkArgs
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 runtimeLinkResource = new Prodvana.RuntimeLink("runtimeLinkResource", new()
{
    Name = "string",
    Timeout = "string",
});
Copy
example, err := prodvana.NewRuntimeLink(ctx, "runtimeLinkResource", &prodvana.RuntimeLinkArgs{
	Name:    pulumi.String("string"),
	Timeout: pulumi.String("string"),
})
Copy
var runtimeLinkResource = new RuntimeLink("runtimeLinkResource", RuntimeLinkArgs.builder()
    .name("string")
    .timeout("string")
    .build());
Copy
runtime_link_resource = prodvana.RuntimeLink("runtimeLinkResource",
    name="string",
    timeout="string")
Copy
const runtimeLinkResource = new prodvana.RuntimeLink("runtimeLinkResource", {
    name: "string",
    timeout: "string",
});
Copy
type: prodvana:RuntimeLink
properties:
    name: string
    timeout: string
Copy

RuntimeLink 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 RuntimeLink resource accepts the following input properties:

Name string
Name of the runtime to wait for linking.
Timeout string
How long to wait for the runtime linking to complete. A valid Go duration string, e.g. 10m or 1h. Defaults to 10m
Name string
Name of the runtime to wait for linking.
Timeout string
How long to wait for the runtime linking to complete. A valid Go duration string, e.g. 10m or 1h. Defaults to 10m
name String
Name of the runtime to wait for linking.
timeout String
How long to wait for the runtime linking to complete. A valid Go duration string, e.g. 10m or 1h. Defaults to 10m
name string
Name of the runtime to wait for linking.
timeout string
How long to wait for the runtime linking to complete. A valid Go duration string, e.g. 10m or 1h. Defaults to 10m
name str
Name of the runtime to wait for linking.
timeout str
How long to wait for the runtime linking to complete. A valid Go duration string, e.g. 10m or 1h. Defaults to 10m
name String
Name of the runtime to wait for linking.
timeout String
How long to wait for the runtime linking to complete. A valid Go duration string, e.g. 10m or 1h. Defaults to 10m

Outputs

All input properties are implicitly available as output properties. Additionally, the RuntimeLink 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 RuntimeLink Resource

Get an existing RuntimeLink 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?: RuntimeLinkState, opts?: CustomResourceOptions): RuntimeLink
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        name: Optional[str] = None,
        timeout: Optional[str] = None) -> RuntimeLink
func GetRuntimeLink(ctx *Context, name string, id IDInput, state *RuntimeLinkState, opts ...ResourceOption) (*RuntimeLink, error)
public static RuntimeLink Get(string name, Input<string> id, RuntimeLinkState? state, CustomResourceOptions? opts = null)
public static RuntimeLink get(String name, Output<String> id, RuntimeLinkState state, CustomResourceOptions options)
resources:  _:    type: prodvana:RuntimeLink    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:
Name string
Name of the runtime to wait for linking.
Timeout string
How long to wait for the runtime linking to complete. A valid Go duration string, e.g. 10m or 1h. Defaults to 10m
Name string
Name of the runtime to wait for linking.
Timeout string
How long to wait for the runtime linking to complete. A valid Go duration string, e.g. 10m or 1h. Defaults to 10m
name String
Name of the runtime to wait for linking.
timeout String
How long to wait for the runtime linking to complete. A valid Go duration string, e.g. 10m or 1h. Defaults to 10m
name string
Name of the runtime to wait for linking.
timeout string
How long to wait for the runtime linking to complete. A valid Go duration string, e.g. 10m or 1h. Defaults to 10m
name str
Name of the runtime to wait for linking.
timeout str
How long to wait for the runtime linking to complete. A valid Go duration string, e.g. 10m or 1h. Defaults to 10m
name String
Name of the runtime to wait for linking.
timeout String
How long to wait for the runtime linking to complete. A valid Go duration string, e.g. 10m or 1h. Defaults to 10m

Package Details

Repository
prodvana prodvana/pulumi-prodvana
License
Apache-2.0
Notes
This Pulumi package is based on the prodvana Terraform Provider.