# Output and resource import

**URL:** <https://discuss.hashicorp.com/t/output-and-resource-import/61608>\
**Category:** Terraform\
**Created:** [January 11, 2024, 3:35am UTC](https://discuss.hashicorp.com/t/output-and-resource-import/61608 "2024-01-11T03:35:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AZZ](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/azz/32/17585_2.png) [@AZZ](https://discuss.hashicorp.com/u/AZZ)\
**Post date:** [January 11, 2024, 3:35am UTC](https://discuss.hashicorp.com/t/output-and-resource-import/61608/1 "2024-01-11T03:35:57Z")

</div>

Hello,  
is there a way to make imported resource available in output?

Example:

```auto
resource aws_acm_certificate "thekey" {
//this will be imported
}

```

> terraform import aws\_acm\_certificate.thekey \<arn\_here\>

Adding the “output” to the tf file:

```auto
resource aws_acm_certificate "thekey" {
//this will be imported
}

output key {
value = aws_acm_certifiicate.thekey
}

```

```auto
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

```

Similar question : [Terraform output does not outputs imported resources](https://discuss.hashicorp.com/t/terraform-output-does-not-outputs-imported-resources/37841)

Thank you.  
AZ

---

<div class="post-metadata">

**Author:** ![apparentlymart](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/apparentlymart/32/702_2.png) [@apparentlymart](https://discuss.hashicorp.com/u/apparentlymart)\
**Post date:** [January 11, 2024, 4:29pm UTC](https://discuss.hashicorp.com/t/output-and-resource-import/61608/2 "2024-01-11T16:29:04Z")

</div>

Hi @AZZ,

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.

---

<div class="post-metadata">

**Author:** ![AZZ](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/azz/32/17585_2.png) [@AZZ](https://discuss.hashicorp.com/u/AZZ)\
**Post date:** [January 11, 2024, 5:31pm UTC](https://discuss.hashicorp.com/t/output-and-resource-import/61608/3 "2024-01-11T17:31:30Z")

</div>

Today is a beautiful and sunny. As such, I re-examined my approach and … well … I was over complicating things.

A better solution is to simply refer to the aws resource using “data”.

@apparentlymart, thank you for your review and the answer. As usual - you are correct 🙂
