Deploy cvm and mysql with one click, and use security groups to set security access policies.
Name | Version |
---|---|
terraform | >=0.12 |
tencentcloud | >=1.81.0 |
Name | Version |
---|---|
tencentcloud | >=1.81.0 |
Name | Source | Version |
---|---|---|
cvm-instance | ./modules/cvm | n/a |
mysql-instance | ./modules/mysql | n/a |
securityGroup-cvm | ./modules/securityGroups | n/a |
securityGroup-mysql | ./modules/securityGroups | n/a |
vpc | ./modules/vpc | n/a |
Name | Type |
---|---|
tencentcloud_vpc.vpc | resource |
tencentcloud_subnet.subnet | resource |
tencentcloud_security_group.sg | resource |
tencentcloud_security_group_rule_set.sg_rule | resource |
tencentcloud_instance.instance | resource |
tencentcloud_mysql_instance.instance | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
allocate_public_ip | Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false. | string |
n/a | yes |
availability_zone | The subnet availability zone. | string |
"ap-guangzhou-2" |
no |
cpu | Cpu cores. | number |
4 |
no |
data_disk_size | Size of the data disk, and unit is GB. | number |
50 |
no |
data_disk_type | Data disk type. Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, LOCAL_NVME: local NVME disk, specified in the InstanceType, LOCAL_PRO: local HDD disk, specified in the InstanceType, CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD, CLOUD_BSSD: Balanced SSD. | string |
"CLOUD_PREMIUM" |
no |
device_type | Device type. | string |
"UNIVERSAL" |
no |
image_id | The image to use for the instance. Changing image_id will cause the instance reset. | string |
"img-l8og963d" |
no |
instance_name | the name of instance to create. | string |
"crp-cvm" |
no |
instance_type | instance type of instance. | string |
"S5.MEDIUM4" |
no |
internet_max_bandwidth_out | Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when allocate_public_ip is false. |
number |
n/a | yes |
mem_size | Memory size (in MB). | number |
8000 |
no |
mysql_instance_name | The name of the mysql instance. | string |
"crp-mysql" |
no |
mysql_instance_password | The password of the mysql instance. | string |
"Password@123" |
no |
mysql_instance_region | The regioni of the mysql instance. | string |
"ap-guangzhou" |
no |
password | Login password of the instance. For Linux instances, the password must include 8-30 characters, and contain at least two of the following character sets: [a-z], [A-Z], [0-9] and [()~!@#$%^&*-+= |
string |
"Password@123" |
no |
sg_description | The description of the security group. | string |
"sg_description" |
no |
sg_name | The name of the security group. | string |
"sg_name" |
no |
subnet_cidr_block | The CIDR block for the subnet. | string |
"10.0.0.0/24" |
no |
subnet_name | The name of the VPC. | string |
"cdb_app_subnet" |
no |
system_disk_size | Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop. | number |
50 |
no |
system_disk_type | System disk type. For more information on limits of system disk types, see Storage Overview. Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, CLOUD_SSD: SSD, CLOUD_PREMIUM: Premium Cloud | string |
"CLOUD_PREMIUM" |
no |
tags | A mapping of tags to assign to the resource. | map(string) |
{} |
no |
volume_size | Disk size (in GB). | number |
200 |
no |
vpc_cidr_block | The CIDR block for the VPC. | string |
"10.0.0.0/16" |
no |
vpc_name | The name of the VPC. | string |
"cdb_app_vpc" |
no |
Name | Description |
---|---|
db_instance_id | The instance id of mysql. |
db_intranet_ip | instance intranet IP. |
db_intranet_port | Public access port. |
instance_id | id of instance. |
private_ip | The private ip of instance. |
public_ip | The public ip of instance. |