Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 7, 2024
1 parent c535489 commit de3e1f2
Show file tree
Hide file tree
Showing 23 changed files with 44 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .deepsource.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 1

[[analyzers]]
name = "terraform"
name = "terraform"
2 changes: 1 addition & 1 deletion .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
uses: clouddrove/github-shared-workflows/.github/workflows/readme.yml@master
secrets:
TOKEN : ${{ secrets.GITHUB }}
SLACK_WEBHOOK_TERRAFORM: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }}
SLACK_WEBHOOK_TERRAFORM: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,4 @@ terraform.tfstate
*.tfstate.backup
*.iml
*.terraform.lock.hcl
*.lock.hcl
*.lock.hcl
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[0.12.1.1]: https://github.com/clouddrove/terraform-aws-route53/releases/tag/0.12.1.1
[1.0.1]: https://github.com/clouddrove/terraform-aws-route53/releases/tag/1.0.1

[1.0.2]: https://github.com/clouddrove/terraform-aws-route53/compare/1.0.1...1.0.2
[1.0.2]: https://github.com/clouddrove/terraform-aws-route53/compare/1.0.1...1.0.2
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export GENIE_PATH ?= $(shell 'pwd')/../../../genie

include $(GENIE_PATH)/Makefile
include $(GENIE_PATH)/Makefile
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<hr>


We are a group of DevOps engineers & architects, joining hands in this ever evolving digital landscape. With our strong belief in Automation; just like microservices, always on the lookout to split the the infrastructure into smaller connected resources (database, cluster and more) which could be standardized, are manageable, scalable, secure & follow industry best practices.
We are a group of DevOps engineers & architects, joining hands in this ever evolving digital landscape. With our strong belief in Automation; just like microservices, always on the lookout to split the the infrastructure into smaller connected resources (database, cluster and more) which could be standardized, are manageable, scalable, secure & follow industry best practices.


This module includes Terraform open source, examples, and automation tests (for better understanding), which would help you create and improve your infrastructure with minimalistic coding.
Expand Down Expand Up @@ -79,7 +79,7 @@ This table contains both Prerequisites and Providers:
Refer to complete documentation: [here](docs/io.md)


<!--
<!--
## Module Dependencies
This module has dependencies on:
Expand Down Expand Up @@ -107,7 +107,7 @@ Refer [here](CHANGELOG.md).

## ✨ Contributors

Big thanks to our contributors for elevating our project with their dedication and expertise! But, we do not wish to stop there, would like to invite contributions from the community in improving these projects and making them more versatile for better reach. Remember, every bit of contribution is immensely valuable, as, together, we are moving in only 1 direction, i.e. forward.
Big thanks to our contributors for elevating our project with their dedication and expertise! But, we do not wish to stop there, would like to invite contributions from the community in improving these projects and making them more versatile for better reach. Remember, every bit of contribution is immensely valuable, as, together, we are moving in only 1 direction, i.e. forward.

<a href="https://github.com/clouddrove/terraform-aws-route53/graphs/contributors">
<img src="https://contrib.rocks/image?repo=clouddrove/terraform-aws-route53&max" />
Expand Down Expand Up @@ -135,7 +135,7 @@ Big thanks to our contributors for elevating our project with their dedication a



## Feedback
## Feedback
Spot a bug or have thoughts to share with us? Let's squash it together! Log it in our [issue tracker](https://github.com/clouddrove/terraform-aws-route53/issues), feel free to drop us an email at [hello@clouddrove.com](mailto:hello@clouddrove.com).

Show some love with a ★ on [our GitHub](https://github.com/clouddrove/terraform-aws-route53)! if our work has brightened your day! – your feedback fuels our journey!
Expand All @@ -147,7 +147,7 @@ We have [*100+ Terraform modules*][terraform_modules] 🙌. You could consider t

- [Terraform Module Registry:](https://registry.terraform.io/namespaces/clouddrove) Discover our Terraform modules here.

- [Terraform Modules for AWS/Azure Modules:](https://github.com/clouddrove/toc) Explore our comprehensive Table of Contents for easy navigation through our documentation for modules pertaining to AWS, Azure & GCP.
- [Terraform Modules for AWS/Azure Modules:](https://github.com/clouddrove/toc) Explore our comprehensive Table of Contents for easy navigation through our documentation for modules pertaining to AWS, Azure & GCP.

- [Terraform Modules for Digital Ocean:](https://github.com/terraform-do-modules/toc) Check out our specialized Terraform modules for Digital Ocean.

Expand All @@ -173,7 +173,7 @@ Join our tech elites [Join Now][slack] 🚀
Click [here][blog] :books: :star2:

## Tap into our capabilities
We provide a platform for organizations to engage with experienced top-tier DevOps & Cloud services. Tap into our pool of certified engineers and architects to elevate your DevOps and Cloud Solutions.
We provide a platform for organizations to engage with experienced top-tier DevOps & Cloud services. Tap into our pool of certified engineers and architects to elevate your DevOps and Cloud Solutions.

At [CloudDrove][website], has extensive experience in designing, building & migrating environments, securing, consulting, monitoring, optimizing, automating, and maintaining complex and large modern systems. With remarkable client footprints in American & European corridors, our certified architects & engineers are ready to serve you as per your requirements & schedule. Write to us at [business@clouddrove.com](mailto:business@clouddrove.com).

Expand Down
2 changes: 1 addition & 1 deletion README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ providers:
url: https://aws.amazon.com/
version: ">= 5.31.0"

module_dependencies:
module_dependencies:
- name: Labels Module
url: https://github.com/clouddrove/terraform-aws-labels
description: Provides resource tagging.
Expand Down
1 change: 0 additions & 1 deletion docs/io.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@
|------|-------------|
| tags | A mapping of tags to assign to the resource. |
| zone\_id | The Hosted Zone ID. This can be referenced by zone records. |

2 changes: 1 addition & 1 deletion examples/private-hostedzone/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ output "id" {
output "tags" {
value = module.route53.tags
description = "A mapping of tags to assign to the resource."
}
}
2 changes: 1 addition & 1 deletion examples/private-hostedzone/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ terraform {
version = ">= 5.31.0"
}
}
}
}
2 changes: 1 addition & 1 deletion examples/public-hostedzone/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ output "id" {
output "tags" {
value = module.route53.tags
description = "A mapping of tags to assign to the resource."
}
}
2 changes: 1 addition & 1 deletion examples/public-hostedzone/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ terraform {
version = ">= 5.31.0"
}
}
}
}
2 changes: 1 addition & 1 deletion examples/records/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ data "aws_lb" "lb_1" {

data "aws_lb" "lb_2" {
name = "test-lb-2"
}
}
4 changes: 2 additions & 2 deletions examples/records/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ provider "aws" {
}

locals {
zone_id = "Z08XXXXXXQJXXCJCXXXX" # Route53 Zone ID
zone_id = "Z08XXXXXXQJXXCJCXXXX" # Route53 Zone ID
}

module "route53" {
Expand Down Expand Up @@ -70,4 +70,4 @@ module "route53" {
}
}
]
}
}
2 changes: 1 addition & 1 deletion examples/records/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ output "id" {
output "tags" {
value = module.route53.tags
description = "A mapping of tags to assign to the resource."
}
}
2 changes: 1 addition & 1 deletion examples/records/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ terraform {
version = ">= 5.31.0"
}
}
}
}
2 changes: 1 addition & 1 deletion examples/vpc-association/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ output "id" {
output "tags" {
value = module.route53.tags
description = "A mapping of tags to assign to the resource."
}
}
2 changes: 1 addition & 1 deletion examples/vpc-association/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ terraform {
version = ">= 5.31.0"
}
}
}
}
24 changes: 12 additions & 12 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
## Copyright @ CloudDrove. All Right Reserved.

locals {
##-----------------------------------------------------------------------------
##-----------------------------------------------------------------------------
## Terragrunt users have to provide `records_jsonencoded` as jsonencode()'d string.
## See details: https://github.com/gruntwork-io/terragrunt/issues/1211
##-----------------------------------------------------------------------------
records = concat(var.records, try(jsondecode(var.records_jsonencoded), []))

##-----------------------------------------------------------------------------
##-----------------------------------------------------------------------------
## Convert `records` from list to map with unique keys
##-----------------------------------------------------------------------------
recordsets = { for rs in local.records : try(rs.key, join(" ", compact(["${rs.name} ${rs.type}", try(rs.set_identifier, "")]))) => rs }
zone_id = var.enabled ? (var.zone_id != "" ? var.zone_id : (var.private_enabled ? aws_route53_zone.private[*].zone_id[0] : aws_route53_zone.public[*].zone_id[0])) : ""
}

##-----------------------------------------------------------------------------
## Locals declration to determine count of public subnet, private subnet, and nat gateway.
##-----------------------------------------------------------------------------
## Locals declration to determine count of public subnet, private subnet, and nat gateway.
##-----------------------------------------------------------------------------
module "labels" {
source = "clouddrove/labels/aws"
Expand All @@ -31,8 +31,8 @@ module "labels" {

}

##-----------------------------------------------------------------------------
## Terraform module to create Route53 zone resource on AWS for creating private hosted zones.
##-----------------------------------------------------------------------------
## Terraform module to create Route53 zone resource on AWS for creating private hosted zones.
##-----------------------------------------------------------------------------
resource "aws_route53_zone" "private" {
count = var.enabled && var.private_enabled ? 1 : 0
Expand All @@ -46,8 +46,8 @@ resource "aws_route53_zone" "private" {
}
}

##-----------------------------------------------------------------------------
## Terraform module to create Route53 zone resource on AWS for creating public hosted zones.
##-----------------------------------------------------------------------------
## Terraform module to create Route53 zone resource on AWS for creating public hosted zones.
##-----------------------------------------------------------------------------
resource "aws_route53_zone" "public" {
count = var.enabled && var.public_enabled ? 1 : 0
Expand All @@ -59,8 +59,8 @@ resource "aws_route53_zone" "public" {
tags = module.labels.tags
}

##-----------------------------------------------------------------------------
## Terraform module to create Route53 record sets resource on AWS.
##-----------------------------------------------------------------------------
## Terraform module to create Route53 record sets resource on AWS.
##-----------------------------------------------------------------------------
resource "aws_route53_record" "this" {
for_each = { for k, v in local.recordsets : k => v if var.enabled && var.record_enabled && (var.zone_id != null || var.public_enabled != null || var.private_enabled != null || var.domain_name != null) }
Expand Down Expand Up @@ -125,8 +125,8 @@ resource "aws_route53_record" "this" {
]
}

##-----------------------------------------------------------------------------
## Terraform module to create Route53 record sets resource on AWS for Weighted Routing Policy.
##-----------------------------------------------------------------------------
## Terraform module to create Route53 record sets resource on AWS for Weighted Routing Policy.
##-----------------------------------------------------------------------------
resource "aws_route53_zone_association" "default" {
count = var.enabled && var.vpc_association_enabled && var.private_enabled ? 1 : 0
Expand Down
6 changes: 3 additions & 3 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##-----------------------------------------------------------------------------
## Terraform module to create Route53 resource on AWS for managing queue.
##-----------------------------------------------------------------------------
## Terraform module to create Route53 resource on AWS for managing queue.
##-----------------------------------------------------------------------------
output "zone_id" {
value = var.zone_id != "" ? "" : (var.public_enabled ? join("", aws_route53_zone.public[*].zone_id) : join("", aws_route53_zone.private[*].zone_id))
Expand All @@ -9,4 +9,4 @@ output "zone_id" {
output "tags" {
value = module.labels.tags
description = "A mapping of tags to assign to the resource."
}
}
8 changes: 4 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##-----------------------------------------------------------------------------
## Locals declration to determine count of public subnet, private subnet, and nat gateway.
##-----------------------------------------------------------------------------
## Locals declration to determine count of public subnet, private subnet, and nat gateway.
##-----------------------------------------------------------------------------
variable "name" {
type = string
Expand Down Expand Up @@ -37,7 +37,7 @@ variable "managedby" {
description = "ManagedBy, eg 'CloudDrove' or 'AnmolNagpal'."
}

##-----------------------------------------------------------------------------
##-----------------------------------------------------------------------------
## Terraform Route53 module variables.
##-----------------------------------------------------------------------------

Expand Down Expand Up @@ -122,4 +122,4 @@ variable "zone_id" {
type = string
default = ""
description = "Route53 Zone ID."
}
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ terraform {
version = ">= 5.31.0"
}
}
}
}

0 comments on commit de3e1f2

Please sign in to comment.