Git Product home page Git Product logo

Comments (2)

ausmartway avatar ausmartway commented on June 6, 2024
Terraform version:
Terraform v0.12.6
+ provider.tencentcloud v1.16.0

Affected Resource:
tencentcloud_cvm

config files:
resource "tencentcloud_instance" "test" {
    allocate_public_ip         = true
    availability_zone          = "ap-shanghai-2"
    image_id                   = "img-pi0ii46r"
    instance_name              = "Unnamed"
    instance_type              = "S4.SMALL2"
    internet_max_bandwidth_out = 1
    private_ip                 = "172.17.0.16"
    security_groups            = [
        "sg-85ei5m7e",
    ]
    subnet_id                  = "subnet-bq3v2fsr"
    system_disk_size           = 50
    system_disk_type           = "CLOUD_PREMIUM"
    vpc_id                     = "vpc-khdn2ary"
    tags = {
      projectname="test-project"
      ownername="yulei"
}
}

Expected behaviour:

tencent-cloud terraform apply

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_instance.test will be created
  + resource "tencentcloud_instance" "test" {
      + allocate_public_ip         = true
      + availability_zone          = "ap-shanghai-2"
      + id                         = (known after apply)
      + image_id                   = "img-pi0ii46r"
      + instance_name              = "Unnamed"
      + instance_status            = (known after apply)
      + instance_type              = "S4.SMALL2"
      + internet_max_bandwidth_out = 1
      + key_name                   = (known after apply)
      + private_ip                 = "172.17.0.16"
      + public_ip                  = (known after apply)
      + security_groups            = [
          + "sg-85ei5m7e",
        ]
      + subnet_id                  = "subnet-bq3v2fsr"
      + system_disk_size           = 50
      + system_disk_type           = "CLOUD_PREMIUM"
      + tags                       = {
          + "ownername"   = "yulei"
          + "projectname" = "test-project"
        }
      + vpc_id                     = "vpc-khdn2ary"

      + data_disks {
          + data_disk_size       = (known after apply)
          + data_disk_type       = (known after apply)
          + delete_with_instance = (known after apply)
        }
    }

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

Actual Behavior:
➜  tencent-cloud terraform apply

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_instance.test will be created
  + resource "tencentcloud_instance" "test" {
      + allocate_public_ip         = true
      + availability_zone          = "ap-shanghai-2"
      + id                         = (known after apply)
      + image_id                   = "img-pi0ii46r"
      + instance_name              = "Unnamed"
      + instance_status            = (known after apply)
      + instance_type              = "S4.SMALL2"
      + internet_max_bandwidth_out = 1
      + key_name                   = (known after apply)
      + private_ip                 = "172.17.0.16"
      + public_ip                  = (known after apply)
      + security_groups            = [
          + "sg-85ei5m7e",
        ]
      + subnet_id                  = "subnet-bq3v2fsr"
      + system_disk_size           = 50
      + system_disk_type           = "CLOUD_PREMIUM"
      + tags                       = {
          + "ownername"   = "yulei"
          + "projectname" = "test-project"
        }
      + vpc_id                     = "vpc-khdn2ary"

      + data_disks {
          + data_disk_size       = (known after apply)
          + data_disk_type       = (known after apply)
          + delete_with_instance = (known after apply)
        }
    }

Plan: 1 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_instance.test: Creating...

Error: tencentcloud_instance got error, code:InvalidTagKey.Reserved, message:The specified tagKey is Reserved., request id:013ec71c-233a-4ae9-8c0b-2399b04f361a

  on tencentcloud.tf line 2, in resource "tencentcloud_instance" "test":
   2: resource "tencentcloud_instance" "test" {


from terraform-provider-tencentcloud.

likexian avatar likexian commented on June 6, 2024

Hello,
Tag key starting with project is system reserved.

Limits on Tag Keys

A tag key starting with "qcs:" or "project" is a system reserved tag key and cannot be created.

refer: https://intl.cloud.tencent.com/document/product/651/13354

from terraform-provider-tencentcloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.