daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Mar 24th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Configure the AWS Provider
  2. provider "aws" {
  3.   access_key = "${var.aws_access_key_id}"
  4.   secret_key = "${var.aws_secret_access_key}"
  5.   region     = "${var.aws_region}"
  6. }
  7.  
  8. # SSH key for authentication
  9. resource "aws_key_pair" "rsa_ssh_key" {
  10.   key_name   = "ssh_key"
  11.   public_key = "${file("${var.ssh_public_key}")}"
  12. }
  13.  
  14. # Zone of current region
  15. data "aws_availability_zones" "main" {}
  16.  
  17. # Retrieve ID of Debian 9 AMI
  18. data "aws_ami" "debian_stretch_ami" {
  19.     most_recent = true
  20.     name_regex  = "${var.debian_ami_name_regex}"
  21.     owners      = ["${var.debian_ami_owner}"]
  22.  
  23.     filter {
  24.         name = "root-device-type"
  25.         values = ["ebs"]
  26.     }
  27.  
  28.     filter {
  29.         name = "virtualization-type"
  30.         values = ["hvm"]
  31.     }
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top