OperationCode / OperationCode/operationcode_infra

Describe operationcode.org DNS records in code with Terraform

オープン
#83 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
HCL
スター
17
フォーク
12
PR マージ指標
30日以内にマージされた PR はありません

説明

Followup for #67, let's enumerate all current DNS records that are in our operationcode.org hosted zone, and put them into Terraform in dns/operationcode.org/records.tf. It's worth noting that the build will fail on these until a separate data operation is run by someone with access to import the record into the Terraform statefile.

Below is the the exported zonefile, each of these records would need to be translated to a Terraform block. The Terraform docs for the DNSimple provider are here, and it looks like this:

operationcode.org. 3600 IN NS ns1.dnsimple.com.

becomes

resource "dnsimple_record" "ns1" {
  domain = "${var.hosted-zone}"
  name = ""
  type = "NS"
  value = "ns1.dnsimple.com"
}

The quoted string after "dnsimple_record" is an identifier only, and should be styled like foo_bar.

As another example:

k8s.operationcode.org. 60 IN NS ns-170.awsdns-21.com

becomes

resource "dnsimple_record" "k8s1" {
  domain = "${var.hosted-zone}"
  name = "k8s"
  type = "NS"
  value = "ns-170.awsdns-21.com"
}

The zonefile:

$ORIGIN operationcode.org.
$TTL 1h
operationcode.org. 3600 IN SOA ns1.dnsimple.com. admin.dnsimple.com. 1437975341 86400 7200 604800 300
operationcode.org. 3600 IN NS ns1.dnsimple.com.
operationcode.org. 3600 IN NS ns2.dnsimple.com.
operationcode.org. 3600 IN NS ns3.dnsimple.com.
operationcode.org. 3600 IN NS ns4.dnsimple.com.
k8s.operationcode.org. 60 IN NS ns-170.awsdns-21.com.
k8s.operationcode.org. 60 IN NS ns-1495.awsdns-58.org.
k8s.operationcode.org. 60 IN NS ns-800.awsdns-36.net.
k8s.operationcode.org. 60 IN NS ns-1880.awsdns-43.co.uk.
operationcode.org. 3600 IN SPF v=spf1 a include:_spf.google.com include:mailgun.org ~all
operationcode.org. 3600 IN TXT "v=spf1 a include:_spf.google.com include:mailgun.org ~all"
_jabber._tcp.operationcode.org. 3600 IN SRV 5 0 5269 xmpp-server.l.google.com.
_jabber._tcp.operationcode.org. 3600 IN SRV 20 0 5269 xmpp-server1.l.google.com.
_jabber._tcp.operationcode.org. 3600 IN SRV 20 0 5269 xmpp-server2.l.google.com.
_jabber._tcp.operationcode.org. 3600 IN SRV 20 0 5269 xmpp-server3.l.google.com.
_jabber._tcp.operationcode.org. 3600 IN SRV 20 0 5269 xmpp-server4.l.google.com.
operationcode.org. 3600 IN MX 1 ASPMX.L.GOOGLE.COM.
operationcode.org. 3600 IN MX 5 ALT1.ASPMX.L.GOOGLE.COM.
operationcode.org. 3600 IN MX 5 ALT2.ASPMX.L.GOOGLE.COM.
operationcode.org. 3600 IN MX 10 ALT3.ASPMX.L.GOOGLE.COM.
operationcode.org. 3600 IN MX 10 ALT4.ASPMX.L.GOOGLE.COM.
; operationcode.org. 60 IN ALIAS ac206d147f3ed11e7a802062a4d50822-1344197385.us-east-2.elb.amazonaws.com.
operationcode.org. 60 IN TXT "ALIAS for ac206d147f3ed11e7a802062a4d50822-1344197385.us-east-2.elb.amazonaws.com"
rancher.operationcode.org. 600 IN CNAME ranchermanager.cloudapp.net.
services.operationcode.org. 60 IN A 174.138.92.215
slash-commands.operationcode.org. 60 IN CNAME services.operationcode.org.
api.operationcode.org. 3600 IN CNAME ac206d147f3ed11e7a802062a4d50822-1344197385.us-east-2.elb.amazonaws.com.
nfs.services.operationcode.org. 60 IN A 138.197.94.99
test.operationcode.org. 60 IN CNAME services.operationcode.org.
; www.operationcode.org. 60 IN ALIAS ac206d147f3ed11e7a802062a4d50822-1344197385.us-east-2.elb.amazonaws.com.
www.operationcode.org. 60 IN TXT "ALIAS for ac206d147f3ed11e7a802062a4d50822-1344197385.us-east-2.elb.amazonaws.com"
kibana.operationcode.org. 60 IN CNAME services.operationcode.org.
mautic.operationcode.org. 60 IN CNAME services.operationcode.org.
mail.notify.operationcode.org. 3600 IN CNAME u5672389.wl140.sendgrid.net.
s1._domainkey.operationcode.org. 3600 IN CNAME s1.domainkey.u5672389.wl140.sendgrid.net.
s2._domainkey.operationcode.org. 3600 IN CNAME s2.domainkey.u5672389.wl140.sendgrid.net.
o1.notify.operationcode.org. 3600 IN A 168.245.5.176
link.notify.operationcode.org. 3600 IN CNAME sendgrid.net.
5672389.operationcode.org. 3600 IN CNAME sendgrid.net.
operationcode.org. 60 IN TXT "google-site-verification=XFeRZYknCzfwk5LTAuVDKf6T99S-DGafkhOfUlFXwFI"
ci.operationcode.org. 60 IN A 198.199.76.219
frontend.operationcode.org. 60 IN A 174.138.40.238
k8s.staging.operationcode.org. 60 IN A 159.203.102.31
community.operationcode.org. 600 IN A 192.241.185.68
blog.operationcode.org. 3600 IN A 52.0.16.118
7e3872bd410d2239f5d3d1787021af41.blog.operationcode.org. 3600 IN CNAME 916a5031aa4c129bbf848fca5a85a956.e140463581cd3bc16cb371c86404ee70.comodoca.com..
_62bdef8daffb0b85a77bd7a7c4be6e36.operationcode.org. 3600 IN CNAME _b1d3619a779f40c956b5f204733bbf79.acm-validations.aws.
_13f44eba4c5bd4c605b42ea9ecd53830.www.operationcode.org. 3600 IN CNAME _9522333907f290384715e714473c1a35.acm-validations.aws.
staging.operationcode.org. 3600 IN CNAME ac206d147f3ed11e7a802062a4d50822-1344197385.us-east-2.elb.amazonaws.com.
operationcode.org. 3600 IN TXT "google-site-verification=s2E7tZyPlszu8LHIcYlRT8s6oq6hSoGQ70gMXKP08aE"
; storybook.operationcode.org. 60 IN URL https://operation-code-storybook.netlify.com/
vettec.operationcode.org. 60 IN CNAME operationcode.org.
pybot.operationcode.org. 3600 IN CNAME pyback-lb-197482116.us-east-2.elb.amazonaws.com.
_655c556b662824871fbd33ed62c1ccf4.pybot.operationcode.org. 3600 IN CNAME _9cc0d3e9dbf92408cb6386af746aac3e.ltfvzjuylp.acm-validations.aws.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

dns/operationcode.org/records.tf を開き、エクスポートされた zonefile と DNSimple provider resource のドキュメントを比較します。列挙されている各レコードを Terraform ブロックに変換し、名前、タイプ、値、関連する TTL を保持します。すべての現在のレコードが表現され、state の import が import access を持つ誰かによって別途処理された時点で作業は完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
terraform
領域
infrastructure
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。