resource aws_acm_certificate "thekey" {
//this will be imported
}
output key {
value = aws_acm_certifiicate.thekey
}
Error: Invalid combination of arguments
│
│ with aws_acm_certificate.thekey,
│ on acm.tf line 1, in resource "aws_acm_certificate" "thekey":
│ 1: resource "aws_acm_certificate" "thekey" {
│
│ "domain_name": one of `domain_name,private_key` must be specified
As far as I can tell from the error message, this problem is not really related to import, and instead it’s caused by your resource configuration being incomplete.
You will need to write a valid configuration for this resource, and then use the import mechanism to tell Terraform that it should apply that configuration to an existing object rather than using it to create a new object.
Once the configuration for this resource is valid, Terraform will be able to derive output values from it regardless of whether it’s deriving from a new object or from an imported object.