This repository contains Terraform modules ready for use with Open Telekom Cloud. These modules aim to correlate the native OpenStack resources under the paradigm of OTC like ECS, VPC, etc.
See the Terraform documentation on how to use modules.
If starting from scratch, a terraform init
in you terraform directory will initialize and download the required plugins as well as the modules. If you already have an initialized workspace and just want to retrieve the modules, you can do that via terraform get
. Please note that any subsequent invocations of terraform get
will NOT update the modules. If you want to get the latest version, you need to issue the command terraform get -update=true
.
To see an example implementation of these modules, you can use this repository, especially this file.
This modules creates one or more EVS (Elastic Volume Service). Using the ecs_count
variable, any number of volumes can be created. These volumes have to be attached to an ECS instance (or a ordinary OpenStack compute instance), provided via the ecs_ids
parameter.
Parameter
Name | Description | Type | Required | Default |
---|---|---|---|---|
name | naming prefix for created resources | string | True | |
size_in_gb | size of the volume in GByte | string | True | |
ecs_ids | list of IDs from ECS to attach the volumes to | list | True | |
evs_count | number of volumes to create | string | False | 1 |
Attributes
Name | Description | Type |
---|---|---|
ids | list of IDs of the created volumes | list |
Native OpenStack resources
-
openstack_blockstorage_volume_v2
-
openstack_compute_volume_attach_v2
This modules creates one or more ECS (Elastic Cloud Server). The information for image
and flavor
can be found when creating a new ECS in OTC:
Parameter
Name | Description | Type | Required | Default |
---|---|---|---|---|
name | naming prefix for created resources | string | True | |
image | name of the image to use for the server | string | True | |
flavor | name of the flavor to use for the server | string | True | |
pubkey | the public key to deploy on the server | string | True | |
network_id | the ID of the network to attach the server to | string | True | |
subnet_id | the ID of the subnet to attach the server to | string | True | |
user_data | the user data to inject | string | False | |
attach_eip | whether or not to attach en EIP to the server | string | False | |
security_groups | list of security group ids to attach to the server | list | False | [] |
ecs_count | number of ECS instances to create | string | False | 1 |
ext_net_name | name of the external network (do not change) | string | False | admin_external_net |
Attributes
Name | Description | Type |
---|---|---|
addresses | list of ipv4 addresses of the created servers | list |
ids | list of IDs of the created servers | list |
count | number of servers created | string |
Native OpenStack resources
-
openstack_compute_instance_v2
-
openstack_networking_floatingip_v2
-
openstack_compute_keypair_v2
This modules creates a ULB (Unified Load Balancer).
Parameter
Name | Description | Type | Required | Default |
---|---|---|---|---|
name | naming prefix for created resources | string | True | |
subnet_id | the ID of the subnet to attach the loadbalancer to | string | True | |
members_count | number of members to add to the loadbalancer | string | True | |
members | the addresses of the memebers that should be added to the loadbalancer | list | True | |
attach_eip | whether or not to attach an EIP to the loadbalancer | string | False | true |
protocol | protocol used by the loadbalancer | string | False | HTTP |
listener_port | port the loadbalancer should listen on | string | False | 80 |
member_port | port of the members that provide the service to loadbalance | string | False | 80 |
monitor_url_path | url path to check for member health | string | False | / |
monitor_expected_codes | http code to indicate successful health check | string | False | 200 |
monitor_delay | delay of the health check in seconds | string | False | 20 |
monitor_timeout | timeout of the health check in seconds | string | False | 10 |
monitor_retries | retries of health checks before member gets removed | string | False | 5 |
ext_net_name | name of the external network (do not change) | string | False | admin_external_net |
dependencies | dependencies that should be build before the loadbalancer | list | False | [] |
Attributes
Name | Description | Type |
---|---|---|
vip_port_id | ID of the vip port created by the loadbalancer | string |
Native OpenStack resources
-
openstack_lb_loadbalancer_v2
-
openstack_lb_listener_v2
-
openstack_lb_pool_v2
-
openstack_lb_member_v2
-
openstack_lb_monitor_v2
-
openstack_networking_floatingip_v2
This modules creates a VPC (Virtual Private Cloud).
Parameter
Name | Description | Type | Required | Default |
---|---|---|---|---|
name | naming prefix for created resources | string | True | |
subnet | cidr of the desired subnet for the VPC | string | True | |
nameserver | nameserver to provide vi DHCP | list | False | ['8.8.8.8', '8.8.4.4'] |
ext_net_name | name of the external network (do not change) | string | False | admin_external_net |
Attributes
Name | Description | Type |
---|---|---|
network_id | the id of the created network | string |
router_id | the id of the created router | string |
interface_port | the port id of the created router interface | string |
subnet_id | the id of the created subnet | string |
Native OpenStack resources
-
openstack_networking_network_v2
-
openstack_networking_subnet_v2
-
openstack_networking_router_v2
-
openstack_networking_router_interface_v2