Skip to content

Add parameter template of VPC #557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Dec 8, 2020
Merged

Conversation

gailwang
Copy link
Contributor

@gailwang gailwang commented Dec 3, 2020


make testacc TESTARGS=" -run=TestAccTencentCloudAddressTemplateGroup_basic_and_update"
==> Checking that code complies with gofmt requirements...
E:/gailwang_terrraform/scripts/gofmtcheck.sh: line 5: /c/Go/bin/gofmt: Argument list too long
TF_ACC=1 go test ./... -v -run=TestAccTencentCloudAddressTemplateGroup_basic_and_update -timeout 120m
?       github.com/tencentcloudstack/terraform-provider-tencentcloud    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/gendoc     (cached) [no tests to run]
=== RUN   TestAccTencentCloudAddressTemplateGroup_basic_and_update
--- PASS: TestAccTencentCloudAddressTemplateGroup_basic_and_update (4.92s)
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud       6.297s
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity  [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper       [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit     [no test files]

make testacc TESTARGS=" -run=TestAccTencentCloudServiceTemplate_basic_and_update"
==> Checking that code complies with gofmt requirements...
E:/gailwang_terrraform/scripts/gofmtcheck.sh: line 5: /c/Go/bin/gofmt: Argument list too long
TF_ACC=1 go test ./... -v -run=TestAccTencentCloudServiceTemplate_basic_and_update -timeout 120m
?       github.com/tencentcloudstack/terraform-provider-tencentcloud    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/gendoc     (cached) [no tests to run]
=== RUN   TestAccTencentCloudServiceTemplate_basic_and_update
--- PASS: TestAccTencentCloudServiceTemplate_basic_and_update (3.61s)
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud       4.951s
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity  [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper       [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit     [no test files]


make testacc TESTARGS=" -run=TestAccTencentCloudServiceTemplateGroup_basic_and_update"
==> Checking that code complies with gofmt requirements...
E:/gailwang_terrraform/scripts/gofmtcheck.sh: line 5: /c/Go/bin/gofmt: Argument list too long
TF_ACC=1 go test ./... -v -run=TestAccTencentCloudServiceTemplateGroup_basic_and_update -timeout 120m
?       github.com/tencentcloudstack/terraform-provider-tencentcloud    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/gendoc     (cached) [no tests to run]
=== RUN   TestAccTencentCloudServiceTemplateGroup_basic_and_update
--- PASS: TestAccTencentCloudServiceTemplateGroup_basic_and_update (5.04s)
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud       6.382s
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity  [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper       [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit     [no test files]


 make testacc TESTARGS=" -run=TestAccTencentCloudDataAddressTemplates"
==> Checking that code complies with gofmt requirements...
E:/gailwang_terrraform/scripts/gofmtcheck.sh: line 5: /c/Go/bin/gofmt: Argument list too long
TF_ACC=1 go test ./... -v -run=TestAccTencentCloudDataAddressTemplates -timeout 120m
?       github.com/tencentcloudstack/terraform-provider-tencentcloud    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/gendoc     (cached) [no tests to run]
=== RUN   TestAccTencentCloudDataAddressTemplates
--- PASS: TestAccTencentCloudDataAddressTemplates (2.49s)
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud       4.063s
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity  [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper       [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit     [no test files]

make testacc TESTARGS=" -run=TestAccTencentCloudDataAddressTemplates"
==> Checking that code complies with gofmt requirements...
E:/gailwang_terrraform/scripts/gofmtcheck.sh: line 5: /c/Go/bin/gofmt: Argument list too long
TF_ACC=1 go test ./... -v -run=TestAccTencentCloudDataAddressTemplates -timeout 120m
?       github.com/tencentcloudstack/terraform-provider-tencentcloud    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/gendoc     (cached) [no tests to run]
=== RUN   TestAccTencentCloudDataAddressTemplates
--- PASS: TestAccTencentCloudDataAddressTemplates (2.49s)
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud       4.063s
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity  [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper       [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit     [no test files]

 make testacc TESTARGS=" -run=TestAccTencentCloudDataServiceTemplates"
==> Checking that code complies with gofmt requirements...
E:/gailwang_terrraform/scripts/gofmtcheck.sh: line 5: /c/Go/bin/gofmt: Argument list too long
TF_ACC=1 go test ./... -v -run=TestAccTencentCloudDataServiceTemplates -timeout 120m
?       github.com/tencentcloudstack/terraform-provider-tencentcloud    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/gendoc     (cached) [no tests to run]
=== RUN   TestAccTencentCloudDataServiceTemplates
--- PASS: TestAccTencentCloudDataServiceTemplates (2.35s)
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud       3.755s
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity  [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper       [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit     [no test files]

make testacc TESTARGS=" -run=TestAccTencentCloudDataServiceTemplateGroups"
==> Checking that code complies with gofmt requirements...
E:/gailwang_terrraform/scripts/gofmtcheck.sh: line 5: /c/Go/bin/gofmt: Argument list too long
TF_ACC=1 go test ./... -v -run=TestAccTencentCloudDataServiceTemplateGroups -timeout 120m
?       github.com/tencentcloudstack/terraform-provider-tencentcloud    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/gendoc     1.091s [no tests to run]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud       1.174s [no tests to run]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity  [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper       [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit     [no test files]

make testacc TESTARGS=" -run=TestAccTencentCloudDataAddressTemplateGroups"
==> Checking that code complies with gofmt requirements...
E:/gailwang_terrraform/scripts/gofmtcheck.sh: line 5: /c/Go/bin/gofmt: Argument list too long
TF_ACC=1 go test ./... -v -run=TestAccTencentCloudDataAddressTemplateGroups -timeout 120m
?       github.com/tencentcloudstack/terraform-provider-tencentcloud    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/gendoc     (cached) [no tests to run]
=== RUN   TestAccTencentCloudDataAddressTemplateGroups
--- PASS: TestAccTencentCloudDataAddressTemplateGroups (3.85s)
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud       5.161s
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity  [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper       [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit     [no test files]


make testacc TESTARGS=" -run=TestAccTencentCloudDataServiceTemplateGroups"
==> Checking that code complies with gofmt requirements...
E:/gailwang_terrraform/scripts/gofmtcheck.sh: line 5: /c/Go/bin/gofmt: Argument list too long
TF_ACC=1 go test ./... -v -run=TestAccTencentCloudDataServiceTemplateGroups -timeout 120m
?       github.com/tencentcloudstack/terraform-provider-tencentcloud    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/gendoc     (cached) [no tests to run]
=== RUN   TestAccTencentCloudDataServiceTemplateGroups
--- PASS: TestAccTencentCloudDataServiceTemplateGroups (3.77s)
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud       4.954s
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity  [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper       [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit     [no test files]

terraform apply
2020/12/03 15:05:20 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
  Use TF_LOG=TRACE to see Terraform's internal logs.
  ----
data.tencentcloud_service_template_groups.example: Refreshing state...
data.tencentcloud_address_template_groups.example: Refreshing state...

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # tencentcloud_address_template.example will be created
  + resource "tencentcloud_address_template" "example" {
      + addresses = [
          + "1.1.1.1",
        ]
      + id        = (known after apply)
      + name      = "example"
    }

  # tencentcloud_address_template_group.example will be created
  + resource "tencentcloud_address_template_group" "example" {
      + id           = (known after apply)
      + name         = "example"
      + template_ids = (known after apply)
    }

  # tencentcloud_service_template.example will be created
  + resource "tencentcloud_service_template" "example" {
      + id       = (known after apply)
      + name     = "example"
      + services = [
          + "udp:all",
        ]
    }

  # tencentcloud_service_template_group.example will be created
  + resource "tencentcloud_service_template_group" "example" {
      + id           = (known after apply)
      + name         = "example"
      + template_ids = (known after apply)
    }

Plan: 4 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

tencentcloud_address_template.example: Creating...
tencentcloud_service_template.example: Creating...
tencentcloud_service_template.example: Creation complete after 1s [id=ppm-nwrggd14]
tencentcloud_address_template.example: Creation complete after 1s [id=ipm-makf7k9e]
tencentcloud_service_template_group.example: Creating...
tencentcloud_address_template_group.example: Creating...
tencentcloud_service_template_group.example: Creation complete after 0s [id=ppmg-0np3u974]
tencentcloud_address_template_group.example: Creation complete after 0s [id=ipmg-p0brtuam]

Apply complete! Resources: 4 added, 0 changed, 0 destroyed.


 terraform apply
2020/12/03 15:16:00 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
  Use TF_LOG=TRACE to see Terraform's internal logs.
  ----
data.tencentcloud_address_template_groups.example: Refreshing state...
data.tencentcloud_service_template_groups.example: Refreshing state...
tencentcloud_address_template.example: Refreshing state... [id=ipm-0vmymtpa]
tencentcloud_service_template.example: Refreshing state... [id=ppm-17wfsghc]
tencentcloud_address_template_group.example: Refreshing state... [id=ipmg-dhvfvgqm]
tencentcloud_service_template_group.example: Refreshing state... [id=ppmg-4yc31oyc]

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.


terraform apply
2020/12/03 15:16:25 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
  Use TF_LOG=TRACE to see Terraform's internal logs.
  ----
data.tencentcloud_address_template_groups.example: Refreshing state...
data.tencentcloud_service_template_groups.example: Refreshing state...
tencentcloud_service_template.example: Refreshing state... [id=ppm-17wfsghc]
tencentcloud_address_template.example: Refreshing state... [id=ipm-0vmymtpa]
tencentcloud_address_template_group.example: Refreshing state... [id=ipmg-dhvfvgqm]
tencentcloud_service_template_group.example: Refreshing state... [id=ppmg-4yc31oyc]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # tencentcloud_address_template.example will be updated in-place
  ~ resource "tencentcloud_address_template" "example" {
      ~ addresses = [
          - "1.1.1.1",
            "10.0.0.0/24",
        ]
        id        = "ipm-0vmymtpa"
        name      = "example"
    }

  # tencentcloud_service_template.example will be updated in-place
  ~ resource "tencentcloud_service_template" "example" {
        id       = "ppm-17wfsghc"
        name     = "example"
      ~ services = [
          - "tcp:90",
            "udp:all",
        ]
    }

Plan: 0 to add, 2 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

tencentcloud_address_template.example: Modifying... [id=ipm-0vmymtpa]
tencentcloud_service_template.example: Modifying... [id=ppm-17wfsghc]
tencentcloud_service_template.example: Modifications complete after 0s [id=ppm-17wfsghc]
tencentcloud_address_template.example: Modifications complete after 1s [id=ipm-0vmymtpa]

Apply complete! Resources: 0 added, 2 changed, 0 destroyed.

terraform destroy
2020/12/03 15:18:17 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
  Use TF_LOG=TRACE to see Terraform's internal logs.
  ----
tencentcloud_address_template.example: Refreshing state... [id=ipm-bvqqlij8]
data.tencentcloud_service_template_groups.example: Refreshing state...
data.tencentcloud_address_template_groups.example: Refreshing state...
tencentcloud_service_template.example: Refreshing state... [id=ppm-1ryl5k3e]
tencentcloud_address_template_group.example: Refreshing state... [id=ipmg-gc8olowq]
tencentcloud_service_template_group.example: Refreshing state... [id=ppmg-6aoslp9a]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # tencentcloud_address_template.example will be destroyed
  - resource "tencentcloud_address_template" "example" {
      - addresses = [
          - "10.0.0.0/24",
        ] -> null
      - id        = "ipm-bvqqlij8" -> null
      - name      = "example" -> null
    }

  # tencentcloud_address_template_group.example will be destroyed
  - resource "tencentcloud_address_template_group" "example" {
      - id           = "ipmg-gc8olowq" -> null
      - name         = "example" -> null
      - template_ids = [
          - "ipm-bvqqlij8",
        ] -> null
    }

  # tencentcloud_service_template.example will be destroyed
  - resource "tencentcloud_service_template" "example" {
      - id       = "ppm-1ryl5k3e" -> null
      - name     = "example" -> null
      - services = [
          - "udp:all",
        ] -> null
    }

  # tencentcloud_service_template_group.example will be destroyed
  - resource "tencentcloud_service_template_group" "example" {
      - id           = "ppmg-6aoslp9a" -> null
      - name         = "example" -> null
      - template_ids = [
          - "ppm-1ryl5k3e",
        ] -> null
    }

Plan: 0 to add, 0 to change, 4 to destroy.

Do you really want to destroy all resources?
  Terraform will destroy all your managed infrastructure, as shown above.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes

tencentcloud_service_template_group.example: Destroying... [id=ppmg-6aoslp9a]
tencentcloud_address_template_group.example: Destroying... [id=ipmg-gc8olowq]
tencentcloud_service_template_group.example: Destruction complete after 1s
tencentcloud_service_template.example: Destroying... [id=ppm-1ryl5k3e]
tencentcloud_address_template_group.example: Destruction complete after 2s
tencentcloud_address_template.example: Destroying... [id=ipm-bvqqlij8]
tencentcloud_service_template.example: Destruction complete after 1s
tencentcloud_address_template.example: Destruction complete after 1s

Destroy complete! Resources: 4 destroyed.

@gailwang
Copy link
Contributor Author

gailwang commented Dec 7, 2020

make testacc TESTARGS=" -run=TestAccTencentCloudSecurityGroupRule"
==> Checking that code complies with gofmt requirements...
E:/gailwang_terrraform/scripts/gofmtcheck.sh: line 5: /c/Go/bin/gofmt: Argument list too long
TF_ACC=1 go test ./... -v -run=TestAccTencentCloudSecurityGroupRule -timeout 120m
?       github.com/tencentcloudstack/terraform-provider-tencentcloud    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/gendoc     (cached) [no tests to run]
=== RUN   TestAccTencentCloudSecurityGroupRule_basic
--- PASS: TestAccTencentCloudSecurityGroupRule_basic (2.67s)
=== RUN   TestAccTencentCloudSecurityGroupRule_ssh
--- PASS: TestAccTencentCloudSecurityGroupRule_ssh (2.37s)
=== RUN   TestAccTencentCloudSecurityGroupRule_egress
--- PASS: TestAccTencentCloudSecurityGroupRule_egress (2.25s)
=== RUN   TestAccTencentCloudSecurityGroupRule_sourcesgid
--- PASS: TestAccTencentCloudSecurityGroupRule_sourcesgid (3.05s)
=== RUN   TestAccTencentCloudSecurityGroupRule_allDrop
--- PASS: TestAccTencentCloudSecurityGroupRule_allDrop (2.16s)
=== RUN   TestAccTencentCloudSecurityGroupRule_addressTemplate
--- PASS: TestAccTencentCloudSecurityGroupRule_addressTemplate (3.96s)
=== RUN   TestAccTencentCloudSecurityGroupRule_protocolTemplate
--- PASS: TestAccTencentCloudSecurityGroupRule_protocolTemplate (4.30s)
PASS

 make testacc TESTARGS=" -run=TestAccTencentCloudDataProtocolTemplate"
==> Checking that code complies with gofmt requirements...
E:/gailwang_terrraform/scripts/gofmtcheck.sh: line 5: /c/Go/bin/gofmt: Argument list too long
TF_ACC=1 go test ./... -v -run=TestAccTencentCloudDataProtocolTemplate -timeout 120m
?       github.com/tencentcloudstack/terraform-provider-tencentcloud    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/gendoc     (cached) [no tests to run]
=== RUN   TestAccTencentCloudDataProtocolTemplateGroups
--- PASS: TestAccTencentCloudDataProtocolTemplateGroups (4.03s)
=== RUN   TestAccTencentCloudDataProtocolTemplates
--- PASS: TestAccTencentCloudDataProtocolTemplates (2.03s)
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud       7.403s
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity  [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper       [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit     [no test files]

@gailwang
Copy link
Contributor Author

gailwang commented Dec 7, 2020

terraform apply

terraform apply
2020/12/07 19:27:06 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
  Use TF_LOG=TRACE to see Terraform's internal logs.
  ----
tencentcloud_security_group.foo: Refreshing state... [id=sg-6l84uld5]
tencentcloud_protocol_template.templateB: Refreshing state... [id=ppm-iqt4ksyi]
tencentcloud_protocol_template_group.group: Refreshing state... [id=ppmg-bmdguwfw]
tencentcloud_security_group_rule.protocol_template_group: Refreshing state... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJpbmdyZXNzIiwiY2lkcl9pcCI6IjAuMC4wLjAvMCIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsInByb3RvY29sX3RlbXBsYXRlX2lkIjoiIiwicHJvdG9jb2xfdGVtcGxhdGVfZ3JvdXBfaWQiOiJwcG1nLWJtZGd1d2Z3In0=]
tencentcloud_security_group_rule.protocol_template: Refreshing state... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJJTkdSRVNTIiwiY2lkcl9pcCI6IjAuMC4wLjAvMCIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsInByb3RvY29sX3RlbXBsYXRlX2lkIjoicHBtLWlxdDRrc3lpIiwicHJvdG9jb2xfdGVtcGxhdGVfZ3JvdXBfaWQiOiIifQ==]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # tencentcloud_address_template.templateB will be created
  + resource "tencentcloud_address_template" "templateB" {
      + addresses = [
          + "1.1.1.0-1.1.1.1",
          + "1.1.1.1/24",
        ]
      + id        = (known after apply)
      + name      = "testB"
    }

  # tencentcloud_address_template_group.group will be created
  + resource "tencentcloud_address_template_group" "group" {
      + id           = (known after apply)
      + name         = "test_update"
      + template_ids = (known after apply)
    }

  # tencentcloud_security_group_rule.address_template will be created
  + resource "tencentcloud_security_group_rule" "address_template" {
      + description       = (known after apply)
      + id                = (known after apply)
      + ip_protocol       = (known after apply)
      + policy            = "DROP"
      + port_range        = (known after apply)
      + security_group_id = "sg-6l84uld5"
      + source_sgid       = (known after apply)
      + type              = "INGRESS"

      + address_template {
          + template_id = (known after apply)
        }

      + protocol_template {
          + group_id    = (known after apply)
          + template_id = (known after apply)
        }
    }

  # tencentcloud_security_group_rule.address_template_group will be created
  + resource "tencentcloud_security_group_rule" "address_template_group" {
      + description       = (known after apply)
      + id                = (known after apply)
      + ip_protocol       = (known after apply)
      + policy            = "DROP"
      + port_range        = (known after apply)
      + security_group_id = "sg-6l84uld5"
      + source_sgid       = (known after apply)
      + type              = "ingress"

      + address_template {
          + group_id = (known after apply)
        }

      + protocol_template {
          + group_id    = (known after apply)
          + template_id = (known after apply)
        }
    }

Plan: 4 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

tencentcloud_address_template.templateB: Creating...
tencentcloud_address_template.templateB: Creation complete after 1s [id=ipm-27p5xxzw]
tencentcloud_address_template_group.group: Creating...
tencentcloud_security_group_rule.address_template: Creating...
tencentcloud_address_template_group.group: Creation complete after 0s [id=ipmg-li7cjc1m]
tencentcloud_security_group_rule.address_template_group: Creating...
tencentcloud_security_group_rule.address_template: Creation complete after 0s [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJJTkdSRVNTIiwiY2lkcl9pcCI6IiIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsImFkZHJlc3NfdGVtcGxhdGVfaWQiOiJpcG0tMjdwNXh4enciLCJhZGRyZXNzX3RlbXBsYXRlX2dyb3VwX2lkIjoiIn0=]
tencentcloud_security_group_rule.address_template_group: Creation complete after 0s [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJpbmdyZXNzIiwiY2lkcl9pcCI6IiIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsImFkZHJlc3NfdGVtcGxhdGVfaWQiOiIiLCJhZGRyZXNzX3RlbXBsYXRlX2dyb3VwX2lkIjoiaXBtZy1saTdjamMxbSJ9]

Apply complete! Resources: 4 added, 0 changed, 0 destroyed.

double apply

 terraform apply
2020/12/07 19:27:12 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
  Use TF_LOG=TRACE to see Terraform's internal logs.
  ----
tencentcloud_address_template.templateB: Refreshing state... [id=ipm-27p5xxzw]
tencentcloud_protocol_template.templateB: Refreshing state... [id=ppm-iqt4ksyi]
tencentcloud_security_group.foo: Refreshing state... [id=sg-6l84uld5]
tencentcloud_address_template_group.group: Refreshing state... [id=ipmg-li7cjc1m]
tencentcloud_protocol_template_group.group: Refreshing state... [id=ppmg-bmdguwfw]
tencentcloud_security_group_rule.address_template_group: Refreshing state... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJpbmdyZXNzIiwiY2lkcl9pcCI6IiIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsImFkZHJlc3NfdGVtcGxhdGVfaWQiOiIiLCJhZGRyZXNzX3RlbXBsYXRlX2dyb3VwX2lkIjoiaXBtZy1saTdjamMxbSJ9]
tencentcloud_security_group_rule.protocol_template_group: Refreshing state... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJpbmdyZXNzIiwiY2lkcl9pcCI6IjAuMC4wLjAvMCIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsInByb3RvY29sX3RlbXBsYXRlX2lkIjoiIiwicHJvdG9jb2xfdGVtcGxhdGVfZ3JvdXBfaWQiOiJwcG1nLWJtZGd1d2Z3In0=]
tencentcloud_security_group_rule.address_template: Refreshing state... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJJTkdSRVNTIiwiY2lkcl9pcCI6IiIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsImFkZHJlc3NfdGVtcGxhdGVfaWQiOiJpcG0tMjdwNXh4enciLCJhZGRyZXNzX3RlbXBsYXRlX2dyb3VwX2lkIjoiIn0=]
tencentcloud_security_group_rule.protocol_template: Refreshing state... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJJTkdSRVNTIiwiY2lkcl9pcCI6IjAuMC4wLjAvMCIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsInByb3RvY29sX3RlbXBsYXRlX2lkIjoicHBtLWlxdDRrc3lpIiwicHJvdG9jb2xfdGVtcGxhdGVfZ3JvdXBfaWQiOiIifQ==]

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

destroy

terraform destroy
2020/12/07 19:27:27 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
  Use TF_LOG=TRACE to see Terraform's internal logs.
  ----
tencentcloud_protocol_template.templateB: Refreshing state... [id=ppm-iqt4ksyi]
tencentcloud_security_group.foo: Refreshing state... [id=sg-6l84uld5]
tencentcloud_address_template.templateB: Refreshing state... [id=ipm-27p5xxzw]
tencentcloud_protocol_template_group.group: Refreshing state... [id=ppmg-bmdguwfw]
tencentcloud_address_template_group.group: Refreshing state... [id=ipmg-li7cjc1m]
tencentcloud_security_group_rule.address_template: Refreshing state... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJJTkdSRVNTIiwiY2lkcl9pcCI6IiIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsImFkZHJlc3NfdGVtcGxhdGVfaWQiOiJpcG0tMjdwNXh4enciLCJhZGRyZXNzX3RlbXBsYXRlX2dyb3VwX2lkIjoiIn0=]
tencentcloud_security_group_rule.protocol_template_group: Refreshing state... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJpbmdyZXNzIiwiY2lkcl9pcCI6IjAuMC4wLjAvMCIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsInByb3RvY29sX3RlbXBsYXRlX2lkIjoiIiwicHJvdG9jb2xfdGVtcGxhdGVfZ3JvdXBfaWQiOiJwcG1nLWJtZGd1d2Z3In0=]
tencentcloud_security_group_rule.protocol_template: Refreshing state... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJJTkdSRVNTIiwiY2lkcl9pcCI6IjAuMC4wLjAvMCIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsInByb3RvY29sX3RlbXBsYXRlX2lkIjoicHBtLWlxdDRrc3lpIiwicHJvdG9jb2xfdGVtcGxhdGVfZ3JvdXBfaWQiOiIifQ==]
tencentcloud_security_group_rule.address_template_group: Refreshing state... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJpbmdyZXNzIiwiY2lkcl9pcCI6IiIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsImFkZHJlc3NfdGVtcGxhdGVfaWQiOiIiLCJhZGRyZXNzX3RlbXBsYXRlX2dyb3VwX2lkIjoiaXBtZy1saTdjamMxbSJ9]

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # tencentcloud_address_template.templateB will be destroyed
  - resource "tencentcloud_address_template" "templateB" {
      - addresses = [
          - "1.1.1.0-1.1.1.1",
          - "1.1.1.1/24",
        ] -> null
      - id        = "ipm-27p5xxzw" -> null
      - name      = "testB" -> null
    }

  # tencentcloud_address_template_group.group will be destroyed
  - resource "tencentcloud_address_template_group" "group" {
      - id           = "ipmg-li7cjc1m" -> null
      - name         = "test_update" -> null
      - template_ids = [
          - "ipm-27p5xxzw",
        ] -> null
    }

  # tencentcloud_protocol_template.templateB will be destroyed
  - resource "tencentcloud_protocol_template" "templateB" {
      - id        = "ppm-iqt4ksyi" -> null
      - name      = "testB" -> null
      - protocols = [
          - "tcp:80",
          - "udp:90,111",
        ] -> null
    }

  # tencentcloud_protocol_template_group.group will be destroyed
  - resource "tencentcloud_protocol_template_group" "group" {
      - id           = "ppmg-bmdguwfw" -> null
      - name         = "test_update" -> null
      - template_ids = [
          - "ppm-iqt4ksyi",
        ] -> null
    }

  # tencentcloud_security_group.foo will be destroyed
  - resource "tencentcloud_security_group" "foo" {
      - description = "ci-temp-test-sg" -> null
      - id          = "sg-6l84uld5" -> null
      - name        = "ci-temp-test-sg" -> null
      - project_id  = 0 -> null
      - tags        = {} -> null
    }

  # tencentcloud_security_group_rule.address_template will be destroyed
  - resource "tencentcloud_security_group_rule" "address_template" {
      - id                = "eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJJTkdSRVNTIiwiY2lkcl9pcCI6IiIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsImFkZHJlc3NfdGVtcGxhdGVfaWQiOiJpcG0tMjdwNXh4enciLCJhZGRyZXNzX3RlbXBsYXRlX2dyb3VwX2lkIjoiIn0=" -> null
      - ip_protocol       = "ALL" -> null
      - policy            = "DROP" -> null
      - port_range        = "ALL" -> null
      - security_group_id = "sg-6l84uld5" -> null
      - type              = "INGRESS" -> null

      - address_template {
          - template_id = "ipm-27p5xxzw" -> null
        }
    }

  # tencentcloud_security_group_rule.address_template_group will be destroyed
  - resource "tencentcloud_security_group_rule" "address_template_group" {
      - id                = "eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJpbmdyZXNzIiwiY2lkcl9pcCI6IiIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsImFkZHJlc3NfdGVtcGxhdGVfaWQiOiIiLCJhZGRyZXNzX3RlbXBsYXRlX2dyb3VwX2lkIjoiaXBtZy1saTdjamMxbSJ9" -> null
      - ip_protocol       = "ALL" -> null
      - policy            = "DROP" -> null
      - port_range        = "ALL" -> null
      - security_group_id = "sg-6l84uld5" -> null
      - type              = "ingress" -> null

      - address_template {
          - group_id = "ipmg-li7cjc1m" -> null
        }
    }

  # tencentcloud_security_group_rule.protocol_template will be destroyed
  - resource "tencentcloud_security_group_rule" "protocol_template" {
      - cidr_ip           = "0.0.0.0/0" -> null
      - id                = "eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJJTkdSRVNTIiwiY2lkcl9pcCI6IjAuMC4wLjAvMCIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsInByb3RvY29sX3RlbXBsYXRlX2lkIjoicHBtLWlxdDRrc3lpIiwicHJvdG9jb2xfdGVtcGxhdGVfZ3JvdXBfaWQiOiIifQ==" -> null
      - policy            = "DROP" -> null
      - security_group_id = "sg-6l84uld5" -> null
      - type              = "INGRESS" -> null

      - protocol_template {
          - template_id = "ppm-iqt4ksyi" -> null
        }
    }

  # tencentcloud_security_group_rule.protocol_template_group will be destroyed
  - resource "tencentcloud_security_group_rule" "protocol_template_group" {
      - cidr_ip           = "0.0.0.0/0" -> null
      - id                = "eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJpbmdyZXNzIiwiY2lkcl9pcCI6IjAuMC4wLjAvMCIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsInByb3RvY29sX3RlbXBsYXRlX2lkIjoiIiwicHJvdG9jb2xfdGVtcGxhdGVfZ3JvdXBfaWQiOiJwcG1nLWJtZGd1d2Z3In0=" -> null
      - policy            = "DROP" -> null
      - security_group_id = "sg-6l84uld5" -> null
      - type              = "ingress" -> null

      - protocol_template {
          - group_id = "ppmg-bmdguwfw" -> null
        }
    }

Plan: 0 to add, 0 to change, 9 to destroy.

Do you really want to destroy all resources?
  Terraform will destroy all your managed infrastructure, as shown above.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes

tencentcloud_security_group_rule.protocol_template_group: Destroying... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJpbmdyZXNzIiwiY2lkcl9pcCI6IjAuMC4wLjAvMCIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsInByb3RvY29sX3RlbXBsYXRlX2lkIjoiIiwicHJvdG9jb2xfdGVtcGxhdGVfZ3JvdXBfaWQiOiJwcG1nLWJtZGd1d2Z3In0=]
tencentcloud_security_group_rule.protocol_template: Destroying... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJJTkdSRVNTIiwiY2lkcl9pcCI6IjAuMC4wLjAvMCIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsInByb3RvY29sX3RlbXBsYXRlX2lkIjoicHBtLWlxdDRrc3lpIiwicHJvdG9jb2xfdGVtcGxhdGVfZ3JvdXBfaWQiOiIifQ==]
tencentcloud_security_group_rule.address_template: Destroying... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJJTkdSRVNTIiwiY2lkcl9pcCI6IiIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsImFkZHJlc3NfdGVtcGxhdGVfaWQiOiJpcG0tMjdwNXh4enciLCJhZGRyZXNzX3RlbXBsYXRlX2dyb3VwX2lkIjoiIn0=]
tencentcloud_security_group_rule.address_template_group: Destroying... [id=eyJzZ19pZCI6InNnLTZsODR1bGQ1IiwicG9saWN5X3R5cGUiOiJpbmdyZXNzIiwiY2lkcl9pcCI6IiIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiIsImFkZHJlc3NfdGVtcGxhdGVfaWQiOiIiLCJhZGRyZXNzX3RlbXBsYXRlX2dyb3VwX2lkIjoiaXBtZy1saTdjamMxbSJ9]
tencentcloud_security_group_rule.address_template: Destruction complete after 0s
tencentcloud_security_group_rule.address_template_group: Destruction complete after 0s
tencentcloud_security_group_rule.protocol_template: Destruction complete after 0s
tencentcloud_security_group_rule.protocol_template_group: Destruction complete after 0s
tencentcloud_address_template_group.group: Destroying... [id=ipmg-li7cjc1m]
tencentcloud_protocol_template_group.group: Destroying... [id=ppmg-bmdguwfw]
tencentcloud_security_group.foo: Destroying... [id=sg-6l84uld5]
tencentcloud_security_group.foo: Destruction complete after 1s
tencentcloud_address_template_group.group: Destruction complete after 1s
tencentcloud_address_template.templateB: Destroying... [id=ipm-27p5xxzw]
tencentcloud_protocol_template_group.group: Destruction complete after 2s
tencentcloud_protocol_template.templateB: Destroying... [id=ppm-iqt4ksyi]
tencentcloud_address_template.templateB: Destruction complete after 2s
tencentcloud_protocol_template.templateB: Destruction complete after 1s

Destroy complete! Resources: 9 destroyed.

old version state in new version provider

apply

terraform apply
2020/12/07 19:34:16 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
  Use TF_LOG=TRACE to see Terraform's internal logs.
  ----
tencentcloud_security_group.foo: Refreshing state... [id=sg-r8d86gxb]
tencentcloud_security_group_rule.egress-drop: Refreshing state... [id=eyJzZ19pZCI6InNnLXI4ZDg2Z3hiIiwicG9saWN5X3R5cGUiOiJpbmdyZXNzIiwiY2lkcl9pcCI6IjAuMC4wLjAvMCIsInByb3RvY29sIjoiQUxMIiwicG9ydF9yYW5nZSI6IkFMTCIsImFjdGlvbiI6IkRST1AiLCJzb3VyY2Vfc2dfaWQiOiIiLCJkZXNjcmlwdGlvbiI6IiJ9]

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

@oliverpei oliverpei merged commit 602b127 into tencentcloudstack:master Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants