Reputation: 1
I'm trying to import a bucket into the tfstate that has a dot in its name by using the command:
terraform import aws_s3_bucket.example.com example.com
bucket name is example.com my resource is built like this
resource "aws_s3_bucket" "example.com" {
}
regarding the import I get this error:
Unexpected extra operators after address.
and tried to escape it with \
but didn't work. As for the resource, how can I escape it? since it tells me name should only have numbers digits dash and hyphen ....
Upvotes: 0
Views: 2252
Reputation: 238199
example.com
is an invalid name. You can't have .
in a resource name in TF. You can only use:
letters, digits, underscores, and dashes
Upvotes: 3