Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
lt53
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
takashi
January 21, 2023
Technology
0
330
lt53
takashi
January 21, 2023
Tweet
Share
More Decks by takashi
See All by takashi
CICDを使用したECS Blue Greenデプロイを実施する際に必要なファイルについて
98_justdoit
0
400
Other Decks in Technology
See All in Technology
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
Frontier Agents (Kiro autonomous agent / AWS Security Agent / AWS DevOps Agent) の紹介
msysh
3
150
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
400
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.8k
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
1
300
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
120
ファインディの横断SREがTakumi byGMOと取り組む、セキュリティと開発スピードの両立
rvirus0817
1
1.2k
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
360
入社1ヶ月でデータパイプライン講座を作った話
waiwai2111
1
250
システムのアラート調査をサポートするAI Agentの紹介/Introduction to an AI Agent for System Alert Investigation
taddy_919
2
1.9k
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
4
1.3k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
230
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Code Review Best Practice
trishagee
74
20k
[SF Ruby Conf 2025] Rails X
palkan
0
740
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Paper Plane
katiecoart
PRO
0
46k
Abbi's Birthday
coloredviolet
1
4.7k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
230
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
110
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
A designer walks into a library…
pauljervisheath
210
24k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Transcript
Terraformでマルチリージョンでリソースを 作成する方法について 2023/01/18 JAWS-UG初心者支部#53 新年LTスペシャル会
自己紹介 名前 : たかし 所属 : アイレット株式会社 業務内容 : AWSのインフラ構築、運用
保有資格 : AWS SAA、SOA、DVA、SAP、DOP、SCS 好きになりたいAWSサービス : Code Pipeline Twitter : 98_justdoit
拠点が国内のため、東京リージョンにインフラを構築します。 海外向けにも展開したいため、CloudFrontを前段に置き、ACMをバージニア北部で設 定します。 背景
今回のサービスについて ❏ CloudFront ❏ Amazon CloudFront は、高いパフォーマンス、セキュリティ、デベロッパーの利便性のために構築されたコンテンツ配信ネット ワーク (CDN) サービスです。
❏ グローバルサービス ❏ ※ AWSの公式サイトから引用 ❏ AWS Certificate Manager (ACM) ❏ AWS サービスと内部接続リソースで使用するパブリックおよびプライベート SSL/TLS 証明書をプロビジョニング、管理、およ び展開します。ACM を使用すれば、SSL/TLS 証明書の購入、アップロード、および更新という時間のかかるプロセスを手動 で行う必要がなくなります。 ❏ リージョンサービス ❏ ※ AWSの公式サイトから引用
前提 CloudFrontのディストリビューションでカスタム証明書でACMを選択する場合、 ACMの証明書をバージニア北部で作成する必要がある。 (AWS SAAとかSCSの勉強してる際に出てくるやつです。) なぜ CloudFrontはグローバルサービスのため。
構成図
方法 1. リージョンごとにディレクトリを分けてリソースを構築する 2. Multiple Providersを使用する
1.リージョンごとのディレクトリ 下記のようにディレクトリを分けて作成し、ディレクトリ毎にapplyをする ./tf/ap-northeast-1/profile.tf ./tf/us-east-1/profile.tf ただこの場合環境変数を変更が必要な際、ディレクトリごとの修正が必要。
2.Multiple Providersを使用する 1つリージョンのみの場合のterraformの設定だとこんな感じ ※ awsの認証情報は環境変数で読み込んでます。
2.Multiple Providersを使用する Multiple Providersを使用する場合はproviderにaliasをつけて複数定義する
2.Multiple Providersを使用する リソース作成時は、provider.${alias}を指定してあげる 今回はprovider = aws.virginia 本来バージニア北部でACMの証明書を リクエストすべきですが、 今回はあえて同じリソースで 見比べるためにリージョン毎に
VPCを作成しました。
作成したVPC 東京リージョンのVPC
作成したVPC バージニア北部のVPC
ありがとうございました!