Skip to content
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

Limitation on the number of characters in the resource ibm_resource_tag #3703

Closed
lucasberlang opened this issue Apr 1, 2022 · 0 comments · Fixed by #3734
Closed

Limitation on the number of characters in the resource ibm_resource_tag #3703

lucasberlang opened this issue Apr 1, 2022 · 0 comments · Fixed by #3734
Labels
service/Cloud Databases Issues related to Cloud Databases service/Global Tagging Issues related to Global Tagging service/Resource Management Issues related to Resource Manager or Resource controller Issues

Comments

@lucasberlang
Copy link

lucasberlang commented Apr 1, 2022

Terraform CLI and Terraform IBM Provider Version

Terraform v1.0.3
on darwin_amd64
+ provider registry.terraform.io/ibm-cloud/ibm v1.40.0

Error

The ibm_resource_tag resource has a limitation in the resource_id parameter of 128 characters, the problem is that there are some ibm cloud resources that their crn is longer than 128 characters.

resource "ibm_resource_tag" "tag" {
    resource_id = ibm_satellite_location.location.crn
    tags        = var.tag_names
}

To reproduce this error you can run the following template:

resource "ibm_database" "elasticsearch" {
  resource_group_id            = data.ibm_resource_group.resource_group.id
  name                         = "test"
  service                      = "databases-for-elasticsearch"
  plan                         = "standard"
  location                     = "eu-de"
  members_disk_allocation_mb   = 61440
  members_memory_allocation_mb = 43008
  tags                         = ["one:two"]
  whitelist {
    address     = "172.168.1.2/32"
    description = "desc1"
  }
  timeouts {
    create = "120m"
    update = "120m"
    delete = "15m"
  }
}

data "ibm_resource_tag" "current" {
  resource_id = ibm_database.elasticsearch.id
}

resource "ibm_resource_tag" "update" {
  resource_id = ibm_database.elasticsearch.id
  tags        = ["two:three"]
}

The output error:

terraform apply 

ibm_database.elasticsearch: Refreshing state... [id=crn:v1:bluemix:public:databases-for-elasticsearch:eu-de:*/******************:*******************:::]
Error: "resource_id" ("crn:v1:bluemix:public:databases-for-elasticsearch:eu-de:*/******************:*******************::") must contain from 1 to 128 characters
with data.ibm_resource_tag.current,
on main.tf line 59, in data "ibm_resource_tag" "current":
59:   resource_id = ibm_database.elasticsearch.id

Solution

The solution would be to increase the resource_id characters to accept more than 128 characters.

@github-actions github-actions bot added service/Cloud Databases Issues related to Cloud Databases service/Global Tagging Issues related to Global Tagging service/Resource Management Issues related to Resource Manager or Resource controller Issues labels Apr 1, 2022
kavya498 added a commit to kavya498/terraform-provider-ibm that referenced this issue Apr 20, 2022
SunithaGudisagarIBM pushed a commit to ibm-vpc/terraform-provider-ibm that referenced this issue Sep 14, 2022
SunithaGudisagarIBM pushed a commit to ibm-vpc/terraform-provider-ibm that referenced this issue Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/Cloud Databases Issues related to Cloud Databases service/Global Tagging Issues related to Global Tagging service/Resource Management Issues related to Resource Manager or Resource controller Issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant