Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Apr 6, 2023
1 parent 97a5c29 commit 7824657
Show file tree
Hide file tree
Showing 10 changed files with 247 additions and 5 deletions.
49 changes: 49 additions & 0 deletions a/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,55 @@ module "dms_replication_dns" {
}
```

## Using DHCP options data resource

data "aws\_vpc\_dhcp\_options" "options" {
filter {
name = "vpc-id"
values = [local.vpc\_id]
}
}

```hcl
module "dms_replication_dns" {
source = "git@github.e.it.census.gov:terraform-modules/aws-dns//host"
name = format("%v.%v", aws_dms_replication_instance.dev.replication_instance_id, data.aws_vpc_dhc_options.options.domain_name)
values = aws_dms_replication_instance.dev.replication_instance_private_ips
}
```

## Using a Zone defined in another account
This requires the role `r-inf-terraform-route53` be created from the Terraform module `aws-vpc-setup/route53-association/terraform-role`
(generally in `common/apps/route53`. It then uses an STS AssumeRole from Terraform. You must have the approriate permissions
on the source account to assume this role.

file: provider.route53.east\_ma13\_gov.tf
```hcl
provider "aws" {
alias = "east_ma13_gov"
region = var.region_map["east"]
assume_role {
role_arn = format("arn:%v:iam::%v:role/r-inf-terraform-route53", data.aws_arn.current.partition, "187944776148")
session_name = var.os_username
}
}
```

file: dns.tf
```hcl
module "db_cname" {
providers = {
aws = aws.east_ma13_gov
}
source = "git@github.e.it.census.gov:terraform-modules/aws-dns//cname"
zone = var.vpc_domain_name
name = local.app_db_dns_name
values = [module.db.db_instance_address]
}
```

## Requirements

| Name | Version |
Expand Down
2 changes: 1 addition & 1 deletion a/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* }
* ```
*
# ## Using DHCP options data resource
* ## Using DHCP options data resource
*
* data "aws_vpc_dhcp_options" "options" {
* filter {
Expand Down
49 changes: 49 additions & 0 deletions aaaa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,55 @@ module "dms_replication_dns" {
}
```

## Using DHCP options data resource

```hcl
data "aws_vpc_dhcp_options" "options" {
filter {
name = "vpc-id"
values = [local.vpc_id]
}
}
module "dms_replication_dns" {
source = "git@github.e.it.census.gov:terraform-modules/aws-dns//aaaa"
name = format("%v.%v", aws_dms_replication_instance.dev.replication_instance_id, data.aws_vpc_dhc_options.options.domain_name)
values = aws_dms_replication_instance.dev.replication_instance_private_ips
}
```

## Using a Zone defined in another account
This requires the role `r-inf-terraform-route53` be created from the Terraform module `aws-vpc-setup/route53-association/terraform-role`
(generally in `common/apps/route53`. It then uses an STS AssumeRole from Terraform. You must have the approriate permissions
on the source account to assume this role.

file: provider.route53.east\_ma13\_gov.tf
```hcl
provider "aws" {
alias = "east_ma13_gov"
region = var.region_map["east"]
assume_role {
role_arn = format("arn:%v:iam::%v:role/r-inf-terraform-route53", data.aws_arn.current.partition, "187944776148")
session_name = var.os_username
}
}
```

file: dns.tf
```hcl
module "db_cname" {
providers = {
aws = aws.east_ma13_gov
}
source = "git@github.e.it.census.gov:terraform-modules/aws-dns//cname"
zone = var.vpc_domain_name
name = local.app_db_dns_name
values = [module.db.db_instance_address]
}
```

## Requirements

| Name | Version |
Expand Down
2 changes: 1 addition & 1 deletion aaaa/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* }
* ```
*
# ## Using DHCP options data resource
* ## Using DHCP options data resource
*
* ```hcl
* data "aws_vpc_dhcp_options" "options" {
Expand Down
47 changes: 47 additions & 0 deletions cname/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,53 @@ module "lakefront_cname" {
}
```

## Using DHCP options data resource

data "aws\_vpc\_dhcp\_options" "options" {
filter {
name = "vpc-id"
values = [local.vpc\_id]
}
}

module "stat\_cname"
{
source  = "git@github.e.it.census.gov:terraform-modules/aws-dns//cname"
name    = format("%v.%v","stat",data.aws\_vpc\_dhc\_options.options.domain\_name)
values  = aws\_lb.adsd\_dapps\_dev\_stat\_lb.dns\_name
}
```
## Using a Zone defined in another account
This requires the role `r-inf-terraform-route53` be created from the Terraform module `aws-vpc-setup/route53-association/terraform-role`
(generally in `common/apps/route53`. It then uses an STS AssumeRole from Terraform. You must have the approriate permissions
on the source account to assume this role.
file: provider.route53.east_ma13_gov.tf
```hcl
provider "aws" {
alias = "east\_ma13\_gov"
region = var.region\_map["east"]
assume\_role {
role\_arn = format("arn:%v:iam::%v:role/r-inf-terraform-route53", data.aws\_arn.current.partition, "187944776148")
session\_name = var.os\_username
}
}
```

file: dns.tf
```hcl
module "db\_cname" {
providers = {
aws = aws.east\_ma13\_gov
}
source = "git@github.e.it.census.gov:terraform-modules/aws-dns//cname"
zone = var.vpc\_domain\_name
name = local.app\_db\_dns\_name
values = [module.db.db\_instance\_address]
}
## Requirements
| Name | Version |
Expand Down
2 changes: 1 addition & 1 deletion cname/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
* }
* ```
*
# ## Using DHCP options data resource
* ## Using DHCP options data resource
*
* data "aws_vpc_dhcp_options" "options" {
* filter {
Expand Down
48 changes: 48 additions & 0 deletions host/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,54 @@ module "dms_replication_dns" {
}
```

## Using DHCP options data resource

```hcl
data "aws_vpc_dhcp_options" "options" {
filter {
name = "vpc-id"
values = [local.vpc_id]
}
}
module "dms_replication_dns" {
source = "git@github.e.it.census.gov:terraform-modules/aws-dns//host"
name = format("%v.%v", aws_dms_replication_instance.dev.replication_instance_id, data.aws_vpc_dhc_options.options.domain_name)
values = aws_dms_replication_instance.dev.replication_instance_private_ips
}
```
## Using a Zone defined in another account
This requires the role `r-inf-terraform-route53` be created from the Terraform module `aws-vpc-setup/route53-association/terraform-role`
(generally in `common/apps/route53`. It then uses an STS AssumeRole from Terraform. You must have the approriate permissions
on the source account to assume this role.

file: provider.route53.east\_ma13\_gov.tf
```hcl
provider "aws" {
alias = "east_ma13_gov"
region = var.region_map["east"]
assume_role {
role_arn = format("arn:%v:iam::%v:role/r-inf-terraform-route53", data.aws_arn.current.partition, "187944776148")
session_name = var.os_username
}
}
```

file: dns.tf
```hcl
module "db_cname" {
providers = {
aws = aws.east_ma13_gov
}
source = "git@github.e.it.census.gov:terraform-modules/aws-dns//cname"
zone = var.vpc_domain_name
name = local.app_db_dns_name
values = [module.db.db_instance_address]
}
```

## Requirements

| Name | Version |
Expand Down
2 changes: 1 addition & 1 deletion host/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* }
* ```
*
# ## Using DHCP options data resource
* ## Using DHCP options data resource
*
* ```hcl
* data "aws_vpc_dhcp_options" "options" {
Expand Down
49 changes: 49 additions & 0 deletions ptr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,55 @@ module "dms_replication_dns" {
}
```

## Using DHCP options data resource

```hcl
data "aws_vpc_dhcp_options" "options" {
filter {
name = "vpc-id"
values = [local.vpc_id]
}
}
module "dms_replication_dns" {
source = "git@github.e.it.census.gov:terraform-modules/aws-dns//ptr"
name = format("%v.%v", aws_dms_replication_instance.dev.replication_instance_id, data.aws_vpc_dhc_options.options.domain_name)
values = aws_dms_replication_instance.dev.replication_instance_private_ips
}
```

## Using a Zone defined in another account
This requires the role `r-inf-terraform-route53` be created from the Terraform module `aws-vpc-setup/route53-association/terraform-role`
(generally in `common/apps/route53`. It then uses an STS AssumeRole from Terraform. You must have the approriate permissions
on the source account to assume this role.

file: provider.route53.east\_ma13\_gov.tf
```hcl
provider "aws" {
alias = "east_ma13_gov"
region = var.region_map["east"]
assume_role {
role_arn = format("arn:%v:iam::%v:role/r-inf-terraform-route53", data.aws_arn.current.partition, "187944776148")
session_name = var.os_username
}
}
```

file: dns.tf
```hcl
module "db_cname" {
providers = {
aws = aws.east_ma13_gov
}
source = "git@github.e.it.census.gov:terraform-modules/aws-dns//cname"
zone = var.vpc_domain_name
name = local.app_db_dns_name
values = [module.db.db_instance_address]
}
```

## Requirements

| Name | Version |
Expand Down
2 changes: 1 addition & 1 deletion ptr/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
* }
* ```
*
# ## Using DHCP options data resource
* ## Using DHCP options data resource
*
* ```hcl
* data "aws_vpc_dhcp_options" "options" {
Expand Down

0 comments on commit 7824657

Please sign in to comment.