# Creating AWS Route 53 dns record using terraform module

**URL:** <https://discuss.hashicorp.com/t/creating-aws-route-53-dns-record-using-terraform-module/36202>\
**Category:** AWS\
**Created:** [February 24, 2022, 2:52pm UTC](https://discuss.hashicorp.com/t/creating-aws-route-53-dns-record-using-terraform-module/36202 "2022-02-24T14:52:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![syed.europa](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/syed.europa/32/24206_2.png) [@syed.europa](https://discuss.hashicorp.com/u/syed.europa)\
**Post date:** [February 24, 2022, 2:52pm UTC](https://discuss.hashicorp.com/t/creating-aws-route-53-dns-record-using-terraform-module/36202/1 "2022-02-24T14:52:30Z")

</div>

Hi Community out there,  
I am newbie to Terraform, trying to create dns record but struggling how to set IAM AccountID, IAM user name and password.

Basically created three files name as : hostedzone.tf, route53-record.tf, vars.tf  
hostedzone.tf

```auto
resource "aws_route53_zone" "dns-record" {
  name = var.dns-record
  comment = "${var.dns-record} public zone"
  provider = aws
}

```

route53-record.tf

```auto
resource "aws_route53_record" "dns-record" {
  zone_id = 
  name = ""
  type = "A"
  ttl = "300"
  records = [""]
}

```

vars.tf

```auto
variable "AWS_REGION" {
  default = ""
}

variable "dns-record" {
  default = ""
}

```

Thanks !
