Skip to content

sendgrid domain authentication support#1

Merged
davidcheung merged 6 commits intomainfrom
sendgrid
Sep 4, 2020
Merged

sendgrid domain authentication support#1
davidcheung merged 6 commits intomainfrom
sendgrid

Conversation

@davidcheung
Copy link
Contributor

@davidcheung davidcheung commented Sep 2, 2020

}

variable "cname" {
description = "list of CNAME records to be created for domain authentication"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe indicate here what the two values are in the tuple? (cname, target)

@@ -0,0 +1,31 @@
# Sendgrid

Authenticates domain with sendgrid, assumes CNAME required are provided in variables
Copy link
Contributor

Choose a reason for hiding this comment

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

assumes CNAME required are provided in variables is redundant based on the rest of the docs.


<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements
Assumes domain is already awaiting authentication, this created the route53 entries
Copy link
Contributor

Choose a reason for hiding this comment

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

created -> creates


## Print our CNAMES for our target domain
## IMPORTANT: must print out map[string]string in JSON format, where all values must be string(CANNOT be int/numbers/boolean)
JQ_CNAMES_QUERY=".[] | select( .domain == \"${DOMAIN}\" ) | { domain_id : .id|tostring } + (.dns | with_entries(.key |=\"\(.)_host\" | .value |=.host ) )+ (.dns | with_entries(.key |=\"\(.)_value\" | .value |=.data ) )"
Copy link
Contributor

Choose a reason for hiding this comment

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

Epic jq!

}

variable "sendgrid_api_key_secret_name" {
description = "api_key for sendgrid api, used to authenticate domain once route53 records are created"
Copy link
Contributor

Choose a reason for hiding this comment

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

How about something like "name of the secret in AWS secret manager that contains the sendgrid API key"? Also could you please run the pre-commit hook so this stuff gets populated into the readme?

- jq
- curl No requirements.
- Api key to be stored in AWS secret manager
- HostedZone to be properly configured as root of domain in Route53
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should these be moved to ## Notes instead of requirements since theyre generated

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep!

Copy link
Contributor

Choose a reason for hiding this comment

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

Otherwise next time someone runs the pre-commit hook that will be wiped out.

@github-actions
Copy link

github-actions bot commented Sep 4, 2020

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖Success! The configuration is valid.

@davidcheung davidcheung merged commit 9863bd6 into main Sep 4, 2020
@davidcheung davidcheung deleted the sendgrid branch September 4, 2020 20:03
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