oci.LoadBalancer.Hostname
Explore with Pulumi AI
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 System.Linq;
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:
- Load
Balancer stringId The OCID of the load balancer to add the hostname to.
- Virtual
Hostname 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
** 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
- Hostname string
(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example:
app.example.com
- Load
Balancer stringId 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
** 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
- hostname String
(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example:
app.example.com
- load
Balancer StringId 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
** 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
- hostname string
(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example:
app.example.com
- load
Balancer stringId 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
** 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
- hostname str
(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example:
app.example.com
- load_
balancer_ strid 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
** 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
- hostname String
(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example:
app.example.com
- load
Balancer StringId 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
** 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
Outputs
All input properties are implicitly available as output properties. Additionally, the Hostname resource produces the following output properties:
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.
- Load
Balancer stringId 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
** 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
- State string
- Virtual
Hostname 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
- Load
Balancer stringId 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
** 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
- State string
- hostname String
(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example:
app.example.com
- load
Balancer StringId 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
** 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
- state String
- hostname string
(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example:
app.example.com
- load
Balancer stringId 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
** 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
- 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_ strid 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
** 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
- state str
- hostname String
(Updatable) A virtual hostname. For more information about virtual hostname string construction, see Managing Request Routing. Example:
app.example.com
- load
Balancer StringId 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
** 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
- state String
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.