Skip to content

Commit 4082d26

Browse files
authored
Merge branch 'master' into cam-dev
2 parents 7f9af4f + a6b1c97 commit 4082d26

File tree

916 files changed

+69230
-43874
lines changed

Some content is hidden

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

916 files changed

+69230
-43874
lines changed

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.5
1+
1.13.3

.travis.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
dist: trusty
1+
dist: xenial
22
sudo: required
33
services:
4-
- docker
4+
- docker
5+
56
language: go
67
go:
78
- "1.11.x"
@@ -10,27 +11,22 @@ go:
1011
- tip
1112

1213
install:
13-
# This script is used by the Travis build to install a cookie for
14-
# go.googlesource.com so rate limits are higher when using `go get` to fetch
15-
# packages that live there.
16-
# See: https://github.com/golang/go/issues/12933
17-
- bash scripts/gogetcookie.sh
18-
- make tools
14+
- make tools
1915

2016
script:
21-
- make lint
22-
- make test
23-
- make website-lint
24-
- make website-test
17+
- make lint
18+
- make test
19+
- make website-lint
20+
- make website-test
2521

2622
branches:
2723
only:
28-
- master
24+
- master
2925

3026
matrix:
3127
fast_finish: true
3228
allow_failures:
33-
- go: tip
29+
- go: tip
3430

3531
env:
36-
- GOFLAGS=-mod=vendor GO111MODULE=on
32+
global: GOFLAGS=-mod=vendor

CHANGELOG.md

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,43 @@
1-
## 1.21.0 (Unreleased)
1+
## 1.22.1 (Unreleased)
2+
BUG FIXES:
3+
* Fixed docs of CAM
4+
5+
## 1.22.0 (November 05, 2019)
6+
7+
FEATURES:
8+
9+
* **New Data Source**: `tencentcloud_cfs_file_systems`
10+
* **New Data Source**: `tencentcloud_cfs_access_groups`
11+
* **New Data Source**: `tencentcloud_cfs_access_rules`
12+
* **New Data Source**: `tencentcloud_scf_functions`
13+
* **New Data Source**: `tencentcloud_scf_namespaces`
14+
* **New Data Source**: `tencentcloud_scf_logs`
15+
* **New Resource**: `tencentcloud_cfs_file_system`
16+
* **New Resource**: `tencentcloud_cfs_access_group`
17+
* **New Resource**: `tencentcloud_cfs_access_rule`
18+
* **New Resource**: `tencentcloud_scf_function`
19+
* **New Resource**: `tencentcloud_scf_namespace`
20+
21+
## 1.21.2 (October 29, 2019)
22+
23+
BUG FIXES:
24+
25+
* Resource: `tencentcloud_gaap_realserver` add ip/domain exists check
26+
* Resource: `tencentcloud_kubernetes_cluster` add error handling logic and optional argument `tags`.
27+
* Resource: `tencentcloud_kubernetes_scale_worker` add error handling logic.
28+
* Data Source: `tencentcloud_kubernetes_clusters` add optional argument `tags`.
29+
30+
## 1.21.1 (October 23, 2019)
31+
32+
ENHANCEMENTS:
33+
34+
* Updated golang to version 1.13.x
35+
36+
BUG FIXES:
37+
38+
* Fixed docs of CAM
39+
40+
## 1.21.0 (October 15, 2019)
241

342
FEATURES:
443

@@ -10,7 +49,9 @@ FEATURES:
1049
* **New Data Source**: `tencentcloud_cam_group_policy_attachments`
1150
* **New Data Source**: `tencentcloud_cam_role_policy_attachments`
1251
* **New Data Source**: `tencentcloud_cam_group_memberships`
13-
* **New Data Source**: `tencentcloud_cam_SAML_providers`
52+
* **New Data Source**: `tencentcloud_cam_saml_providers`
53+
* **New Data Source**: `tencentcloud_reserved_instance_configs`
54+
* **New Data Source**: `tencentcloud_reserved_instances`
1455
* **New Resource**: `tencentcloud_cam_user`
1556
* **New Resource**: `tencentcloud_cam_group`
1657
* **New Resource**: `tencentcloud_cam_role`
@@ -19,9 +60,7 @@ FEATURES:
1960
* **New Resource**: `tencentcloud_cam_group_policy_attachment`
2061
* **New Resource**: `tencentcloud_cam_role_policy_attachment`
2162
* **New Resource**: `tencentcloud_cam_group_membership`
22-
* **New Resource**: `tencentcloud_cam_SAML_provider`
23-
* **New Data Source**: `tencentcloud_reserved_instance_configs`
24-
* **New Data Source**: `tencentcloud_reserved_instances`
63+
* **New Resource**: `tencentcloud_cam_saml_provider`
2564
* **New Resource**: `tencentcloud_reserved_instance`
2665

2766
ENHANCEMENTS:
@@ -32,7 +71,7 @@ ENHANCEMENTS:
3271
BUG FIXES:
3372

3473
* Resource: `tencentcloud_gaap_http_domain` fix sometimes can't enable realserver auth
35-
* Resource: `tencentcloud_cam_role_policy_attachment` fix error in exmaple of the website
74+
3675

3776
## 1.20.1 (October 08, 2019)
3877

@@ -121,7 +160,6 @@ DEPRECATED:
121160

122161
* Data Source: `tencentcloud_kubernetes_clusters`:`container_runtime` is no longer supported.
123162

124-
125163
## 1.18.0 (September 10, 2019)
126164

127165
FEATURES:
@@ -186,7 +224,6 @@ FEATURES:
186224
* **New Resource**: `tencentcloud_kubernetes_scale_worker`
187225
* **New Resource**: `tencentcloud_kubernetes_cluster`
188226

189-
190227
DEPRECATED:
191228
* Data Source: `tencentcloud_container_clusters` replaced by `tencentcloud_kubernetes_clusters`.
192229
* Data Source: `tencentcloud_container_cluster_instances` replaced by `tencentcloud_kubernetes_clusters`.
@@ -406,7 +443,6 @@ ENHANCEMENTS:
406443

407444
* resource/tencentcloud_instance: Add `user_data_raw` argument ([#4](https://github.com/terraform-providers/terraform-provider-scaffolding/issues/4))
408445

409-
410446
## 1.2.2 (September 28, 2018)
411447

412448
BUG FIXES:

GNUmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fmtcheck:
2828

2929
lint:
3030
@echo "==> Checking source code against linters..."
31-
@GOGC=30 golangci-lint run ./$(PKG_NAME)
31+
@GOGC=30 GOPACKAGESPRINTGOLISTERRORS=1 golangci-lint run --timeout=30m ./$(PKG_NAME)
3232
@tfproviderlint \
3333
-c 1 \
3434
-AT001 \

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.11 (to build the provider plugin)
6+
* [Go](https://golang.org/doc/install) 1.13 (to build the provider plugin)
77

88
## Usage
99

examples/tencentcloud-cfs/main.tf

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
resource "tencentcloud_vpc" "vpc" {
2+
name = "test-cfs-vpc"
3+
cidr_block = "10.2.0.0/16"
4+
}
5+
6+
resource "tencentcloud_subnet" "subnet" {
7+
vpc_id = "${tencentcloud_vpc.vpc.id}"
8+
name = "test-cfs-subnet"
9+
cidr_block = "10.2.11.0/24"
10+
availability_zone = "${var.availability_zone}"
11+
}
12+
13+
resource "tencentcloud_cfs_access_group" "foo" {
14+
name = "test_cfs_access_rule"
15+
}
16+
17+
resource "tencentcloud_cfs_access_rule" "foo" {
18+
access_group_id = "${tencentcloud_cfs_access_group.foo.id}"
19+
auth_client_ip = "10.10.1.0/24"
20+
rw_permission = "RW"
21+
user_permission = "root_squash"
22+
priority = 1
23+
}
24+
25+
resource "tencentcloud_cfs_file_system" "foo" {
26+
name = "test_cfs_file_system"
27+
availability_zone = "${var.availability_zone}"
28+
access_group_id = "${tencentcloud_cfs_access_group.foo.id}"
29+
protocol = "${var.protocol}"
30+
vpc_id = "${tencentcloud_vpc.vpc.id}"
31+
subnet_id = "${tencentcloud_subnet.subnet.id}"
32+
}
33+
34+
data "tencentcloud_cfs_file_systems" "file_systems" {
35+
file_system_id = "${tencentcloud_cfs_file_system.foo.id}"
36+
name = "${tencentcloud_cfs_file_system.foo.name}"
37+
}
38+
39+
data "tencentcloud_cfs_access_rules" "access_rules" {
40+
access_group_id = "${tencentcloud_cfs_access_group.foo.id}"
41+
access_rule_id = "${tencentcloud_cfs_access_rule.foo.id}"
42+
}
43+
44+
data "tencentcloud_cfs_access_groups" "access_groups" {
45+
access_group_id = "${tencentcloud_cfs_access_group.foo.id}"
46+
name = "${tencentcloud_cfs_access_group.foo.name}"
47+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
variable "availability_zone" {
2+
default = "ap-guangzhou-3"
3+
}
4+
5+
variable "protocol" {
6+
default = "NFS"
7+
}

examples/tencentcloud-scf/main.tf

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
resource "tencentcloud_cos_bucket" "foo" {
2+
bucket = "scf-cos1-1258798060"
3+
acl = "public-read"
4+
}
5+
6+
resource "tencentcloud_cos_bucket" "bar" {
7+
bucket = "scf-cos2-1258798060"
8+
acl = "public-read"
9+
}
10+
11+
resource "tencentcloud_cos_bucket_object" "myobject" {
12+
bucket = "${tencentcloud_cos_bucket.foo.bucket}"
13+
key = "/new_object_key.zip"
14+
source = "code.zip"
15+
acl = "public-read"
16+
}
17+
18+
resource "tencentcloud_cam_role" "foo" {
19+
name = "ci-scf-role"
20+
document = "${var.role_document}"
21+
description = "ci-scf-role"
22+
console_login = true
23+
}
24+
25+
resource "tencentcloud_scf_namespace" "foo" {
26+
namespace = "ci-test-scf"
27+
description = "test1"
28+
}
29+
30+
resource "tencentcloud_vpc" "test_vpc" {
31+
name = "Used for testing subnets"
32+
cidr_block = "10.1.0.0/16"
33+
}
34+
35+
resource "tencentcloud_subnet" "test_subnet" {
36+
vpc_id = "${tencentcloud_vpc.test_vpc.id}"
37+
name = "terraform test subnet"
38+
cidr_block = "10.1.1.0/24"
39+
availability_zone = "${var.availability_zone}"
40+
}
41+
42+
resource "tencentcloud_scf_function" "foo" {
43+
name = "ci-test-function"
44+
description = "test"
45+
handler = "main.do_it"
46+
runtime = "Python3.6"
47+
namespace = "${tencentcloud_scf_namespace.foo.id}"
48+
role = "${tencentcloud_cam_role.foo.id}"
49+
vpc_id = "${tencentcloud_vpc.test_vpc.id}"
50+
subnet_id = "${tencentcloud_subnet.test_subnet.id}"
51+
52+
cos_bucket_name = "${tencentcloud_cos_bucket.foo.id}"
53+
cos_object_name = "${tencentcloud_cos_bucket_object.myobject.key}"
54+
cos_bucket_region = "ap-guangzhou"
55+
56+
triggers {
57+
name = "ci-test-fn-api-gw"
58+
type = "timer"
59+
trigger_desc = "*/5 * * * * * *"
60+
}
61+
62+
triggers {
63+
name = "${tencentcloud_cos_bucket.bar.id}"
64+
type = "cos"
65+
trigger_desc = "${var.trigger_desc}"
66+
}
67+
68+
tags = {
69+
"test" = "test"
70+
}
71+
}
72+
73+
data "tencentcloud_scf_functions" "foo" {
74+
name = "${tencentcloud_scf_function.foo.name}"
75+
description = "${tencentcloud_scf_function.foo.description}"
76+
namespace = "${tencentcloud_scf_function.foo.namespace}"
77+
tags = "${tencentcloud_scf_function.foo.tags}"
78+
}
79+
80+
data "tencentcloud_scf_namespaces" "foo" {
81+
namespace = "${tencentcloud_scf_namespace.foo.id}"
82+
description = "${tencentcloud_scf_namespace.foo.description}"
83+
}
84+
85+
data "tencentcloud_scf_logs" "foo" {
86+
function_name = "${tencentcloud_scf_function.foo.name}"
87+
namespace = "${tencentcloud_scf_function.foo.namespace}"
88+
offset = 0
89+
limit = 100
90+
order = "desc"
91+
order_by = "duration"
92+
ret_code = "UserCodeException"
93+
start_time = "2017-05-16 20:00:00"
94+
end_time = "2017-05-17 20:00:00"
95+
}

examples/tencentcloud-scf/variable.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
variable "role_document" {
2+
default = "{\"version\":\"2.0\",\"statement\":[{\"action\":[\"name/sts:AssumeRole\"],\"effect\":\"allow\",\"principal\":{\"qcs\":[\"qcs::cam::uin/100009461222:uin/100009461222\"]}}]}"
3+
}
4+
5+
variable "trigger_desc" {
6+
default = "{\"event\":\"cos:ObjectCreated:Put\",\"filter\":{\"Prefix\":\"\",\"Suffix\":\"\"}}"
7+
}
8+
9+
variable "availability_zone" {
10+
default = "ap-guangzhou-3"
11+
}

examples/tencentcloud-tke/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ resource "tencentcloud_kubernetes_cluster" "managed_cluster" {
3030
}
3131

3232
cluster_deploy_type = "MANAGED_CLUSTER"
33+
34+
tags = {
35+
"test" = "test"
36+
}
3337
}
3438

3539
#examples for INDEPENDENT_CLUSTER cluster

0 commit comments

Comments
 (0)