TritonDataCenter / terraform-provider-triton

Terraform Joyent Triton provider
https://www.terraform.io/docs/providers/triton/
Mozilla Public License 2.0
15 stars 24 forks source link

triton_machine: Introduce CNS stanza and better domain name tracking #15

Closed jwreagor closed 7 years ago

jwreagor commented 7 years ago

Ref: #8 #4 and #3

This implements the CNS stanza outlined in #8(comment). This touches both tags as well as moving cns related configuration into its own block.

Things to note:

Domain Names

It’s worth talking about how CNS domain names converge….

The process for waiting on domain name convergence is rather naive and simply checks for domain names that include each service name as the first part of the domain name, (frontend -> frontend.svc.<uuid>.us-west-1.triton.zone). We only check the first part of the DNS record (frontend.) and only look for a single domain match (because CNS works for both private, public, and either/or). From all of my tests, this convergence feature has been working really well and takes about 20 seconds. There is no timeout.

Please make sure when testing that you are looking at both CNS tags as well as domain names stored in the state file. I kept a list of various combinations of state that I found while buckling down the hatches of CNS.

Finally

I'd like to handle the final merge alongside #14 since those will affect each other. I could open a PR with both included together if that makes it easier to merge into master.

jwreagor commented 7 years ago

/cc @jen20 @sean-

jwreagor commented 7 years ago

Actually, realized I forgot to commit tests. Probably should flesh those out.

jwreagor commented 7 years ago

This should be at least good to test and review. I'm looking at the hash comparison again but feeling confident its doing the job ATM.

jwreagor commented 7 years ago

Close this PR once #17 has been merged. #17 includes both CNS and Metadata features.

jen20 commented 7 years ago

Subsumed into #17.