It would have helped if you had shared your main.tf.
main.tf
One way to do this is as shown in the screenshot.