oci logo
Oracle Cloud Infrastructure v0.12.0, Mar 17 23

oci.LoadBalancer.Hostname

Import

Hostnames can be imported using the id, e.g.

 $ pulumi import oci:LoadBalancer/hostname:Hostname test_hostname "loadBalancers/{loadBalancerId}/hostnames/{name}"

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testHostname = new Oci.LoadBalancer.Hostname("testHostname", new()
    {
        VirtualHostname = @var.Hostname_hostname,
        LoadBalancerId = oci_load_balancer_load_balancer.Test_load_balancer.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/LoadBalancer"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := LoadBalancer.NewHostname(ctx, "testHostname", &LoadBalancer.HostnameArgs{
			Hostname:       pulumi.Any(_var.Hostname_hostname),
			LoadBalancerId: pulumi.Any(oci_load_balancer_load_balancer.Test_load_balancer.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.LoadBalancer.Hostname;
import com.pulumi.oci.LoadBalancer.HostnameArgs;
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 testHostname = new Hostname("testHostname", HostnameArgs.builder()        
            .hostname(var_.hostname_hostname())
            .loadBalancerId(oci_load_balancer_load_balancer.test_load_balancer().id())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_hostname = oci.load_balancer.Hostname("testHostname",
    hostname=var["hostname_hostname"],
    load_balancer_id=oci_load_balancer_load_balancer["test_load_balancer"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testHostname = new oci.loadbalancer.Hostname("testHostname", {
    hostname: _var.hostname_hostname,
    loadBalancerId: oci_load_balancer_load_balancer.test_load_balancer.id,
});
resources:
  testHostname:
    type: oci:LoadBalancer:Hostname
    properties:
      #Required
      hostname: ${var.hostname_hostname}
      loadBalancerId: ${oci_load_balancer_load_balancer.test_load_balancer.id}

Create Hostname Resource

new Hostname(name: string, args: HostnameArgs, opts?: CustomResourceOptions);
@overload
def Hostname(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             hostname: Optional[str] = None,
             load_balancer_id: Optional[str] = None,
             name: Optional[str] = None)
@overload
def Hostname(resource_name: str,
             args: HostnameArgs,
             opts: Optional[ResourceOptions] = None)
func NewHostname(ctx *Context, name string, args HostnameArgs, opts ...ResourceOption) (*Hostname, error)
public Hostname(string name, HostnameArgs args, CustomResourceOptions? opts = null)
public Hostname(String name, HostnameArgs args)
public Hostname(String name, HostnameArgs args, CustomResourceOptions options)
type: oci:LoadBalancer:Hostname
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args HostnameArgs
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 HostnameArgs
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 HostnameArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args HostnameArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args HostnameArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

LoadBalancerId string

The OCID of the load balancer to add the hostname to.

VirtualHostname string

(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com

Name string

A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001

Hostname string

(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com

LoadBalancerId string

The OCID of the load balancer to add the hostname to.

Name string

A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001

hostname String

(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com

loadBalancerId String

The OCID of the load balancer to add the hostname to.

name String

A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001

hostname string

(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com

loadBalancerId string

The OCID of the load balancer to add the hostname to.

name string

A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001

hostname str

(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com

load_balancer_id str

The OCID of the load balancer to add the hostname to.

name str

A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001

hostname String

(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com

loadBalancerId String

The OCID of the load balancer to add the hostname to.

name String

A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001

Outputs

All input properties are implicitly available as output properties. Additionally, the Hostname resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

State string
Id string

The provider-assigned unique ID for this managed resource.

State string
id String

The provider-assigned unique ID for this managed resource.

state String
id string

The provider-assigned unique ID for this managed resource.

state string
id str

The provider-assigned unique ID for this managed resource.

state str
id String

The provider-assigned unique ID for this managed resource.

state String

Look up Existing Hostname Resource

Get an existing Hostname 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?: HostnameState, opts?: CustomResourceOptions): Hostname
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        hostname: Optional[str] = None,
        load_balancer_id: Optional[str] = None,
        name: Optional[str] = None,
        state: Optional[str] = None) -> Hostname
func GetHostname(ctx *Context, name string, id IDInput, state *HostnameState, opts ...ResourceOption) (*Hostname, error)
public static Hostname Get(string name, Input<string> id, HostnameState? state, CustomResourceOptions? opts = null)
public static Hostname get(String name, Output<String> id, HostnameState 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:
LoadBalancerId string

The OCID of the load balancer to add the hostname to.

Name string

A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001

State string
VirtualHostname string

(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com

Hostname string

(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com

LoadBalancerId string

The OCID of the load balancer to add the hostname to.

Name string

A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001

State string
hostname String

(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com

loadBalancerId String

The OCID of the load balancer to add the hostname to.

name String

A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001

state String
hostname string

(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com

loadBalancerId string

The OCID of the load balancer to add the hostname to.

name string

A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001

state string
hostname str

(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com

load_balancer_id str

The OCID of the load balancer to add the hostname to.

name str

A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001

state str
hostname String

(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example: app.example.com

loadBalancerId String

The OCID of the load balancer to add the hostname to.

name String

A friendly name for the hostname resource. It must be unique and it cannot be changed. Avoid entering confidential information. Example: example_hostname_001

state String

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.