Terraform module which creating VPC and bastion host on Alibaba Cloud
English | 简体中文
This module is used to create VPC and bastion host on Alibaba Cloud under Alibaba Cloud.
These types of resources are supported:
data "alicloud_zones" "default" {
available_resource_creation = "VSwitch"
}
resource "alicloud_vpc" "default" {
vpc_name = "TerraformTest"
cidr_block = "172.16.0.0/12"
}
resource "alicloud_security_group" "default" {
vpc_id = alicloud_vpc.default.id
name = "TerraformTest"
}
resource "alicloud_vswitch" "default" {
vpc_id = alicloud_vpc.default.id
cidr_block = cidrsubnet(alicloud_vpc.default.cidr_block, 8, 4)
zone_id = data.alicloud_zones.default.zones[0].id
}
locals {
zone_id = data.alicloud_zones.default.ids[length(data.alicloud_zones.default.ids) - 1]
}
module "example" {
source = "terraform-alicloud-modules/vpc-bastionhost/alicloud"
vswtich_id = alicloud_vswitch.default.id
security_group_ids = [alicloud_security_group.default.id]
bastion_license_code = "bhah_ent_50_asset"
}
- This module using AccessKey and SecretKey are from
profile
andshared_credentials_file
. If you have not set them yet, please install aliyun-cli and configure it.
Name | Version |
---|---|
terraform | > = 0.13.0 |
alicloud | > = 1.110.0 |
Name | Version |
---|---|
alicloud | > = 1.110.0 |
If you have any problems when using this module, please opening a provider issue and let us know.
Note: There does not recommend opening an issue on this repo.
Created and maintained by Alibaba Cloud Terraform Team([email protected])
MIT Licensed. See LICENSE for full details.