Skip to content

Commit dbcb941

Browse files
authored
Merge branch 'master' into vpn-dev
2 parents f32f4da + 1d976fb commit dbcb941

File tree

786 files changed

+59991
-22780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

786 files changed

+59991
-22780
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,17 @@ FEATURES:
88
* **New Resource**: `tencentcloud_vpn_gateway`
99
* **New Resource**: `tencentcloud_customer_gateway`
1010
* **New Resource**: `tencentcloud_vpn_connection`
11+
* **New Data Source**: `tencentcloud_images`
12+
* **Provider TencentCloud**: add `security_token` argument
13+
14+
ENHANCEMENTS:
15+
16+
* All api calls now using api3.0
17+
* Resource: `tencentcloud_eip` add optional argument `tags`.
18+
* Data Source: `tencentcloud_eips` add optional argument `tags`.
1119

1220
BUG FIXES:
21+
1322
* Fixed docs of CAM
1423

1524
## 1.22.0 (November 05, 2019)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Requirements
44

55
* [Terraform](https://www.terraform.io/downloads.html) 0.12.x
6-
* [Go](https://golang.org/doc/install) 1.13 (to build the provider plugin)
6+
* [Go](https://golang.org/doc/install) 1.13.x (to build the provider plugin)
77

88
## Usage
99

examples/tencentcloud-cbs/main.tf

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,15 @@ resource "tencentcloud_cbs_storage" "my_storage" {
1111
}
1212
}
1313

14-
data "tencentcloud_image" "my_favorate_image" {
15-
os_name = "centos"
16-
17-
filter {
18-
name = "image-type"
19-
values = ["PUBLIC_IMAGE"]
20-
}
14+
data "tencentcloud_images" "my_favorate_image" {
15+
image_type = ["PUBLIC_IMAGE"]
16+
os_name = "centos"
2117
}
2218

2319
resource "tencentcloud_instance" "my_instance" {
2420
instance_name = "tf-test-instance"
2521
availability_zone = "${var.availability_zone}"
26-
image_id = "${data.tencentcloud_image.my_favorate_image.image_id}"
22+
image_id = "${data.tencentcloud_images.my_favorate_image.images.0.image_id}"
2723
instance_type = "${var.instance_type}"
2824
system_disk_type = "${var.storage_type}"
2925
}

examples/tencentcloud-clb/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ resource "tencentcloud_clb_listener" "listener_https" {
6767
port = 443
6868
protocol = "HTTPS"
6969
certificate_ssl_mode = "UNIDIRECTIONAL"
70-
certificate_id = "VfqcL1ME"
70+
certificate_id = "VfqO4zkB"
7171
}
7272

7373
resource "tencentcloud_clb_listener_rule" "rule_https" {

examples/tencentcloud-container-cluster-instance/main.tf

Lines changed: 0 additions & 58 deletions
This file was deleted.

examples/tencentcloud-container-cluster/main.tf

Lines changed: 0 additions & 38 deletions
This file was deleted.

examples/tencentcloud-container-cluster/variables.tf

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/tencentcloud-eip-association/main.tf

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
data "tencentcloud_image" "my_favorate_image" {
2-
os_name = "centos"
3-
4-
filter {
5-
name = "image-type"
6-
values = ["PUBLIC_IMAGE"]
7-
}
1+
data "tencentcloud_images" "my_favorate_image" {
2+
image_type = ["PUBLIC_IMAGE"]
3+
os_name = "centos"
84
}
95

106
data "tencentcloud_instance_types" "my_favorate_instance_types" {
@@ -22,17 +18,15 @@ data "tencentcloud_availability_zones" "my_favorate_zones" {}
2218
resource "tencentcloud_instance" "my_instance" {
2319
instance_name = "terraform_automation_test_kuruk"
2420
availability_zone = "${data.tencentcloud_availability_zones.my_favorate_zones.zones.0.name}"
25-
image_id = "${data.tencentcloud_image.my_favorate_image.image_id}"
21+
image_id = "${data.tencentcloud_images.my_favorate_image.images.0.image_id}"
2622
instance_type = "${data.tencentcloud_instance_types.my_favorate_instance_types.instance_types.0.instance_type}"
2723

28-
system_disk_type = "CLOUD_BASIC"
24+
system_disk_type = "CLOUD_PREMIUM"
2925

30-
data_disks = [
31-
{
32-
data_disk_type = "CLOUD_BASIC"
33-
data_disk_size = 70
34-
},
35-
]
26+
data_disks {
27+
data_disk_type = "CLOUD_PREMIUM"
28+
data_disk_size = 70
29+
}
3630

3731
disable_security_service = true
3832
disable_monitor_service = true

examples/tencentcloud-eip/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
resource "tencentcloud_eip" "foo" {
22
name = "awesome_eip_example"
3+
4+
tags = {
5+
"test" = "test"
6+
}
37
}
8+
9+
data "tencentcloud_eips" "tags" {
10+
tags = "${tencentcloud_eip.foo.tags}"
11+
}

examples/tencentcloud-eni/main.tf

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,9 @@ resource "tencentcloud_eni" "foo" {
4747
}
4848
}
4949

50-
data "tencentcloud_image" "my_favorite_image" {
51-
os_name = "centos"
52-
53-
filter {
54-
name = "image-type"
55-
values = ["PUBLIC_IMAGE"]
56-
}
50+
data "tencentcloud_images" "my_favorate_image" {
51+
image_type = ["PUBLIC_IMAGE"]
52+
os_name = "centos"
5753
}
5854

5955
data "tencentcloud_instance_types" "my_favorite_instance_types" {
@@ -69,7 +65,7 @@ data "tencentcloud_instance_types" "my_favorite_instance_types" {
6965
resource "tencentcloud_instance" "foo" {
7066
instance_name = "ci-test-eni-attach"
7167
availability_zone = "ap-guangzhou-3"
72-
image_id = "${data.tencentcloud_image.my_favorite_image.image_id}"
68+
image_id = "${data.tencentcloud_images.my_favorate_image.images.0.image_id}"
7369
instance_type = "${data.tencentcloud_instance_types.my_favorite_instance_types.instance_types.0.instance_type}"
7470
system_disk_type = "CLOUD_PREMIUM"
7571
disable_security_service = true

examples/tencentcloud-instance-security-groups/main.tf

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
data "tencentcloud_image" "my_favorate_image" {
2-
os_name = "${var.os_name}"
3-
4-
filter {
5-
name = "image-type"
6-
values = ["PUBLIC_IMAGE"]
7-
}
1+
data "tencentcloud_images" "my_favorate_image" {
2+
image_type = ["PUBLIC_IMAGE"]
3+
os_name = "centos"
84
}
95

106
data "tencentcloud_instance_types" "my_favorate_instance_types" {
@@ -27,7 +23,7 @@ resource "tencentcloud_security_group" "my_sg" {
2723
resource "tencentcloud_security_group_rule" "web" {
2824
security_group_id = "${tencentcloud_security_group.my_sg.id}"
2925
type = "ingress"
30-
cidr_ip = "115.158.44.225/30"
26+
cidr_ip = "115.158.44.225/32"
3127
ip_protocol = "tcp"
3228
port_range = "80,3000,8080"
3329
policy = "accept"
@@ -36,7 +32,7 @@ resource "tencentcloud_security_group_rule" "web" {
3632
resource "tencentcloud_security_group_rule" "login" {
3733
security_group_id = "${tencentcloud_security_group.my_sg.id}"
3834
type = "ingress"
39-
cidr_ip = "119.28.86.93/0"
35+
cidr_ip = "119.28.86.93/32"
4036
ip_protocol = "tcp"
4137
port_range = "22"
4238
policy = "accept"
@@ -50,7 +46,7 @@ resource "tencentcloud_security_group" "my_sg2" {
5046
resource "tencentcloud_security_group_rule" "qortex" {
5147
security_group_id = "${tencentcloud_security_group.my_sg2.id}"
5248
type = "ingress"
53-
cidr_ip = "119.28.86.93/0"
49+
cidr_ip = "119.28.86.93/32"
5450
ip_protocol = "tcp"
5551
port_range = "5000"
5652
policy = "accept"
@@ -59,9 +55,10 @@ resource "tencentcloud_security_group_rule" "qortex" {
5955
resource "tencentcloud_instance" "instance-without-specified-image-id-example" {
6056
instance_name = "${var.instance_name}"
6157
availability_zone = "${data.tencentcloud_availability_zones.my_favorate_zones.zones.0.name}"
62-
image_id = "${data.tencentcloud_image.my_favorate_image.image_id}"
58+
image_id = "${data.tencentcloud_images.my_favorate_image.images.0.image_id}"
6359
instance_type = "${data.tencentcloud_instance_types.my_favorate_instance_types.instance_types.0.instance_type}"
6460
password = "test1234"
61+
system_disk_type = "CLOUD_PREMIUM"
6562

6663
security_groups = [
6764
"${tencentcloud_security_group.my_sg.id}",

examples/tencentcloud-instance-vpc/main.tf

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
data "tencentcloud_image" "my_favorate_image" {
2-
os_name = "${var.os_name}"
3-
4-
filter {
5-
name = "image-type"
6-
values = ["PUBLIC_IMAGE"]
7-
}
1+
data "tencentcloud_images" "my_favorate_image" {
2+
image_type = ["PUBLIC_IMAGE"]
3+
os_name = "centos"
84
}
95

106
data "tencentcloud_instance_types" "my_favorate_instance_types" {
@@ -36,8 +32,9 @@ resource "tencentcloud_subnet" "my_subnet" {
3632
resource "tencentcloud_instance" "instance-vpc-example" {
3733
instance_name = "${var.instance_name}"
3834
availability_zone = "${data.tencentcloud_availability_zones.my_favorate_zones.zones.0.name}"
39-
image_id = "${data.tencentcloud_image.my_favorate_image.image_id}"
35+
image_id = "${data.tencentcloud_images.my_favorate_image.images.0.image_id}"
4036
instance_type = "${data.tencentcloud_instance_types.my_favorate_instance_types.instance_types.0.instance_type}"
37+
system_disk_type = "CLOUD_PREMIUM"
4138

4239
vpc_id = "${tencentcloud_vpc.my_vpc.id}"
4340
subnet_id = "${tencentcloud_subnet.my_subnet.id}"

examples/tencentcloud-instance/main.tf

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
data "tencentcloud_image" "my_favorate_image" {
2-
os_name = "${var.os_name}"
3-
4-
filter {
5-
name = "image-type"
6-
values = ["PUBLIC_IMAGE"]
7-
}
1+
data "tencentcloud_images" "my_favorate_image" {
2+
image_type = ["PUBLIC_IMAGE"]
3+
os_name = "centos"
84
}
95

106
data "tencentcloud_instance_types" "my_favorate_instance_types" {
@@ -24,15 +20,13 @@ resource "tencentcloud_key_pair" "random_key" {
2420
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDjd8fTnp7Dcuj4mLaQxf9Zs/ORgUL9fQxRCNKkPgP1paTy1I513maMX126i36Lxxl3+FUB52oVbo/FgwlIfX8hyCnv8MCxqnuSDozf1CD0/wRYHcTWAtgHQHBPCC2nJtod6cVC3kB18KeV4U7zsxmwFeBIxojMOOmcOBuh7+trRw=="
2521
}
2622

27-
resource "tencentcloud_instance" "instance-without-specified-image-id-example" {
23+
resource "tencentcloud_instance" "foo" {
2824
instance_name = "${var.instance_name}"
2925
availability_zone = "${data.tencentcloud_availability_zones.my_favorate_zones.zones.0.name}"
30-
image_id = "${data.tencentcloud_image.my_favorate_image.image_id}"
26+
image_id = "${data.tencentcloud_images.my_favorate_image.images.0.image_id}"
3127
instance_type = "${data.tencentcloud_instance_types.my_favorate_instance_types.instance_types.0.instance_type}"
3228
key_name = "${tencentcloud_key_pair.random_key.id}"
33-
34-
// instance_charge_type = "PREPAID"
35-
// instance_charge_type_prepaid_period = 1
29+
system_disk_type = "CLOUD_PREMIUM"
3630

3731
disable_monitor_service = true
3832
internet_max_bandwidth_out = 2

examples/tencentcloud-nat/main.tf

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
data "tencentcloud_availability_zones" "my_favorate_zones" {}
22

3-
data "tencentcloud_image" "my_favorate_image" {
4-
filter {
5-
name = "image-type"
6-
values = ["PUBLIC_IMAGE"]
7-
}
3+
data "tencentcloud_images" "my_favorate_image" {
4+
image_type = ["PUBLIC_IMAGE"]
5+
os_name = "centos"
86
}
97

108
# Create VPC and Subnet
@@ -45,16 +43,17 @@ resource "tencentcloud_nat_gateway" "my_nat" {
4543
# Create CVM
4644
resource "tencentcloud_instance" "foo" {
4745
availability_zone = "${data.tencentcloud_availability_zones.my_favorate_zones.zones.0.name}"
48-
image_id = "${data.tencentcloud_image.my_favorate_image.image_id}"
46+
image_id = "${data.tencentcloud_images.my_favorate_image.images.0.image_id}"
4947
vpc_id = "${tencentcloud_vpc.main.id}"
5048
subnet_id = "${tencentcloud_subnet.main_subnet.id}"
49+
system_disk_type = "CLOUD_PREMIUM"
5150
}
5251

5352
# Add DNAT Entry
5453
resource "tencentcloud_dnat" "dev_dnat" {
5554
vpc_id = "${tencentcloud_nat_gateway.my_nat.vpc_id}"
5655
nat_id = "${tencentcloud_nat_gateway.my_nat.id}"
57-
protocol = "tcp"
56+
protocol = "TCP"
5857
elastic_ip = "${tencentcloud_eip.eip_dev_dnat.public_ip}"
5958
elastic_port = "80"
6059
private_ip = "${tencentcloud_instance.foo.private_ip}"
@@ -64,7 +63,7 @@ resource "tencentcloud_dnat" "dev_dnat" {
6463
resource "tencentcloud_dnat" "test_dnat" {
6564
vpc_id = "${tencentcloud_nat_gateway.my_nat.vpc_id}"
6665
nat_id = "${tencentcloud_nat_gateway.my_nat.id}"
67-
protocol = "udp"
66+
protocol = "UDP"
6867
elastic_ip = "${tencentcloud_eip.eip_test_dnat.public_ip}"
6968
elastic_port = "8080"
7069
private_ip = "${tencentcloud_instance.foo.private_ip}"

0 commit comments

Comments
 (0)