Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Installing Terraform

...

Code Block
themeEmacs
titlevariables.tf
# 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
}


...

ProviderFunction
openstack_compute_instance_v2Create instance
openstack_networking_secgroup_v2Create security group
openstack_networking_secgroup_rule_v2Create security group rule
openstack_networking_network_v2Create network
openstack_networking_floatingip_v2Get a floating IP from allocated pool
openstack_compute_floatingip_associate_v2Associate floating IP to instances
openstack_containerinfra_clustertemplate_v1Create magnum cluster template
openstack_containerinfra_cluster_v1Create magnum cluster
openstack_blockstorage_volume_v2Create a new volume
openstack_compute_volume_attach_v2Attach volume to instances
openstack_lb_loadbalancer_v2Create Load balancer
openstack_lb_listener_v2Create Load balancer listener
openstack_lb_pool_v2Set method for load balance charge between instance (e.g. round robin)
openstack_lb_member_v2Add instance to load balancer
openstack_lb_monitor_v2Create health monitor for load balancer

...