Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy custom domain with Terraform #1232

Merged
merged 3 commits into from
May 30, 2018
Merged

Deploy custom domain with Terraform #1232

merged 3 commits into from
May 30, 2018

Conversation

xbrianh
Copy link
Member

@xbrianh xbrianh commented May 12, 2018

Deploy a regional API Gateway custom domain name through scripting executed by the Terraform workflow.

This is a workaround while waiting for Terraform support for regional domains:
hashicorp/terraform-provider-aws#2195

#connect to #856

@xbrianh xbrianh force-pushed the bhannafi-infra-domain branch 2 times, most recently from a2ea229 to dbb3611 Compare May 18, 2018 21:47
Terraform does not support regional domain names. As a workaround,
use a Terraform "null_resource" to call a custom provisioning
script to set up a custom regional domain name and Route 53
record.
@xbrianh xbrianh force-pushed the bhannafi-infra-domain branch from dbb3611 to e3b6838 Compare May 18, 2018 21:55
@xbrianh xbrianh changed the title [WIP] Deploy custom domain with Terraform Deploy custom domain with Terraform May 18, 2018
@xbrianh xbrianh self-assigned this May 18, 2018
@xbrianh xbrianh requested review from kislyuk and hannes-ucsc May 18, 2018 21:58
@xbrianh
Copy link
Member Author

xbrianh commented May 19, 2018

Reviewers may find documentation for terraform local-exec provisioning useful:
https://www.terraform.io/docs/provisioners/local-exec.html

During testing, after successful execution of local-exec, terraform did not attempt to re-deploy upon further calls to terraform apply.

#!/usr/bin/env python

"""
This script configures a regional domain name for AWS Apigateway, based on an existing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The full human-readable name for the service is "API Gateway" and I would prefer it if we used it consistently throughout.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@xbrianh xbrianh merged commit 7a1015b into master May 30, 2018
@xbrianh xbrianh deleted the bhannafi-infra-domain branch May 30, 2018 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants