# Node ## Provides an e2e node resource This resource allows you to manage nodes on your E2E clusters. When applied, a new node is created. When destroyed, this node is removed. ### Example Usage ```hcl resource "e2e_node" "node1" { name = "node_name" location = "Delhi" plan = "C3.8GB" image = "CentOS-7" project_id = security_group_ids = [10001, 10002, 10018] //Just an example start_script = file("pathToTheFile") // example - file("./config/test.sh"), } ``` The above code will create a node of the above configuration when you run command terraform apply. Choose the appropriate plan and image from the section Node Plans. ## Schema ## Argument Reference this fields are used as an arguments to launch the nodes. The Required fields are mandatory. These fields are not to be changed once node is created. ### Argument Reference - **image** (Required) (String): The name of the image you have selected. - **name** (Required) (String): The name of the resource, also acts as its unique ID. - **plan** (Required) (String): Name of the Plan. - **region** (Required) (String): Location where the node is to be launched. Available regions: Delhi, Chennai. - **label** (Optional) (String): The name of the group. Default value is "default". - **backup** (Optional) (Boolean): Tells you the state of your backups. - **default_public_ip** (Optional) (Boolean): Tells us the state of the default public IP. - **disable_password** (Optional) (Boolean): Can disable password as per requirement. - **enable_bitninja** (Optional) (Boolean): Enable Bitninja as per requirement. - **is_ipv6_availed** (Optional) (Boolean): Indicates if IPv6 is available. - **is_saved_image** (Optional) (Boolean): Used when creating a node from a saved image. - **reserve_ip** (Optional) (String): Reserve an IP as per requirement. - **saved_image_template_id** (Optional) (Number): Template ID required when saving the node from a saved image. Provide the template ID of the saved image. Required when `is_saved_image` field is true. - **ssh_keys** (Optional) (List of String): Specify the SSH keys as required. Checkout the `ssh_keys` datasource for listing SSH keys. - **vpc_id** (Optional) (String): Can attach a VPC ID from your VPCs. Checkout the `vpcs_datasource` to list existing VPCs. ## Actions This field are used when you need to perform actions on the node. You can apply changes to this fields as required. - **lock_node** (Optional) (Boolean) : Node is locked when set true .Can specify whether to lock the node or not - **power_status** (Optional) (String) : power_on to start the node and power_off to power off the node - **reboot_node** (Optional) (Boolean) : When set true node will be rebooted. Node should be in running state to perform rebooting.Always check the field. If you have an active disk-intensive process such as database, backups running, then a rebooting may lead to data corruption and data loss (best option is to reboot the machine from within Operating System). - **reinstall_node** (Optional) (Boolean) : for reinstalling the node. Node should be in running state to perform this action. Always check this field as it will delete all your data permanently when set true. ## Attribute Reference (Read Only) These fields are not to be specified in terraform configuration file. They are only meant for reading - **created_at** (String) : Creation time of the node - **disk** (String) : Disc info of the node - **id** (String) : The ID of this resource. - **is_active** (Boolean) : Whether the node is active or not. - **is_bitninja_license_active** (Boolean) : Can check if the bitninja license is active or not - **memory** (String) : Amount of RAM assigned to the node - **price** (String) : Price details of the node - **private_ip_address** (String) : Private ip address alloted to node if any - **public_ip_address** (String) : Public ip address alloted to node - **status** (String) : Current status of the node ---