oci.Bastion.Bastion
Explore with Pulumi AI
This resource provides the Bastion resource in Oracle Cloud Infrastructure Bastion service.
Creates a new bastion. A bastion provides secured, public access to target resources in the cloud that you cannot otherwise reach from the internet. A bastion resides in a public subnet and establishes the network infrastructure needed to connect a user to a target resource in a private subnet.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testBastion = new oci.bastion.Bastion("test_bastion", {
bastionType: bastionBastionType,
compartmentId: compartmentId,
targetSubnetId: testSubnet.id,
clientCidrBlockAllowLists: bastionClientCidrBlockAllowList,
definedTags: {
"foo-namespace.bar-key": "value",
},
dnsProxyStatus: bastionDnsProxyStatus,
freeformTags: {
"bar-key": "value",
},
maxSessionTtlInSeconds: bastionMaxSessionTtlInSeconds,
name: bastionName,
phoneBookEntry: bastionPhoneBookEntry,
staticJumpHostIpAddresses: bastionStaticJumpHostIpAddresses,
});
import pulumi
import pulumi_oci as oci
test_bastion = oci.bastion.Bastion("test_bastion",
bastion_type=bastion_bastion_type,
compartment_id=compartment_id,
target_subnet_id=test_subnet["id"],
client_cidr_block_allow_lists=bastion_client_cidr_block_allow_list,
defined_tags={
"foo-namespace.bar-key": "value",
},
dns_proxy_status=bastion_dns_proxy_status,
freeform_tags={
"bar-key": "value",
},
max_session_ttl_in_seconds=bastion_max_session_ttl_in_seconds,
name=bastion_name,
phone_book_entry=bastion_phone_book_entry,
static_jump_host_ip_addresses=bastion_static_jump_host_ip_addresses)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Bastion"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Bastion.NewBastion(ctx, "test_bastion", &Bastion.BastionArgs{
BastionType: pulumi.Any(bastionBastionType),
CompartmentId: pulumi.Any(compartmentId),
TargetSubnetId: pulumi.Any(testSubnet.Id),
ClientCidrBlockAllowLists: pulumi.Any(bastionClientCidrBlockAllowList),
DefinedTags: pulumi.StringMap{
"foo-namespace.bar-key": pulumi.String("value"),
},
DnsProxyStatus: pulumi.Any(bastionDnsProxyStatus),
FreeformTags: pulumi.StringMap{
"bar-key": pulumi.String("value"),
},
MaxSessionTtlInSeconds: pulumi.Any(bastionMaxSessionTtlInSeconds),
Name: pulumi.Any(bastionName),
PhoneBookEntry: pulumi.Any(bastionPhoneBookEntry),
StaticJumpHostIpAddresses: pulumi.Any(bastionStaticJumpHostIpAddresses),
})
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 testBastion = new Oci.Bastion.Bastion("test_bastion", new()
{
BastionType = bastionBastionType,
CompartmentId = compartmentId,
TargetSubnetId = testSubnet.Id,
ClientCidrBlockAllowLists = bastionClientCidrBlockAllowList,
DefinedTags =
{
{ "foo-namespace.bar-key", "value" },
},
DnsProxyStatus = bastionDnsProxyStatus,
FreeformTags =
{
{ "bar-key", "value" },
},
MaxSessionTtlInSeconds = bastionMaxSessionTtlInSeconds,
Name = bastionName,
PhoneBookEntry = bastionPhoneBookEntry,
StaticJumpHostIpAddresses = bastionStaticJumpHostIpAddresses,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Bastion.Bastion;
import com.pulumi.oci.Bastion.BastionArgs;
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 testBastion = new Bastion("testBastion", BastionArgs.builder()
.bastionType(bastionBastionType)
.compartmentId(compartmentId)
.targetSubnetId(testSubnet.id())
.clientCidrBlockAllowLists(bastionClientCidrBlockAllowList)
.definedTags(Map.of("foo-namespace.bar-key", "value"))
.dnsProxyStatus(bastionDnsProxyStatus)
.freeformTags(Map.of("bar-key", "value"))
.maxSessionTtlInSeconds(bastionMaxSessionTtlInSeconds)
.name(bastionName)
.phoneBookEntry(bastionPhoneBookEntry)
.staticJumpHostIpAddresses(bastionStaticJumpHostIpAddresses)
.build());
}
}
resources:
testBastion:
type: oci:Bastion:Bastion
name: test_bastion
properties:
bastionType: ${bastionBastionType}
compartmentId: ${compartmentId}
targetSubnetId: ${testSubnet.id}
clientCidrBlockAllowLists: ${bastionClientCidrBlockAllowList}
definedTags:
foo-namespace.bar-key: value
dnsProxyStatus: ${bastionDnsProxyStatus}
freeformTags:
bar-key: value
maxSessionTtlInSeconds: ${bastionMaxSessionTtlInSeconds}
name: ${bastionName}
phoneBookEntry: ${bastionPhoneBookEntry}
staticJumpHostIpAddresses: ${bastionStaticJumpHostIpAddresses}
Create Bastion Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Bastion(name: string, args: BastionArgs, opts?: CustomResourceOptions);
@overload
def Bastion(resource_name: str,
args: BastionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Bastion(resource_name: str,
opts: Optional[ResourceOptions] = None,
bastion_type: Optional[str] = None,
compartment_id: Optional[str] = None,
target_subnet_id: Optional[str] = None,
client_cidr_block_allow_lists: Optional[Sequence[str]] = None,
defined_tags: Optional[Mapping[str, str]] = None,
dns_proxy_status: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
max_session_ttl_in_seconds: Optional[int] = None,
name: Optional[str] = None,
phone_book_entry: Optional[str] = None,
static_jump_host_ip_addresses: Optional[Sequence[str]] = None)
func NewBastion(ctx *Context, name string, args BastionArgs, opts ...ResourceOption) (*Bastion, error)
public Bastion(string name, BastionArgs args, CustomResourceOptions? opts = null)
public Bastion(String name, BastionArgs args)
public Bastion(String name, BastionArgs args, CustomResourceOptions options)
type: oci:Bastion:Bastion
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 BastionArgs
- 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 BastionArgs
- 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 BastionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BastionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BastionArgs
- 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 bastionResource = new Oci.Bastion.Bastion("bastionResource", new()
{
BastionType = "string",
CompartmentId = "string",
TargetSubnetId = "string",
ClientCidrBlockAllowLists = new[]
{
"string",
},
DefinedTags =
{
{ "string", "string" },
},
DnsProxyStatus = "string",
FreeformTags =
{
{ "string", "string" },
},
MaxSessionTtlInSeconds = 0,
Name = "string",
PhoneBookEntry = "string",
StaticJumpHostIpAddresses = new[]
{
"string",
},
});
example, err := Bastion.NewBastion(ctx, "bastionResource", &Bastion.BastionArgs{
BastionType: pulumi.String("string"),
CompartmentId: pulumi.String("string"),
TargetSubnetId: pulumi.String("string"),
ClientCidrBlockAllowLists: pulumi.StringArray{
pulumi.String("string"),
},
DefinedTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
DnsProxyStatus: pulumi.String("string"),
FreeformTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
MaxSessionTtlInSeconds: pulumi.Int(0),
Name: pulumi.String("string"),
PhoneBookEntry: pulumi.String("string"),
StaticJumpHostIpAddresses: pulumi.StringArray{
pulumi.String("string"),
},
})
var bastionResource = new Bastion("bastionResource", BastionArgs.builder()
.bastionType("string")
.compartmentId("string")
.targetSubnetId("string")
.clientCidrBlockAllowLists("string")
.definedTags(Map.of("string", "string"))
.dnsProxyStatus("string")
.freeformTags(Map.of("string", "string"))
.maxSessionTtlInSeconds(0)
.name("string")
.phoneBookEntry("string")
.staticJumpHostIpAddresses("string")
.build());
bastion_resource = oci.bastion.Bastion("bastionResource",
bastion_type="string",
compartment_id="string",
target_subnet_id="string",
client_cidr_block_allow_lists=["string"],
defined_tags={
"string": "string",
},
dns_proxy_status="string",
freeform_tags={
"string": "string",
},
max_session_ttl_in_seconds=0,
name="string",
phone_book_entry="string",
static_jump_host_ip_addresses=["string"])
const bastionResource = new oci.bastion.Bastion("bastionResource", {
bastionType: "string",
compartmentId: "string",
targetSubnetId: "string",
clientCidrBlockAllowLists: ["string"],
definedTags: {
string: "string",
},
dnsProxyStatus: "string",
freeformTags: {
string: "string",
},
maxSessionTtlInSeconds: 0,
name: "string",
phoneBookEntry: "string",
staticJumpHostIpAddresses: ["string"],
});
type: oci:Bastion:Bastion
properties:
bastionType: string
clientCidrBlockAllowLists:
- string
compartmentId: string
definedTags:
string: string
dnsProxyStatus: string
freeformTags:
string: string
maxSessionTtlInSeconds: 0
name: string
phoneBookEntry: string
staticJumpHostIpAddresses:
- string
targetSubnetId: string
Bastion Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Bastion resource accepts the following input properties:
- Bastion
Type string - The type of bastion. Use
standard
. - Compartment
Id string - (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
- Target
Subnet stringId The unique identifier (OCID) of the subnet that the bastion connects to.
** 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
- Client
Cidr List<string>Block Allow Lists - (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Dns
Proxy stringStatus - Flag to enable FQDN and SOCKS5 Proxy Support. Example:
ENABLED
,DISABLED
- Dictionary<string, string>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Max
Session intTtl In Seconds - (Updatable) The maximum amount of time that any session on the bastion can remain active.
- Name string
- The name of the bastion, which can't be changed after creation.
- Phone
Book stringEntry - The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to
standard
bastions. - Static
Jump List<string>Host Ip Addresses - (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to
standard
bastions.
- Bastion
Type string - The type of bastion. Use
standard
. - Compartment
Id string - (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
- Target
Subnet stringId The unique identifier (OCID) of the subnet that the bastion connects to.
** 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
- Client
Cidr []stringBlock Allow Lists - (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Dns
Proxy stringStatus - Flag to enable FQDN and SOCKS5 Proxy Support. Example:
ENABLED
,DISABLED
- map[string]string
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Max
Session intTtl In Seconds - (Updatable) The maximum amount of time that any session on the bastion can remain active.
- Name string
- The name of the bastion, which can't be changed after creation.
- Phone
Book stringEntry - The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to
standard
bastions. - Static
Jump []stringHost Ip Addresses - (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to
standard
bastions.
- bastion
Type String - The type of bastion. Use
standard
. - compartment
Id String - (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
- target
Subnet StringId The unique identifier (OCID) of the subnet that the bastion connects to.
** 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
- client
Cidr List<String>Block Allow Lists - (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- dns
Proxy StringStatus - Flag to enable FQDN and SOCKS5 Proxy Support. Example:
ENABLED
,DISABLED
- Map<String,String>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- max
Session IntegerTtl In Seconds - (Updatable) The maximum amount of time that any session on the bastion can remain active.
- name String
- The name of the bastion, which can't be changed after creation.
- phone
Book StringEntry - The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to
standard
bastions. - static
Jump List<String>Host Ip Addresses - (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to
standard
bastions.
- bastion
Type string - The type of bastion. Use
standard
. - compartment
Id string - (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
- target
Subnet stringId The unique identifier (OCID) of the subnet that the bastion connects to.
** 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
- client
Cidr string[]Block Allow Lists - (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- dns
Proxy stringStatus - Flag to enable FQDN and SOCKS5 Proxy Support. Example:
ENABLED
,DISABLED
- {[key: string]: string}
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- max
Session numberTtl In Seconds - (Updatable) The maximum amount of time that any session on the bastion can remain active.
- name string
- The name of the bastion, which can't be changed after creation.
- phone
Book stringEntry - The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to
standard
bastions. - static
Jump string[]Host Ip Addresses - (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to
standard
bastions.
- bastion_
type str - The type of bastion. Use
standard
. - compartment_
id str - (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
- target_
subnet_ strid The unique identifier (OCID) of the subnet that the bastion connects to.
** 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
- client_
cidr_ Sequence[str]block_ allow_ lists - (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- dns_
proxy_ strstatus - Flag to enable FQDN and SOCKS5 Proxy Support. Example:
ENABLED
,DISABLED
- Mapping[str, str]
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- max_
session_ intttl_ in_ seconds - (Updatable) The maximum amount of time that any session on the bastion can remain active.
- name str
- The name of the bastion, which can't be changed after creation.
- phone_
book_ strentry - The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to
standard
bastions. - static_
jump_ Sequence[str]host_ ip_ addresses - (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to
standard
bastions.
- bastion
Type String - The type of bastion. Use
standard
. - compartment
Id String - (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
- target
Subnet StringId The unique identifier (OCID) of the subnet that the bastion connects to.
** 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
- client
Cidr List<String>Block Allow Lists - (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- dns
Proxy StringStatus - Flag to enable FQDN and SOCKS5 Proxy Support. Example:
ENABLED
,DISABLED
- Map<String>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- max
Session NumberTtl In Seconds - (Updatable) The maximum amount of time that any session on the bastion can remain active.
- name String
- The name of the bastion, which can't be changed after creation.
- phone
Book StringEntry - The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to
standard
bastions. - static
Jump List<String>Host Ip Addresses - (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to
standard
bastions.
Outputs
All input properties are implicitly available as output properties. Additionally, the Bastion resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Details string - A message describing the current state in more detail.
- Max
Sessions intAllowed - The maximum number of active sessions allowed on the bastion.
- Private
Endpoint stringIp Address - The private IP address of the created private endpoint.
- State string
- The current state of the bastion.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Target
Vcn stringId - The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
- Time
Created string - The time the bastion was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- Time
Updated string - The time the bastion was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Details string - A message describing the current state in more detail.
- Max
Sessions intAllowed - The maximum number of active sessions allowed on the bastion.
- Private
Endpoint stringIp Address - The private IP address of the created private endpoint.
- State string
- The current state of the bastion.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Target
Vcn stringId - The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
- Time
Created string - The time the bastion was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- Time
Updated string - The time the bastion was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details String - A message describing the current state in more detail.
- max
Sessions IntegerAllowed - The maximum number of active sessions allowed on the bastion.
- private
Endpoint StringIp Address - The private IP address of the created private endpoint.
- state String
- The current state of the bastion.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target
Vcn StringId - The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
- time
Created String - The time the bastion was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time
Updated String - The time the bastion was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- id string
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details string - A message describing the current state in more detail.
- max
Sessions numberAllowed - The maximum number of active sessions allowed on the bastion.
- private
Endpoint stringIp Address - The private IP address of the created private endpoint.
- state string
- The current state of the bastion.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target
Vcn stringId - The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
- time
Created string - The time the bastion was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time
Updated string - The time the bastion was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- id str
- The provider-assigned unique ID for this managed resource.
- lifecycle_
details str - A message describing the current state in more detail.
- max_
sessions_ intallowed - The maximum number of active sessions allowed on the bastion.
- private_
endpoint_ strip_ address - The private IP address of the created private endpoint.
- state str
- The current state of the bastion.
- Mapping[str, str]
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target_
vcn_ strid - The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
- time_
created str - The time the bastion was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time_
updated str - The time the bastion was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details String - A message describing the current state in more detail.
- max
Sessions NumberAllowed - The maximum number of active sessions allowed on the bastion.
- private
Endpoint StringIp Address - The private IP address of the created private endpoint.
- state String
- The current state of the bastion.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target
Vcn StringId - The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
- time
Created String - The time the bastion was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time
Updated String - The time the bastion was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
Look up Existing Bastion Resource
Get an existing Bastion 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?: BastionState, opts?: CustomResourceOptions): Bastion
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bastion_type: Optional[str] = None,
client_cidr_block_allow_lists: Optional[Sequence[str]] = None,
compartment_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
dns_proxy_status: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
lifecycle_details: Optional[str] = None,
max_session_ttl_in_seconds: Optional[int] = None,
max_sessions_allowed: Optional[int] = None,
name: Optional[str] = None,
phone_book_entry: Optional[str] = None,
private_endpoint_ip_address: Optional[str] = None,
state: Optional[str] = None,
static_jump_host_ip_addresses: Optional[Sequence[str]] = None,
system_tags: Optional[Mapping[str, str]] = None,
target_subnet_id: Optional[str] = None,
target_vcn_id: Optional[str] = None,
time_created: Optional[str] = None,
time_updated: Optional[str] = None) -> Bastion
func GetBastion(ctx *Context, name string, id IDInput, state *BastionState, opts ...ResourceOption) (*Bastion, error)
public static Bastion Get(string name, Input<string> id, BastionState? state, CustomResourceOptions? opts = null)
public static Bastion get(String name, Output<String> id, BastionState 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.
- Bastion
Type string - The type of bastion. Use
standard
. - Client
Cidr List<string>Block Allow Lists - (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
- Compartment
Id string - (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Dns
Proxy stringStatus - Flag to enable FQDN and SOCKS5 Proxy Support. Example:
ENABLED
,DISABLED
- Dictionary<string, string>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Lifecycle
Details string - A message describing the current state in more detail.
- Max
Session intTtl In Seconds - (Updatable) The maximum amount of time that any session on the bastion can remain active.
- Max
Sessions intAllowed - The maximum number of active sessions allowed on the bastion.
- Name string
- The name of the bastion, which can't be changed after creation.
- Phone
Book stringEntry - The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to
standard
bastions. - Private
Endpoint stringIp Address - The private IP address of the created private endpoint.
- State string
- The current state of the bastion.
- Static
Jump List<string>Host Ip Addresses - (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to
standard
bastions. - Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Target
Subnet stringId The unique identifier (OCID) of the subnet that the bastion connects to.
** 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
- Target
Vcn stringId - The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
- Time
Created string - The time the bastion was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- Time
Updated string - The time the bastion was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- Bastion
Type string - The type of bastion. Use
standard
. - Client
Cidr []stringBlock Allow Lists - (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
- Compartment
Id string - (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Dns
Proxy stringStatus - Flag to enable FQDN and SOCKS5 Proxy Support. Example:
ENABLED
,DISABLED
- map[string]string
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Lifecycle
Details string - A message describing the current state in more detail.
- Max
Session intTtl In Seconds - (Updatable) The maximum amount of time that any session on the bastion can remain active.
- Max
Sessions intAllowed - The maximum number of active sessions allowed on the bastion.
- Name string
- The name of the bastion, which can't be changed after creation.
- Phone
Book stringEntry - The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to
standard
bastions. - Private
Endpoint stringIp Address - The private IP address of the created private endpoint.
- State string
- The current state of the bastion.
- Static
Jump []stringHost Ip Addresses - (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to
standard
bastions. - map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Target
Subnet stringId The unique identifier (OCID) of the subnet that the bastion connects to.
** 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
- Target
Vcn stringId - The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
- Time
Created string - The time the bastion was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- Time
Updated string - The time the bastion was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- bastion
Type String - The type of bastion. Use
standard
. - client
Cidr List<String>Block Allow Lists - (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
- compartment
Id String - (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- dns
Proxy StringStatus - Flag to enable FQDN and SOCKS5 Proxy Support. Example:
ENABLED
,DISABLED
- Map<String,String>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- lifecycle
Details String - A message describing the current state in more detail.
- max
Session IntegerTtl In Seconds - (Updatable) The maximum amount of time that any session on the bastion can remain active.
- max
Sessions IntegerAllowed - The maximum number of active sessions allowed on the bastion.
- name String
- The name of the bastion, which can't be changed after creation.
- phone
Book StringEntry - The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to
standard
bastions. - private
Endpoint StringIp Address - The private IP address of the created private endpoint.
- state String
- The current state of the bastion.
- static
Jump List<String>Host Ip Addresses - (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to
standard
bastions. - Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target
Subnet StringId The unique identifier (OCID) of the subnet that the bastion connects to.
** 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
- target
Vcn StringId - The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
- time
Created String - The time the bastion was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time
Updated String - The time the bastion was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- bastion
Type string - The type of bastion. Use
standard
. - client
Cidr string[]Block Allow Lists - (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
- compartment
Id string - (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- dns
Proxy stringStatus - Flag to enable FQDN and SOCKS5 Proxy Support. Example:
ENABLED
,DISABLED
- {[key: string]: string}
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- lifecycle
Details string - A message describing the current state in more detail.
- max
Session numberTtl In Seconds - (Updatable) The maximum amount of time that any session on the bastion can remain active.
- max
Sessions numberAllowed - The maximum number of active sessions allowed on the bastion.
- name string
- The name of the bastion, which can't be changed after creation.
- phone
Book stringEntry - The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to
standard
bastions. - private
Endpoint stringIp Address - The private IP address of the created private endpoint.
- state string
- The current state of the bastion.
- static
Jump string[]Host Ip Addresses - (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to
standard
bastions. - {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target
Subnet stringId The unique identifier (OCID) of the subnet that the bastion connects to.
** 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
- target
Vcn stringId - The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
- time
Created string - The time the bastion was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time
Updated string - The time the bastion was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- bastion_
type str - The type of bastion. Use
standard
. - client_
cidr_ Sequence[str]block_ allow_ lists - (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
- compartment_
id str - (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- dns_
proxy_ strstatus - Flag to enable FQDN and SOCKS5 Proxy Support. Example:
ENABLED
,DISABLED
- Mapping[str, str]
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- lifecycle_
details str - A message describing the current state in more detail.
- max_
session_ intttl_ in_ seconds - (Updatable) The maximum amount of time that any session on the bastion can remain active.
- max_
sessions_ intallowed - The maximum number of active sessions allowed on the bastion.
- name str
- The name of the bastion, which can't be changed after creation.
- phone_
book_ strentry - The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to
standard
bastions. - private_
endpoint_ strip_ address - The private IP address of the created private endpoint.
- state str
- The current state of the bastion.
- static_
jump_ Sequence[str]host_ ip_ addresses - (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to
standard
bastions. - Mapping[str, str]
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target_
subnet_ strid The unique identifier (OCID) of the subnet that the bastion connects to.
** 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
- target_
vcn_ strid - The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
- time_
created str - The time the bastion was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time_
updated str - The time the bastion was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- bastion
Type String - The type of bastion. Use
standard
. - client
Cidr List<String>Block Allow Lists - (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
- compartment
Id String - (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- dns
Proxy StringStatus - Flag to enable FQDN and SOCKS5 Proxy Support. Example:
ENABLED
,DISABLED
- Map<String>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- lifecycle
Details String - A message describing the current state in more detail.
- max
Session NumberTtl In Seconds - (Updatable) The maximum amount of time that any session on the bastion can remain active.
- max
Sessions NumberAllowed - The maximum number of active sessions allowed on the bastion.
- name String
- The name of the bastion, which can't be changed after creation.
- phone
Book StringEntry - The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to
standard
bastions. - private
Endpoint StringIp Address - The private IP address of the created private endpoint.
- state String
- The current state of the bastion.
- static
Jump List<String>Host Ip Addresses - (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to
standard
bastions. - Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- target
Subnet StringId The unique identifier (OCID) of the subnet that the bastion connects to.
** 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
- target
Vcn StringId - The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
- time
Created String - The time the bastion was created. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
- time
Updated String - The time the bastion was updated. Format is defined by RFC3339. Example:
2020-01-25T21:10:29.600Z
Import
Bastions can be imported using the id
, e.g.
$ pulumi import oci:Bastion/bastion:Bastion test_bastion "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.