Skip to content

Commit f4902f4

Browse files
add moved block to readme (#31)
1 parent 3e40a2d commit f4902f4

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,18 @@ module "lambda-datadog" {
120120

121121
### Lambda Function
122122

123-
Arguments available in the [aws_lambda_function](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function) resource are available in this Terraform module. Lambda functions created from container images are not supported by this module.
124-
125-
Arguments defined as blocks in the `aws_lambda_function` resource are redefined as variables with their nested arguments.
123+
- Arguments available in the [aws_lambda_function](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function) resource are available in this Terraform module. Lambda functions created from container images are not supported by this module.
124+
- To prevent Terraform from re-creating the resource, add a `moved` block as shown below:
125+
126+
```tf
127+
moved {
128+
from = aws_lambda_function.{your_lambda_function}
129+
to = module.{your_lambda_function}.aws_lambda_function.this
130+
}
131+
```
126132

127-
For example, in `aws_lambda_function`, `environment` is defined as a block with a `variables` argument. In this Terraform module, the value for the `environment_variables` is passed to the `environment.variables` argument in `aws_lambda_function`. See [variables.tf](variables.tf) for a complete list of variables in this module.
133+
- Arguments defined as blocks in the `aws_lambda_function` resource are redefined as variables with their nested arguments.
134+
* For example, in `aws_lambda_function`, `environment` is defined as a block with a `variables` argument. In this Terraform module, the value for the `environment_variables` is passed to the `environment.variables` argument in `aws_lambda_function`. See [variables.tf](variables.tf) for a complete list of variables in this module.
128135

129136
#### aws_lambda_function resource
130137
```

0 commit comments

Comments
 (0)