Class ClusterTemplate
Manages a V1 Magnum cluster template resource within OpenStack.
Example Usage
Create a Cluster template
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var clustertemplate1 = new OpenStack.ContainerInfra.ClusterTemplate("clustertemplate1", new OpenStack.ContainerInfra.ClusterTemplateArgs
{
Coe = "kubernetes",
DnsNameserver = "1.1.1.1",
DockerStorageDriver = "devicemapper",
DockerVolumeSize = 10,
Flavor = "m1.small",
FloatingIpEnabled = false,
Image = "Fedora-Atomic-27",
Labels =
{
{ "influx_grafana_dashboard_enabled", "true" },
{ "kube_dashboard_enabled", "true" },
{ "kube_tag", "1.11.1" },
{ "prometheus_monitoring", "true" },
},
MasterFlavor = "m1.medium",
MasterLbEnabled = true,
NetworkDriver = "flannel",
ServerType = "vm",
VolumeDriver = "cinder",
});
}
}
Argument reference
The following arguments are supported:
region - (Optional) The region in which to obtain the V1 Container Infra
client. A Container Infra client is needed to create a cluster template. If
omitted,the region argument of the provider is used. Changing this
creates a new cluster template.
name - (Required) The name of the cluster template. Changing this updates
the name of the existing cluster template.
project_id - (Optional) The project of the cluster template. Required if
admin wants to create a cluster template in another project. Changing this
creates a new cluster template.
user_id - (Optional) The user of the cluster template. Required if admin
wants to create a cluster template for another user. Changing this creates
a new cluster template.
apiserver_port - (Optional) The API server port for the Container
Orchestration Engine for this cluster template. Changing this updates the
API server port of the existing cluster template.
coe - (Required) The Container Orchestration Engine for this cluster
template. Changing this updates the engine of the existing cluster
template.
cluster_distro - (Optional) The distro for the cluster (fedora-atomic,
coreos, etc.). Changing this updates the cluster distro of the existing
cluster template.
dns_nameserver - (Optional) Address of the DNS nameserver that is used in
nodes of the cluster. Changing this updates the DNS nameserver of the
existing cluster template.
docker_storage_driver - (Optional) Docker storage driver. Changing this
updates the Docker storage driver of the existing cluster template.
docker_volume_size - (Optional) The size (in GB) of the Docker volume.
Changing this updates the Docker volume size of the existing cluster
template.
external_network_id - (Optional) The ID of the external network that will
be used for the cluster. Changing this updates the external network ID of
the existing cluster template.
fixed_network - (Optional) The fixed network that will be attached to the
cluster. Changing this updates the fixed network of the existing cluster
template.
fixed_subnet - (Optional) The fixed subnet that will be attached to the
cluster. Changing this updates the fixed subnet of the existing cluster
template.
flavor - (Optional) The flavor for the nodes of the cluster. Can be set via
the OS_MAGNUM_FLAVOR environment variable. Changing this updates the
flavor of the existing cluster template.
master_flavor - (Optional) The flavor for the master nodes. Can be set via
the OS_MAGNUM_MASTER_FLAVOR environment variable. Changing this updates
the master flavor of the existing cluster template.
floating_ip_enabled - (Optional) Indicates whether created cluster should
create floating IP for every node or not. Changing this updates the
floating IP enabled attribute of the existing cluster template.
http_proxy - (Optional) The address of a proxy for receiving all HTTP
requests and relay them. Changing this updates the HTTP proxy address of
the existing cluster template.
https_proxy - (Optional) The address of a proxy for receiving all HTTPS
requests and relay them. Changing this updates the HTTPS proxy address of
the existing cluster template.
image - (Required) The reference to an image that is used for nodes of the
cluster. Can be set via the OS_MAGNUM_IMAGE environment variable.
Changing this updates the image attribute of the existing cluster template.
insecure_registry - (Optional) The insecure registry URL for the cluster
template. Changing this updates the insecure registry attribute of the
existing cluster template.
keypair_id - (Optional) The name of the Compute service SSH keypair.
Changing this updates the keypair of the existing cluster template.
labels - (Optional) The list of key value pairs representing additional
properties of the cluster template. Changing this updates the labels of the
existing cluster template.
master_lb_enabled - (Optional) Indicates whether created cluster should
has a loadbalancer for master nodes or not. Changing this updates the
attribute of the existing cluster template.
network_driver - (Optional) The name of the driver for the container
network. Changing this updates the network driver of the existing cluster
template.
no_proxy - (Optional) A comma-separated list of IP addresses that shouldn't
be used in the cluster. Changing this updates the no proxy list of the
existing cluster template.
public - (Optional) Indicates whether cluster template should be public.
Changing this updates the public attribute of the existing cluster
template.
registry_enabled - (Optional) Indicates whether Docker registry is enabled
in the cluster. Changing this updates the registry enabled attribute of the
existing cluster template.
server_type - (Optional) The server type for the cluster template. Changing
this updates the server type of the existing cluster template.
tls_disabled - (Optional) Indicates whether the TLS should be disabled in
the cluster. Changing this updates the attribute of the existing cluster.
volume_driver - (Optional) The name of the driver that is used for the
volumes of the cluster nodes. Changing this updates the volume driver of
the existing cluster template.
Attributes reference
The following attributes are exported:
region - See Argument Reference above.
name - See Argument Reference above.
project_id - See Argument Reference above.
created_at - The time at which cluster template was created.
updated_at - The time at which cluster template was created.
apiserver_port - See Argument Reference above.
coe - See Argument Reference above.
cluster_distro - See Argument Reference above.
dns_nameserver - See Argument Reference above.
docker_storage_driver - See Argument Reference above.
docker_volume_size - See Argument Reference above.
external_network_id - See Argument Reference above.
fixed_network - See Argument Reference above.
fixed_subnet - See Argument Reference above.
flavor - See Argument Reference above.
master_flavor - See Argument Reference above.
floating_ip_enabled - See Argument Reference above.
http_proxy - See Argument Reference above.
https_proxy - See Argument Reference above.
image - See Argument Reference above.
insecure_registry - See Argument Reference above.
keypair_id - See Argument Reference above.
labels - See Argument Reference above.
links - A list containing associated cluster template links.
master_lb_enabled - See Argument Reference above.
network_driver - See Argument Reference above.
no_proxy - See Argument Reference above.
public - See Argument Reference above.
registry_enabled - See Argument Reference above.
server_type - See Argument Reference above.
tls_disabled - See Argument Reference above.
volume_driver - See Argument Reference above.
Inheritance
System.Object
ClusterTemplate
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Pulumi.OpenStack.dll
Syntax
public class ClusterTemplate : CustomResource
Constructors
View Source
ClusterTemplate(String, ClusterTemplateArgs, CustomResourceOptions)
Create a ClusterTemplate resource with the given unique name, arguments, and options.
Declaration
public ClusterTemplate(string name, ClusterTemplateArgs args, CustomResourceOptions options = null)
Parameters
| Type |
Name |
Description |
| System.String |
name |
The unique name of the resource
|
| ClusterTemplateArgs |
args |
The arguments used to populate this resource's properties
|
| CustomResourceOptions |
options |
A bag of options that control this resource's behavior
|
Properties
View Source
ApiserverPort
Declaration
public Output<int?> ApiserverPort { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Int32>> |
|
View Source
ClusterDistro
Declaration
public Output<string> ClusterDistro { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
Coe
Declaration
public Output<string> Coe { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
CreatedAt
Declaration
public Output<string> CreatedAt { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
DnsNameserver
Declaration
public Output<string> DnsNameserver { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
DockerStorageDriver
Declaration
public Output<string> DockerStorageDriver { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
DockerVolumeSize
Declaration
public Output<int?> DockerVolumeSize { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Int32>> |
|
View Source
ExternalNetworkId
Declaration
public Output<string> ExternalNetworkId { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
FixedNetwork
Declaration
public Output<string> FixedNetwork { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
FixedSubnet
Declaration
public Output<string> FixedSubnet { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
Flavor
Declaration
public Output<string> Flavor { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
FloatingIpEnabled
Declaration
public Output<bool?> FloatingIpEnabled { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Boolean>> |
|
View Source
HttpProxy
Declaration
public Output<string> HttpProxy { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
HttpsProxy
Declaration
public Output<string> HttpsProxy { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
Image
Declaration
public Output<string> Image { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
InsecureRegistry
Declaration
public Output<string> InsecureRegistry { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
KeypairId
Declaration
public Output<string> KeypairId { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
Labels
Declaration
public Output<ImmutableDictionary<string, object>> Labels { get; }
Property Value
| Type |
Description |
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
|
View Source
MasterFlavor
Declaration
public Output<string> MasterFlavor { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
MasterLbEnabled
Declaration
public Output<bool?> MasterLbEnabled { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Boolean>> |
|
View Source
Name
Declaration
public Output<string> Name { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
NetworkDriver
Declaration
public Output<string> NetworkDriver { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
NoProxy
Declaration
public Output<string> NoProxy { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
ProjectId
Declaration
public Output<string> ProjectId { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
Public
Declaration
public Output<bool?> Public { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Boolean>> |
|
View Source
Region
Declaration
public Output<string> Region { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
RegistryEnabled
Declaration
public Output<bool?> RegistryEnabled { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Boolean>> |
|
View Source
ServerType
Declaration
public Output<string> ServerType { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
TlsDisabled
Declaration
public Output<bool?> TlsDisabled { get; }
Property Value
| Type |
Description |
| Output<System.Nullable<System.Boolean>> |
|
View Source
UpdatedAt
Declaration
public Output<string> UpdatedAt { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
UserId
Declaration
public Output<string> UserId { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
View Source
VolumeDriver
Declaration
public Output<string> VolumeDriver { get; }
Property Value
| Type |
Description |
| Output<System.String> |
|
Methods
View Source
Get an existing ClusterTemplate resource's state with the given name, ID, and optional extra
properties used to qualify the lookup.
Declaration
public static ClusterTemplate Get(string name, Input<string> id, ClusterTemplateState state = null, CustomResourceOptions options = null)
Parameters
| Type |
Name |
Description |
| System.String |
name |
The unique name of the resulting resource.
|
| Input<System.String> |
id |
The unique provider ID of the resource to lookup.
|
| ClusterTemplateState |
state |
Any extra arguments used during the lookup.
|
| CustomResourceOptions |
options |
A bag of options that control this resource's behavior
|
Returns