阿里云单机WordPress模块
terraform-alicloud-aliyun-wordpress-ecs
examples
- simple
provider "alicloud" {
access_key = "xxxxxx"
secret_key = "xxxxxx"
region = "cn-hangzhou"
}
module "wordpress-ecs" {
source = "../../"
region = "cn-hangzhou"
instance_name = "wordpress-test"
key_pair_name = "ydd-cpg"
cpu_core_count = 2
memory_size = 4
system_disk_category = "cloud_efficiency"
system_disk_size = 50
instance_tags = { UseFor = "wordpress" }
# vpc_id = "vpc-bp1x486y5zjv37lt5ggds"
# vswitch_id = "vsw-bp1lzpkj0tfablctfg1eu"
# security_group_id = "sg-bp14tjdj1o3cf3499n1c"
}
Requirements
Name | Version |
---|---|
alicloud | >=1.207.2 |
Providers
No providers.
Modules
Name | Source | Version |
---|---|---|
instance | ./modules/terraform-alicloud-spot-instance | n/a |
wordpress | ./modules/terraform-alicloud-wordpress | n/a |
Resources
No resources.
Inputs
Name | Description | Type | Default | Required |
---|---|---|---|---|
cpu_core_count | CPU核心数 | number |
2 |
no |
instance_name | 实例名称 | string |
null |
no |
instance_tags | 实例标签 | map(string) |
{} |
no |
key_pair_name | 密钥对名称 | string |
"ydd-cpg" |
no |
memory_size | 内存大小 | number |
4 |
no |
region | 地域 | string |
n/a | yes |
security_group_id | 安全组SecurityGroup | string |
null |
no |
system_disk_category | 系统盘类型 | string |
"cloud_efficiency" |
no |
system_disk_size | 系统盘大小 | number |
50 |
no |
vpc_id | 专有网络VPC | string |
null |
no |
vswitch_id | 交换机VSwitch | string |
null |
no |
Outputs
Name | Description |
---|---|
instance_id | 实例ID |
instance_name | 实例名称 |
mysql_database | mysql数据库名 |
mysql_password | mysql密码 |
mysql_username | mysql账号 |
nginx_dir | Nginx目录 |
wordpress_admin_url | WordPress管理员地址 |
wordpress_dir | WordPress目录 |
wordpress_url | WordPress地址 |