Skip to content

Commit

Permalink
Merge branch 'feature/base-repo'
Browse files Browse the repository at this point in the history
jordi.bru committed May 22, 2024
2 parents 902eaab + fa96dff commit dad9358
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 4 additions & 0 deletions examples/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
provider "aws" {
region = "eu-west-1"
profile = "aws-jordi-account"
}
6 changes: 1 addition & 5 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
data "aws_route53_zone" "domain_created" {
name = var.domain_name
}

resource "aws_acm_certificate" "domain_certificate" {
domain_name = var.domain_name
validation_method = "DNS"
@@ -32,7 +28,7 @@ resource "aws_route53_record" "cert_validations" {
records = [each.value.record]
ttl = 60
type = each.value.type
zone_id = data.aws_route53_zone.domain_created.zone_id
zone_id = var.zone_id
}

resource "aws_acm_certificate_validation" "validations" {
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -47,4 +47,10 @@ variable "validate_cert" {
description = "Validate the certificate"
type = bool
default = false
}

variable "zone_id" {
description = "route53 zone id"
type = string
default = ""
}
5 changes: 0 additions & 5 deletions providers.tf → versions.tf
Original file line number Diff line number Diff line change
@@ -7,9 +7,4 @@ terraform {
version = ">= 5.0"
}
}
}

provider "aws" {
region = "eu-west-1"
profile = "aws-jordi-account"
}

0 comments on commit dad9358

Please sign in to comment.