Giter Club home page Giter Club logo

terraform-alicloud-ecs-instance's Introduction

Alicloud ECS Instance Terraform Module In VPC terraform-alicloud-ecs-instance

A terraform module to provide ECS instances in Alicloud VPC. Its input variables contains VSwitch, Security Group, ECS Disks and ECS Instances.

  • It assumes you have one VPC and VSwitch and you want to put the new instances to the VPC. If not, you can launch a new one by module terraform-alicloud-vpc
  • It assumes you have several security groups in the VPC and you want to join the new instances into them. If not, you can launch one or more groups by module terraform-alicloud-security-group
  • If you have no idea some parametes, such as instance type, availability zone and image id, the module will provide default values according to some input parameters, such as image_name_regex, cpu_core_count, memory_size and so on.

Note: If you specify the vswitch_id, the availability_zone would be ignore when launching ECS instances. Note: We have deprecated ECS instance field io_optimized from terraform-provider-alicloud. If you happened some I/O optimized issues, please download and update provider package from terraform-provider-alicloud release.


Usage

You can use this in your terraform template with the following steps.

  1. Adding a module resource to your template, e.g. main.tf

    module "tf-instances" {
        source = "alibaba/ecs-instance/alicloud"
    
        vswitch_id = "vsw-wqrw3c423"
        group_ids = ["sg-f2c2fwqvs"]
        private_ips = ["172.16.1.10", "172.16.1.20"]
    
        disk_category = "cloud_ssd"
        disk_name = "my_module_disk"
        disk_size = "50"
        number_of_disks = 2
    
        instance_name = "my_module_instances"
        host_name = "my-host"
        internet_charge_type = "PayByTraffic"
        number_of_instances = "2"
    
        key_name = "for-ecs-instance-module"
    
    }
    
  2. Setting access_key and secret_key values through environment variables:

    • ALICLOUD_ACCESS_KEY
    • ALICLOUD_SECRET_KEY

Authors

Created and maintained by He Guimin(@xiaozhu36, [email protected])

Reference

terraform-alicloud-ecs-instance's People

Contributors

alibaba-oss avatar angryninja48 avatar asaiun avatar xiaozhu36 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.