Installing Terraform
...
Code Block | ||||
---|---|---|---|---|
| ||||
# create a SSH key-pair using other method first since terraform is not secure variable "key_pair_name" { description = "key pair name" default = "tutorial" } variable "http_sec_group" { description = "custom security group name" default = "HTTP-ingress" } variable "network_name" { description = "The network to be used." default = "Internal" } variable "instance_name" { description = "The Instance Name to be used." default = "tutorial-machine" } variable "image_id" { #find with: openstack image list description = "The image ID to be used." default = "622cb70d-c88c-4dc4-99e6-df8b8f9965d7" } variable "flavor_id" { #find with: openstack flavor list description = "The flavor id to be used." default = "026ace2c-5247-4bdc-8929-81d129cc69bf" } # have to put http sec group here as well variable "security_groups" { description = "List of security group" type = list default = ["default", "HTTP-ingress"] } variable "instance_num" { description = "The keypair public key." default = 1 } variable "volume_name" { description = "name of volume" default = "tutorial_volume" } variable "volume_size" { description = "size of volume" default = 3 } |
...
Provider | Function |
---|---|
openstack_compute_instance_v2 | Create instance |
openstack_networking_secgroup_v2 | Create security group |
openstack_networking_secgroup_rule_v2 | Create security group rule |
openstack_networking_network_v2 | Create network |
openstack_networking_floatingip_v2 | Get a floating IP from allocated pool |
openstack_compute_floatingip_associate_v2 | Associate floating IP to instances |
openstack_containerinfra_clustertemplate_v1 | Create magnum cluster template |
openstack_containerinfra_cluster_v1 | Create magnum cluster |
openstack_blockstorage_volume_v2 | Create a new volume |
openstack_compute_volume_attach_v2 | Attach volume to instances |
openstack_lb_loadbalancer_v2 | Create Load balancer |
openstack_lb_listener_v2 | Create Load balancer listener |
openstack_lb_pool_v2 | Set method for load balance charge between instance (e.g. round robin) |
openstack_lb_member_v2 | Add instance to load balancer |
openstack_lb_monitor_v2 | Create health monitor for load balancer |
...