Open dindurthy opened 1 year ago
I just hit this issue, but it isn't specifically around importing. I'm getting it when using the sumologic_collector
data source.
data "sumologic_collector" "rds" {
name = "AWS/RDS"
}
│ Error: collector with name AWS/RDS not found: collector with name 'AWS/RDS' does not exist │ │ with data.sumologic_collector.rds, │ on sumologic.tf line 9, in data "sumologic_collector" "rds": │ 9: data "sumologic_collector" "rds" {
If I rename it to AWS RDS
, it works fine.
Version 2.28.2
of the sumologic provider.
Steps to reproduce:
/
in the name, e.g.env/collector
provider "sumologic" { access_id = "redacted" access_key = "redacted" environment = "us2" }
terraform { required_providers { sumologic = { source = "sumologic/sumologic" } } required_version = ">= 0.13" }
dharmarajindurthy@Dharmarajs-Laptop tf-sumo-collector % terraform import sumologic_collector.collector "env/collector" sumologic_collector.collector: Importing from ID "env/collector"... sumologic_collector.collector: Import prepared! Prepared sumologic_collector for import sumologic_collector.collector: Refreshing state... [id=env/collector] ╷ │ Error: collector with name 'env/collector' does not exist │ │ ╵
% terraform apply
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
Terraform will perform the following actions:
sumologic_collector.collector will be created
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
sumologic_collector.collector: Creating... ╷ │ Error: { │ "status" : 400, │ "id" : "2QKP5-6OPWX-6OBCI", │ "code" : "collectors.validation.name.duplicate", │ "message" : "A resource with the same name already exists." │ } │ │ with sumologic_collector.collector, │ on main.tf line 1, in resource "sumologic_collector" "collector": │ 1: resource "sumologic_collector" "collector" { │ ╵