Skip to content

Commit

Permalink
create domain in us-east-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Hannafious committed Mar 1, 2018
1 parent b77fbea commit 9963f92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dss_deployment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def write(self):
shutil.copy(src, dst)

self._write_config('providers.tf', self.provider_config)
self._write_config('providers-east1.tf', self.provider_config)
self._write_config('providers-east1.tf', self.provider_config_east1)
for k, v in self.vars.items():
self.tf['variable'][k]['default'] = v
self._write_config('dss_variables.tf', self.tf)
Expand Down
9 changes: 8 additions & 1 deletion dss_deployment/stage_template/domain/domain.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,21 @@ data aws_route53_zone dss_route53_zone {

resource aws_acm_certificate dss_domain_cert {
count = "${length(var.API_DOMAIN_NAME) > 0 ? 1 : 0}"
provider = "aws.us-east-1"
domain_name = "${var.API_DOMAIN_NAME}"
validation_method = "DNS"
provider = "aws.us-east-1"
}

resource aws_acm_certificate_validation cert {
certificate_arn = "${aws_acm_certificate.dss_domain_cert.arn}"
provider = "aws.us-east-1"
}

resource aws_api_gateway_domain_name dss_domain {
domain_name = "${var.API_DOMAIN_NAME}"
certificate_arn = "${aws_acm_certificate.dss_domain_cert.arn}"
depends_on = ["aws_acm_certificate.dss_domain_cert"]
provider = "aws.us-east-1"
}

resource aws_route53_record dss_route53_record {
Expand All @@ -27,4 +33,5 @@ resource aws_route53_record dss_route53_record {
}

depends_on = ["aws_acm_certificate.dss_domain_cert"]
provider = "aws.us-east-1"
}

0 comments on commit 9963f92

Please sign in to comment.