ClusterTemplate
Manages a V1 Magnum cluster template resource within OpenStack.
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,theregionargument 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 theOS_MAGNUM_FLAVORenvironment variable. Changing this updates the flavor of the existing cluster template.master_flavor- (Optional) The flavor for the master nodes. Can be set via theOS_MAGNUM_MASTER_FLAVORenvironment 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 theOS_MAGNUM_IMAGEenvironment 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.
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",
});
}
}
Coming soon!
import pulumi
import pulumi_openstack as openstack
clustertemplate1 = openstack.containerinfra.ClusterTemplate("clustertemplate1",
coe="kubernetes",
dns_nameserver="1.1.1.1",
docker_storage_driver="devicemapper",
docker_volume_size=10,
flavor="m1.small",
floating_ip_enabled=False,
image="Fedora-Atomic-27",
labels={
"influx_grafana_dashboard_enabled": "true",
"kube_dashboard_enabled": "true",
"kube_tag": "1.11.1",
"prometheus_monitoring": "true",
},
master_flavor="m1.medium",
master_lb_enabled=True,
network_driver="flannel",
server_type="vm",
volume_driver="cinder")import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const clustertemplate1 = new openstack.containerinfra.ClusterTemplate("clustertemplate_1", {
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",
});Create a ClusterTemplate Resource
new ClusterTemplate(name: string, args: ClusterTemplateArgs, opts?: CustomResourceOptions);def ClusterTemplate(resource_name, opts=None, apiserver_port=None, cluster_distro=None, coe=None, dns_nameserver=None, docker_storage_driver=None, docker_volume_size=None, external_network_id=None, fixed_network=None, fixed_subnet=None, flavor=None, floating_ip_enabled=None, http_proxy=None, https_proxy=None, image=None, insecure_registry=None, keypair_id=None, labels=None, master_flavor=None, master_lb_enabled=None, name=None, network_driver=None, no_proxy=None, public=None, region=None, registry_enabled=None, server_type=None, tls_disabled=None, volume_driver=None, __props__=None);func NewClusterTemplate(ctx *Context, name string, args ClusterTemplateArgs, opts ...ResourceOption) (*ClusterTemplate, error)public ClusterTemplate(string name, ClusterTemplateArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ClusterTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ClusterTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClusterTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ClusterTemplate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ClusterTemplate resource accepts the following input properties:
- Coe string
- Image string
- Apiserver
Port int - Cluster
Distro string - Dns
Nameserver string - Docker
Storage stringDriver - Docker
Volume intSize - External
Network stringId - Fixed
Network string - Fixed
Subnet string - Flavor string
- Floating
Ip boolEnabled - Http
Proxy string - Https
Proxy string - Insecure
Registry string - Keypair
Id string - Labels Dictionary<string, object>
- Master
Flavor string - Master
Lb boolEnabled - Name string
- Network
Driver string - No
Proxy string - Public bool
- Region string
- Registry
Enabled bool - Server
Type string - Tls
Disabled bool - Volume
Driver string
- Coe string
- Image string
- Apiserver
Port int - Cluster
Distro string - Dns
Nameserver string - Docker
Storage stringDriver - Docker
Volume intSize - External
Network stringId - Fixed
Network string - Fixed
Subnet string - Flavor string
- Floating
Ip boolEnabled - Http
Proxy string - Https
Proxy string - Insecure
Registry string - Keypair
Id string - Labels map[string]interface{}
- Master
Flavor string - Master
Lb boolEnabled - Name string
- Network
Driver string - No
Proxy string - Public bool
- Region string
- Registry
Enabled bool - Server
Type string - Tls
Disabled bool - Volume
Driver string
- coe string
- image string
- apiserver
Port number - cluster
Distro string - dns
Nameserver string - docker
Storage stringDriver - docker
Volume numberSize - external
Network stringId - fixed
Network string - fixed
Subnet string - flavor string
- floating
Ip booleanEnabled - http
Proxy string - https
Proxy string - insecure
Registry string - keypair
Id string - labels {[key: string]: any}
- master
Flavor string - master
Lb booleanEnabled - name string
- network
Driver string - no
Proxy string - public boolean
- region string
- registry
Enabled boolean - server
Type string - tls
Disabled boolean - volume
Driver string
- coe str
- image str
- apiserver_
port float - cluster_
distro str - dns_
nameserver str - docker_
storage_ strdriver - docker_
volume_ floatsize - external_
network_ strid - fixed_
network str - fixed_
subnet str - flavor str
- floating_
ip_ boolenabled - http_
proxy str - https_
proxy str - insecure_
registry str - keypair_
id str - labels Dict[str, Any]
- master_
flavor str - master_
lb_ boolenabled - name str
- network_
driver str - no_
proxy str - public bool
- region str
- registry_
enabled bool - server_
type str - tls_
disabled bool - volume_
driver str
Outputs
All input properties are implicitly available as output properties. Additionally, the ClusterTemplate resource produces the following output properties:
- created_
at str - id str
- The provider-assigned unique ID for this managed resource.
- project_
id str - updated_
at str - user_
id str
Look up an Existing ClusterTemplate Resource
Get an existing ClusterTemplate 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?: ClusterTemplateState, opts?: CustomResourceOptions): ClusterTemplatestatic get(resource_name, id, opts=None, apiserver_port=None, cluster_distro=None, coe=None, created_at=None, dns_nameserver=None, docker_storage_driver=None, docker_volume_size=None, external_network_id=None, fixed_network=None, fixed_subnet=None, flavor=None, floating_ip_enabled=None, http_proxy=None, https_proxy=None, image=None, insecure_registry=None, keypair_id=None, labels=None, master_flavor=None, master_lb_enabled=None, name=None, network_driver=None, no_proxy=None, project_id=None, public=None, region=None, registry_enabled=None, server_type=None, tls_disabled=None, updated_at=None, user_id=None, volume_driver=None, __props__=None);func GetClusterTemplate(ctx *Context, name string, id IDInput, state *ClusterTemplateState, opts ...ResourceOption) (*ClusterTemplate, error)public static ClusterTemplate Get(string name, Input<string> id, ClusterTemplateState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Apiserver
Port int - Cluster
Distro string - Coe string
- Created
At string - Dns
Nameserver string - Docker
Storage stringDriver - Docker
Volume intSize - External
Network stringId - Fixed
Network string - Fixed
Subnet string - Flavor string
- Floating
Ip boolEnabled - Http
Proxy string - Https
Proxy string - Image string
- Insecure
Registry string - Keypair
Id string - Labels Dictionary<string, object>
- Master
Flavor string - Master
Lb boolEnabled - Name string
- Network
Driver string - No
Proxy string - Project
Id string - Public bool
- Region string
- Registry
Enabled bool - Server
Type string - Tls
Disabled bool - Updated
At string - User
Id string - Volume
Driver string
- Apiserver
Port int - Cluster
Distro string - Coe string
- Created
At string - Dns
Nameserver string - Docker
Storage stringDriver - Docker
Volume intSize - External
Network stringId - Fixed
Network string - Fixed
Subnet string - Flavor string
- Floating
Ip boolEnabled - Http
Proxy string - Https
Proxy string - Image string
- Insecure
Registry string - Keypair
Id string - Labels map[string]interface{}
- Master
Flavor string - Master
Lb boolEnabled - Name string
- Network
Driver string - No
Proxy string - Project
Id string - Public bool
- Region string
- Registry
Enabled bool - Server
Type string - Tls
Disabled bool - Updated
At string - User
Id string - Volume
Driver string
- apiserver
Port number - cluster
Distro string - coe string
- created
At string - dns
Nameserver string - docker
Storage stringDriver - docker
Volume numberSize - external
Network stringId - fixed
Network string - fixed
Subnet string - flavor string
- floating
Ip booleanEnabled - http
Proxy string - https
Proxy string - image string
- insecure
Registry string - keypair
Id string - labels {[key: string]: any}
- master
Flavor string - master
Lb booleanEnabled - name string
- network
Driver string - no
Proxy string - project
Id string - public boolean
- region string
- registry
Enabled boolean - server
Type string - tls
Disabled boolean - updated
At string - user
Id string - volume
Driver string
- apiserver_
port float - cluster_
distro str - coe str
- created_
at str - dns_
nameserver str - docker_
storage_ strdriver - docker_
volume_ floatsize - external_
network_ strid - fixed_
network str - fixed_
subnet str - flavor str
- floating_
ip_ boolenabled - http_
proxy str - https_
proxy str - image str
- insecure_
registry str - keypair_
id str - labels Dict[str, Any]
- master_
flavor str - master_
lb_ boolenabled - name str
- network_
driver str - no_
proxy str - project_
id str - public bool
- region str
- registry_
enabled bool - server_
type str - tls_
disabled bool - updated_
at str - user_
id str - volume_
driver str
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.