2019-07-29 02:35:57 +00:00
|
|
|
/* PROVIDERS ------------------------------------*/
|
|
|
|
|
2020-01-27 14:09:21 +00:00
|
|
|
provider "aws" {
|
|
|
|
version = "~> 2.0"
|
|
|
|
region = var.aws_zone
|
|
|
|
access_key = var.aws_access_key
|
|
|
|
secret_key = var.aws_secret_key
|
2019-03-20 12:35:10 +00:00
|
|
|
}
|
2019-07-29 02:35:57 +00:00
|
|
|
|
2019-03-20 12:35:10 +00:00
|
|
|
provider "cloudflare" {
|
2020-01-22 20:03:28 +00:00
|
|
|
email = var.cloudflare_email
|
|
|
|
api_key = var.cloudflare_token
|
|
|
|
account_id = var.cloudflare_account
|
2019-03-20 12:35:10 +00:00
|
|
|
}
|
2019-07-29 02:35:57 +00:00
|
|
|
|
2019-03-20 12:35:10 +00:00
|
|
|
/* DATA -----------------------------------------*/
|
|
|
|
|
|
|
|
terraform {
|
2020-01-27 14:09:21 +00:00
|
|
|
backend "s3" {
|
|
|
|
bucket = "tf-state-infra-nimbus"
|
|
|
|
key = "infra-dapps"
|
|
|
|
region = "eu-central-1"
|
|
|
|
encrypt = true
|
2019-03-20 12:35:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-22 20:03:28 +00:00
|
|
|
/* CF Zones ------------------------------------*/
|
|
|
|
|
|
|
|
/* CloudFlare Zone IDs required for records */
|
|
|
|
data "cloudflare_zones" "active" {
|
|
|
|
filter { status = "active" }
|
|
|
|
}
|
|
|
|
|
|
|
|
/* For easier access to zone ID by domain name */
|
|
|
|
locals {
|
|
|
|
zones = {
|
|
|
|
for zone in data.cloudflare_zones.active.zones:
|
|
|
|
zone.name => zone.id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-27 14:09:21 +00:00
|
|
|
/* ACCESS KEY ------------------------------------------------------*/
|
2020-01-22 20:03:28 +00:00
|
|
|
|
2020-01-27 14:09:21 +00:00
|
|
|
resource "aws_key_pair" "jakubgs" {
|
|
|
|
key_name = "jakubgs"
|
|
|
|
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDA6mutbRHO8VvZ61MYvjIVv1Re9NiJGE1piTQq4IFwXOvAi1HkXkMlsjmzYt+CEv0HmMGCHmdrw5xpqnDTWg18lM5RYLzrAv9hBOQ10IC+8FH2XWDKoyz+PBQsNEbbJ23QQtu0O5mpsOzI/KBT9CkiYUYlEBwHI0vNqsdHDLwv3Yt7PhauguXDHpYnwH/OseVHLBg2+/3aJIfOMVVRnhptQGYAhTNUZ9F1EwvQETMhM/vEsk8+o9B3tK/Ii/RD2EtVUlpRG4q6QTFbssLMImUfcdoggHsfCqjq3apUs8bR81oN9UVoYiP8tn5sWIUyRBxIEzXpqa4rx04KY8xNYqeZ jakub@status.im"
|
2019-03-21 12:27:16 +00:00
|
|
|
}
|