# Missing required argument in module but definition was not found

**URL:** <https://discuss.hashicorp.com/t/missing-required-argument-in-module-but-definition-was-not-found/39091>\
**Category:** AWS\
**Created:** [May 5, 2022, 12:05am UTC](https://discuss.hashicorp.com/t/missing-required-argument-in-module-but-definition-was-not-found/39091 "2022-05-05T00:05:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CJ-Llanes](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/cj-llanes/32/27681_2.png) [@CJ-Llanes](https://discuss.hashicorp.com/u/CJ-Llanes)\
**Post date:** [May 5, 2022, 12:05am UTC](https://discuss.hashicorp.com/t/missing-required-argument-in-module-but-definition-was-not-found/39091/1 "2022-05-05T00:05:38Z")

</div>

Hi, i’m getting problems with the DMS service  
At the moment of make the terraform plan i get this message:  
“│ The argument “replication\_instance\_arn” is required, but no definition was found.”

The problem comes from the resource “aws\_dms\_replication\_task”, in the argument -replication\_instance\_arn  
How ever that argument i get it with this  
replication\_instance\_arn = aws\_dms\_replication\_instance.replication\_instance.replication\_instance\_arn

and the resource aws\_dms\_replication\_instance is in the same main.tf, i even used direct dependency in the recource “aws\_dms\_replication\_task” of aws\_dms\_replication\_instance.replication\_instance to be sure that this is executed first.

---

<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:** [May 5, 2022, 1:44pm UTC](https://discuss.hashicorp.com/t/missing-required-argument-in-module-but-definition-was-not-found/39091/2 "2022-05-05T13:44:38Z")

</div>

Hi @CJ-Llanes,

For the purposes of determining whether a resource argument is set or not, Terraform considers assigning `null` to be exactly equivalent to not assigning the argument at all.

I’m not familiar with the exact resource types you are using here so I can’t see whether this is the cause, but is it possible that the attribute you are assigning to this argument might be `null` in this particular case?
