oci.Core.InstanceConsoleConnection
Explore with Pulumi AI
This resource provides the Instance Console Connection resource in Oracle Cloud Infrastructure Core service.
Creates a new console connection to the specified instance. After the console connection has been created and is available, you connect to the console using SSH.
For more information about instance console connections, see Troubleshooting Instances Using Instance Console Connections.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testInstanceConsoleConnection = new oci.core.InstanceConsoleConnection("test_instance_console_connection", {
instanceId: testInstance.id,
publicKey: instanceConsoleConnectionPublicKey,
definedTags: {
"Operations.CostCenter": "42",
},
freeformTags: {
Department: "Finance",
},
});
import pulumi
import pulumi_oci as oci
test_instance_console_connection = oci.core.InstanceConsoleConnection("test_instance_console_connection",
instance_id=test_instance["id"],
public_key=instance_console_connection_public_key,
defined_tags={
"Operations.CostCenter": "42",
},
freeform_tags={
"Department": "Finance",
})
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Core.NewInstanceConsoleConnection(ctx, "test_instance_console_connection", &Core.InstanceConsoleConnectionArgs{
InstanceId: pulumi.Any(testInstance.Id),
PublicKey: pulumi.Any(instanceConsoleConnectionPublicKey),
DefinedTags: pulumi.StringMap{
"Operations.CostCenter": pulumi.String("42"),
},
FreeformTags: pulumi.StringMap{
"Department": pulumi.String("Finance"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testInstanceConsoleConnection = new Oci.Core.InstanceConsoleConnection("test_instance_console_connection", new()
{
InstanceId = testInstance.Id,
PublicKey = instanceConsoleConnectionPublicKey,
DefinedTags =
{
{ "Operations.CostCenter", "42" },
},
FreeformTags =
{
{ "Department", "Finance" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.InstanceConsoleConnection;
import com.pulumi.oci.Core.InstanceConsoleConnectionArgs;
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 testInstanceConsoleConnection = new InstanceConsoleConnection("testInstanceConsoleConnection", InstanceConsoleConnectionArgs.builder()
.instanceId(testInstance.id())
.publicKey(instanceConsoleConnectionPublicKey)
.definedTags(Map.of("Operations.CostCenter", "42"))
.freeformTags(Map.of("Department", "Finance"))
.build());
}
}
resources:
testInstanceConsoleConnection:
type: oci:Core:InstanceConsoleConnection
name: test_instance_console_connection
properties:
instanceId: ${testInstance.id}
publicKey: ${instanceConsoleConnectionPublicKey}
definedTags:
Operations.CostCenter: '42'
freeformTags:
Department: Finance
Create InstanceConsoleConnection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InstanceConsoleConnection(name: string, args: InstanceConsoleConnectionArgs, opts?: CustomResourceOptions);
@overload
def InstanceConsoleConnection(resource_name: str,
args: InstanceConsoleConnectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InstanceConsoleConnection(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
public_key: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
freeform_tags: Optional[Mapping[str, str]] = None)
func NewInstanceConsoleConnection(ctx *Context, name string, args InstanceConsoleConnectionArgs, opts ...ResourceOption) (*InstanceConsoleConnection, error)
public InstanceConsoleConnection(string name, InstanceConsoleConnectionArgs args, CustomResourceOptions? opts = null)
public InstanceConsoleConnection(String name, InstanceConsoleConnectionArgs args)
public InstanceConsoleConnection(String name, InstanceConsoleConnectionArgs args, CustomResourceOptions options)
type: oci:Core:InstanceConsoleConnection
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 InstanceConsoleConnectionArgs
- 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 InstanceConsoleConnectionArgs
- 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 InstanceConsoleConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceConsoleConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceConsoleConnectionArgs
- 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 instanceConsoleConnectionResource = new Oci.Core.InstanceConsoleConnection("instanceConsoleConnectionResource", new()
{
InstanceId = "string",
PublicKey = "string",
DefinedTags =
{
{ "string", "string" },
},
FreeformTags =
{
{ "string", "string" },
},
});
example, err := Core.NewInstanceConsoleConnection(ctx, "instanceConsoleConnectionResource", &Core.InstanceConsoleConnectionArgs{
InstanceId: pulumi.String("string"),
PublicKey: pulumi.String("string"),
DefinedTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
FreeformTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var instanceConsoleConnectionResource = new InstanceConsoleConnection("instanceConsoleConnectionResource", InstanceConsoleConnectionArgs.builder()
.instanceId("string")
.publicKey("string")
.definedTags(Map.of("string", "string"))
.freeformTags(Map.of("string", "string"))
.build());
instance_console_connection_resource = oci.core.InstanceConsoleConnection("instanceConsoleConnectionResource",
instance_id="string",
public_key="string",
defined_tags={
"string": "string",
},
freeform_tags={
"string": "string",
})
const instanceConsoleConnectionResource = new oci.core.InstanceConsoleConnection("instanceConsoleConnectionResource", {
instanceId: "string",
publicKey: "string",
definedTags: {
string: "string",
},
freeformTags: {
string: "string",
},
});
type: oci:Core:InstanceConsoleConnection
properties:
definedTags:
string: string
freeformTags:
string: string
instanceId: string
publicKey: string
InstanceConsoleConnection 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 InstanceConsoleConnection resource accepts the following input properties:
- Instance
Id string - The OCID of the instance to create the console connection to.
- Public
Key string The SSH public key used to authenticate the console connection.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Dictionary<string, string>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Instance
Id string - The OCID of the instance to create the console connection to.
- Public
Key string The SSH public key used to authenticate the console connection.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- map[string]string
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance
Id String - The OCID of the instance to create the console connection to.
- public
Key String The SSH public key used to authenticate the console connection.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Map<String,String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance
Id string - The OCID of the instance to create the console connection to.
- public
Key string The SSH public key used to authenticate the console connection.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- {[key: string]: string}
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance_
id str - The OCID of the instance to create the console connection to.
- public_
key str The SSH public key used to authenticate the console connection.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Mapping[str, str]
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance
Id String - The OCID of the instance to create the console connection to.
- public
Key String The SSH public key used to authenticate the console connection.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Map<String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
Outputs
All input properties are implicitly available as output properties. Additionally, the InstanceConsoleConnection resource produces the following output properties:
- Compartment
Id string - The OCID of the compartment to contain the console connection.
- Connection
String string - The SSH connection string for the console connection.
- Fingerprint string
- The SSH public key's fingerprint for client authentication to the console connection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Host stringKey Fingerprint - The SSH public key's fingerprint for the console connection service host.
- State string
- The current state of the console connection.
- Vnc
Connection stringString - The SSH connection string for the SSH tunnel used to connect to the console connection over VNC.
- Compartment
Id string - The OCID of the compartment to contain the console connection.
- Connection
String string - The SSH connection string for the console connection.
- Fingerprint string
- The SSH public key's fingerprint for client authentication to the console connection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Host stringKey Fingerprint - The SSH public key's fingerprint for the console connection service host.
- State string
- The current state of the console connection.
- Vnc
Connection stringString - The SSH connection string for the SSH tunnel used to connect to the console connection over VNC.
- compartment
Id String - The OCID of the compartment to contain the console connection.
- connection
String String - The SSH connection string for the console connection.
- fingerprint String
- The SSH public key's fingerprint for client authentication to the console connection.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Host StringKey Fingerprint - The SSH public key's fingerprint for the console connection service host.
- state String
- The current state of the console connection.
- vnc
Connection StringString - The SSH connection string for the SSH tunnel used to connect to the console connection over VNC.
- compartment
Id string - The OCID of the compartment to contain the console connection.
- connection
String string - The SSH connection string for the console connection.
- fingerprint string
- The SSH public key's fingerprint for client authentication to the console connection.
- id string
- The provider-assigned unique ID for this managed resource.
- service
Host stringKey Fingerprint - The SSH public key's fingerprint for the console connection service host.
- state string
- The current state of the console connection.
- vnc
Connection stringString - The SSH connection string for the SSH tunnel used to connect to the console connection over VNC.
- compartment_
id str - The OCID of the compartment to contain the console connection.
- connection_
string str - The SSH connection string for the console connection.
- fingerprint str
- The SSH public key's fingerprint for client authentication to the console connection.
- id str
- The provider-assigned unique ID for this managed resource.
- service_
host_ strkey_ fingerprint - The SSH public key's fingerprint for the console connection service host.
- state str
- The current state of the console connection.
- vnc_
connection_ strstring - The SSH connection string for the SSH tunnel used to connect to the console connection over VNC.
- compartment
Id String - The OCID of the compartment to contain the console connection.
- connection
String String - The SSH connection string for the console connection.
- fingerprint String
- The SSH public key's fingerprint for client authentication to the console connection.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Host StringKey Fingerprint - The SSH public key's fingerprint for the console connection service host.
- state String
- The current state of the console connection.
- vnc
Connection StringString - The SSH connection string for the SSH tunnel used to connect to the console connection over VNC.
Look up Existing InstanceConsoleConnection Resource
Get an existing InstanceConsoleConnection 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?: InstanceConsoleConnectionState, opts?: CustomResourceOptions): InstanceConsoleConnection
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
connection_string: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
fingerprint: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
instance_id: Optional[str] = None,
public_key: Optional[str] = None,
service_host_key_fingerprint: Optional[str] = None,
state: Optional[str] = None,
vnc_connection_string: Optional[str] = None) -> InstanceConsoleConnection
func GetInstanceConsoleConnection(ctx *Context, name string, id IDInput, state *InstanceConsoleConnectionState, opts ...ResourceOption) (*InstanceConsoleConnection, error)
public static InstanceConsoleConnection Get(string name, Input<string> id, InstanceConsoleConnectionState? state, CustomResourceOptions? opts = null)
public static InstanceConsoleConnection get(String name, Output<String> id, InstanceConsoleConnectionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Compartment
Id string - The OCID of the compartment to contain the console connection.
- Connection
String string - The SSH connection string for the console connection.
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Fingerprint string
- The SSH public key's fingerprint for client authentication to the console connection.
- Dictionary<string, string>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Instance
Id string - The OCID of the instance to create the console connection to.
- Public
Key string The SSH public key used to authenticate the console connection.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Service
Host stringKey Fingerprint - The SSH public key's fingerprint for the console connection service host.
- State string
- The current state of the console connection.
- Vnc
Connection stringString - The SSH connection string for the SSH tunnel used to connect to the console connection over VNC.
- Compartment
Id string - The OCID of the compartment to contain the console connection.
- Connection
String string - The SSH connection string for the console connection.
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Fingerprint string
- The SSH public key's fingerprint for client authentication to the console connection.
- map[string]string
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Instance
Id string - The OCID of the instance to create the console connection to.
- Public
Key string The SSH public key used to authenticate the console connection.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Service
Host stringKey Fingerprint - The SSH public key's fingerprint for the console connection service host.
- State string
- The current state of the console connection.
- Vnc
Connection stringString - The SSH connection string for the SSH tunnel used to connect to the console connection over VNC.
- compartment
Id String - The OCID of the compartment to contain the console connection.
- connection
String String - The SSH connection string for the console connection.
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- fingerprint String
- The SSH public key's fingerprint for client authentication to the console connection.
- Map<String,String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance
Id String - The OCID of the instance to create the console connection to.
- public
Key String The SSH public key used to authenticate the console connection.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- service
Host StringKey Fingerprint - The SSH public key's fingerprint for the console connection service host.
- state String
- The current state of the console connection.
- vnc
Connection StringString - The SSH connection string for the SSH tunnel used to connect to the console connection over VNC.
- compartment
Id string - The OCID of the compartment to contain the console connection.
- connection
String string - The SSH connection string for the console connection.
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- fingerprint string
- The SSH public key's fingerprint for client authentication to the console connection.
- {[key: string]: string}
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance
Id string - The OCID of the instance to create the console connection to.
- public
Key string The SSH public key used to authenticate the console connection.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- service
Host stringKey Fingerprint - The SSH public key's fingerprint for the console connection service host.
- state string
- The current state of the console connection.
- vnc
Connection stringString - The SSH connection string for the SSH tunnel used to connect to the console connection over VNC.
- compartment_
id str - The OCID of the compartment to contain the console connection.
- connection_
string str - The SSH connection string for the console connection.
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- fingerprint str
- The SSH public key's fingerprint for client authentication to the console connection.
- Mapping[str, str]
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance_
id str - The OCID of the instance to create the console connection to.
- public_
key str The SSH public key used to authenticate the console connection.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- service_
host_ strkey_ fingerprint - The SSH public key's fingerprint for the console connection service host.
- state str
- The current state of the console connection.
- vnc_
connection_ strstring - The SSH connection string for the SSH tunnel used to connect to the console connection over VNC.
- compartment
Id String - The OCID of the compartment to contain the console connection.
- connection
String String - The SSH connection string for the console connection.
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- fingerprint String
- The SSH public key's fingerprint for client authentication to the console connection.
- Map<String>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- instance
Id String - The OCID of the instance to create the console connection to.
- public
Key String The SSH public key used to authenticate the console connection.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- service
Host StringKey Fingerprint - The SSH public key's fingerprint for the console connection service host.
- state String
- The current state of the console connection.
- vnc
Connection StringString - The SSH connection string for the SSH tunnel used to connect to the console connection over VNC.
Import
InstanceConsoleConnections can be imported using the id
, e.g.
$ pulumi import oci:Core/instanceConsoleConnection:InstanceConsoleConnection test_instance_console_connection "id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.