1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Bastion
  5. Bastion
Oracle Cloud Infrastructure v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

oci.Bastion.Bastion

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

    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/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.Map{
    				"foo-namespace.bar-key": pulumi.Any("value"),
    			},
    			DnsProxyStatus: pulumi.Any(bastionDnsProxyStatus),
    			FreeformTags: pulumi.Map{
    				"bar-key": pulumi.Any("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, Any]] = None,
                dns_proxy_status: Optional[str] = None,
                freeform_tags: Optional[Mapping[str, Any]] = 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.

    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", "any" },
        },
        DnsProxyStatus = "string",
        FreeformTags = 
        {
            { "string", "any" },
        },
        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.Map{
    		"string": pulumi.Any("any"),
    	},
    	DnsProxyStatus: pulumi.String("string"),
    	FreeformTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	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", "any"))
        .dnsProxyStatus("string")
        .freeformTags(Map.of("string", "any"))
        .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": "any",
        },
        dns_proxy_status="string",
        freeform_tags={
            "string": "any",
        },
        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: "any",
        },
        dnsProxyStatus: "string",
        freeformTags: {
            string: "any",
        },
        maxSessionTtlInSeconds: 0,
        name: "string",
        phoneBookEntry: "string",
        staticJumpHostIpAddresses: ["string"],
    });
    
    type: oci:Bastion:Bastion
    properties:
        bastionType: string
        clientCidrBlockAllowLists:
            - string
        compartmentId: string
        definedTags:
            string: any
        dnsProxyStatus: string
        freeformTags:
            string: any
        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:

    BastionType string
    The type of bastion. Use standard.
    CompartmentId string
    (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
    TargetSubnetId string

    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

    ClientCidrBlockAllowLists List<string>
    (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    DnsProxyStatus string
    Flag to enable FQDN and SOCKS5 Proxy Support. Example: ENABLED, DISABLED
    FreeformTags Dictionary<string, object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    MaxSessionTtlInSeconds int
    (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.
    PhoneBookEntry string
    The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to standard bastions.
    StaticJumpHostIpAddresses List<string>
    (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to standard bastions.
    BastionType string
    The type of bastion. Use standard.
    CompartmentId string
    (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
    TargetSubnetId string

    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

    ClientCidrBlockAllowLists []string
    (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    DnsProxyStatus string
    Flag to enable FQDN and SOCKS5 Proxy Support. Example: ENABLED, DISABLED
    FreeformTags map[string]interface{}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    MaxSessionTtlInSeconds int
    (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.
    PhoneBookEntry string
    The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to standard bastions.
    StaticJumpHostIpAddresses []string
    (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to standard bastions.
    bastionType String
    The type of bastion. Use standard.
    compartmentId String
    (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
    targetSubnetId String

    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

    clientCidrBlockAllowLists List<String>
    (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    dnsProxyStatus String
    Flag to enable FQDN and SOCKS5 Proxy Support. Example: ENABLED, DISABLED
    freeformTags Map<String,Object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    maxSessionTtlInSeconds Integer
    (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.
    phoneBookEntry String
    The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to standard bastions.
    staticJumpHostIpAddresses List<String>
    (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to standard bastions.
    bastionType string
    The type of bastion. Use standard.
    compartmentId string
    (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
    targetSubnetId string

    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

    clientCidrBlockAllowLists string[]
    (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    dnsProxyStatus string
    Flag to enable FQDN and SOCKS5 Proxy Support. Example: ENABLED, DISABLED
    freeformTags {[key: string]: any}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    maxSessionTtlInSeconds number
    (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.
    phoneBookEntry string
    The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to standard bastions.
    staticJumpHostIpAddresses string[]
    (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_id str

    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_block_allow_lists Sequence[str]
    (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    dns_proxy_status str
    Flag to enable FQDN and SOCKS5 Proxy Support. Example: ENABLED, DISABLED
    freeform_tags Mapping[str, Any]
    (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_ttl_in_seconds int
    (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_entry str
    The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to standard bastions.
    static_jump_host_ip_addresses Sequence[str]
    (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to standard bastions.
    bastionType String
    The type of bastion. Use standard.
    compartmentId String
    (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
    targetSubnetId String

    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

    clientCidrBlockAllowLists List<String>
    (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    dnsProxyStatus String
    Flag to enable FQDN and SOCKS5 Proxy Support. Example: ENABLED, DISABLED
    freeformTags Map<Any>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    maxSessionTtlInSeconds Number
    (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.
    phoneBookEntry String
    The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to standard bastions.
    staticJumpHostIpAddresses List<String>
    (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.
    LifecycleDetails string
    A message describing the current state in more detail.
    MaxSessionsAllowed int
    The maximum number of active sessions allowed on the bastion.
    PrivateEndpointIpAddress string
    The private IP address of the created private endpoint.
    State string
    The current state of the bastion.
    SystemTags Dictionary<string, object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TargetVcnId string
    The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
    TimeCreated string
    The time the bastion was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    TimeUpdated 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.
    LifecycleDetails string
    A message describing the current state in more detail.
    MaxSessionsAllowed int
    The maximum number of active sessions allowed on the bastion.
    PrivateEndpointIpAddress string
    The private IP address of the created private endpoint.
    State string
    The current state of the bastion.
    SystemTags map[string]interface{}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TargetVcnId string
    The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
    TimeCreated string
    The time the bastion was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    TimeUpdated 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.
    lifecycleDetails String
    A message describing the current state in more detail.
    maxSessionsAllowed Integer
    The maximum number of active sessions allowed on the bastion.
    privateEndpointIpAddress String
    The private IP address of the created private endpoint.
    state String
    The current state of the bastion.
    systemTags Map<String,Object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    targetVcnId String
    The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
    timeCreated String
    The time the bastion was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    timeUpdated 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.
    lifecycleDetails string
    A message describing the current state in more detail.
    maxSessionsAllowed number
    The maximum number of active sessions allowed on the bastion.
    privateEndpointIpAddress string
    The private IP address of the created private endpoint.
    state string
    The current state of the bastion.
    systemTags {[key: string]: any}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    targetVcnId string
    The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
    timeCreated string
    The time the bastion was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    timeUpdated 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_allowed int
    The maximum number of active sessions allowed on the bastion.
    private_endpoint_ip_address str
    The private IP address of the created private endpoint.
    state str
    The current state of the bastion.
    system_tags Mapping[str, Any]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    target_vcn_id str
    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.
    lifecycleDetails String
    A message describing the current state in more detail.
    maxSessionsAllowed Number
    The maximum number of active sessions allowed on the bastion.
    privateEndpointIpAddress String
    The private IP address of the created private endpoint.
    state String
    The current state of the bastion.
    systemTags Map<Any>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    targetVcnId String
    The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
    timeCreated String
    The time the bastion was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    timeUpdated 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, Any]] = None,
            dns_proxy_status: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = 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, Any]] = 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.
    The following state arguments are supported:
    BastionType string
    The type of bastion. Use standard.
    ClientCidrBlockAllowLists List<string>
    (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
    CompartmentId string
    (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
    DefinedTags Dictionary<string, object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    DnsProxyStatus string
    Flag to enable FQDN and SOCKS5 Proxy Support. Example: ENABLED, DISABLED
    FreeformTags Dictionary<string, object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    LifecycleDetails string
    A message describing the current state in more detail.
    MaxSessionTtlInSeconds int
    (Updatable) The maximum amount of time that any session on the bastion can remain active.
    MaxSessionsAllowed int
    The maximum number of active sessions allowed on the bastion.
    Name string
    The name of the bastion, which can't be changed after creation.
    PhoneBookEntry string
    The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to standard bastions.
    PrivateEndpointIpAddress string
    The private IP address of the created private endpoint.
    State string
    The current state of the bastion.
    StaticJumpHostIpAddresses List<string>
    (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to standard bastions.
    SystemTags Dictionary<string, object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TargetSubnetId string

    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

    TargetVcnId string
    The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
    TimeCreated string
    The time the bastion was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    TimeUpdated string
    The time the bastion was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    BastionType string
    The type of bastion. Use standard.
    ClientCidrBlockAllowLists []string
    (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
    CompartmentId string
    (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
    DefinedTags map[string]interface{}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    DnsProxyStatus string
    Flag to enable FQDN and SOCKS5 Proxy Support. Example: ENABLED, DISABLED
    FreeformTags map[string]interface{}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    LifecycleDetails string
    A message describing the current state in more detail.
    MaxSessionTtlInSeconds int
    (Updatable) The maximum amount of time that any session on the bastion can remain active.
    MaxSessionsAllowed int
    The maximum number of active sessions allowed on the bastion.
    Name string
    The name of the bastion, which can't be changed after creation.
    PhoneBookEntry string
    The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to standard bastions.
    PrivateEndpointIpAddress string
    The private IP address of the created private endpoint.
    State string
    The current state of the bastion.
    StaticJumpHostIpAddresses []string
    (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to standard bastions.
    SystemTags map[string]interface{}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TargetSubnetId string

    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

    TargetVcnId string
    The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
    TimeCreated string
    The time the bastion was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    TimeUpdated string
    The time the bastion was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    bastionType String
    The type of bastion. Use standard.
    clientCidrBlockAllowLists List<String>
    (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
    compartmentId String
    (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
    definedTags Map<String,Object>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    dnsProxyStatus String
    Flag to enable FQDN and SOCKS5 Proxy Support. Example: ENABLED, DISABLED
    freeformTags Map<String,Object>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    lifecycleDetails String
    A message describing the current state in more detail.
    maxSessionTtlInSeconds Integer
    (Updatable) The maximum amount of time that any session on the bastion can remain active.
    maxSessionsAllowed Integer
    The maximum number of active sessions allowed on the bastion.
    name String
    The name of the bastion, which can't be changed after creation.
    phoneBookEntry String
    The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to standard bastions.
    privateEndpointIpAddress String
    The private IP address of the created private endpoint.
    state String
    The current state of the bastion.
    staticJumpHostIpAddresses List<String>
    (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to standard bastions.
    systemTags Map<String,Object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    targetSubnetId String

    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

    targetVcnId String
    The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
    timeCreated String
    The time the bastion was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    timeUpdated String
    The time the bastion was updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    bastionType string
    The type of bastion. Use standard.
    clientCidrBlockAllowLists string[]
    (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
    compartmentId string
    (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
    definedTags {[key: string]: any}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    dnsProxyStatus string
    Flag to enable FQDN and SOCKS5 Proxy Support. Example: ENABLED, DISABLED
    freeformTags {[key: string]: any}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    lifecycleDetails string
    A message describing the current state in more detail.
    maxSessionTtlInSeconds number
    (Updatable) The maximum amount of time that any session on the bastion can remain active.
    maxSessionsAllowed number
    The maximum number of active sessions allowed on the bastion.
    name string
    The name of the bastion, which can't be changed after creation.
    phoneBookEntry string
    The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to standard bastions.
    privateEndpointIpAddress string
    The private IP address of the created private endpoint.
    state string
    The current state of the bastion.
    staticJumpHostIpAddresses string[]
    (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to standard bastions.
    systemTags {[key: string]: any}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    targetSubnetId string

    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

    targetVcnId string
    The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
    timeCreated string
    The time the bastion was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    timeUpdated 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_block_allow_lists Sequence[str]
    (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.
    defined_tags Mapping[str, Any]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    dns_proxy_status str
    Flag to enable FQDN and SOCKS5 Proxy Support. Example: ENABLED, DISABLED
    freeform_tags Mapping[str, Any]
    (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_ttl_in_seconds int
    (Updatable) The maximum amount of time that any session on the bastion can remain active.
    max_sessions_allowed int
    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_entry str
    The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to standard bastions.
    private_endpoint_ip_address str
    The private IP address of the created private endpoint.
    state str
    The current state of the bastion.
    static_jump_host_ip_addresses Sequence[str]
    (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to standard bastions.
    system_tags Mapping[str, Any]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    target_subnet_id str

    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_id str
    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
    bastionType String
    The type of bastion. Use standard.
    clientCidrBlockAllowLists List<String>
    (Updatable) A list of address ranges in CIDR notation that you want to allow to connect to sessions hosted by this bastion.
    compartmentId String
    (Updatable) The unique identifier (OCID) of the compartment where the bastion is located.
    definedTags Map<Any>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    dnsProxyStatus String
    Flag to enable FQDN and SOCKS5 Proxy Support. Example: ENABLED, DISABLED
    freeformTags Map<Any>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    lifecycleDetails String
    A message describing the current state in more detail.
    maxSessionTtlInSeconds Number
    (Updatable) The maximum amount of time that any session on the bastion can remain active.
    maxSessionsAllowed Number
    The maximum number of active sessions allowed on the bastion.
    name String
    The name of the bastion, which can't be changed after creation.
    phoneBookEntry String
    The phonebook entry of the customer's team, which can't be changed after creation. Not applicable to standard bastions.
    privateEndpointIpAddress String
    The private IP address of the created private endpoint.
    state String
    The current state of the bastion.
    staticJumpHostIpAddresses List<String>
    (Updatable) A list of IP addresses of the hosts that the bastion has access to. Not applicable to standard bastions.
    systemTags Map<Any>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    targetSubnetId String

    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

    targetVcnId String
    The unique identifier (OCID) of the virtual cloud network (VCN) that the bastion connects to.
    timeCreated String
    The time the bastion was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
    timeUpdated 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.
    oci logo
    Oracle Cloud Infrastructure v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi