This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_version = "=0.12.6" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "us-east-1" | |
version = "~> 2.19.0" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module "ado_seed" { | |
source = "./modules/ado_seed" | |
name_of_s3_bucket = "s3-bucket-name-kyler-ue1-tfstate" | |
dynamo_db_table_name = "aws-locks" | |
iam_user_name = "AzureDevOpsIamUser" | |
ado_iam_role_name = "AzureDevOpsIamRole" | |
aws_iam_policy_permits_name = "AzureDevOpsIamPolicyPermits" | |
aws_iam_policy_assume_name = "AzureDevOpsIamPolicyAssume" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_s3_bucket" "state_bucket" { | |
bucket = "${var.name_of_s3_bucket}" | |
# Tells AWS to encrypt the S3 bucket at rest by default | |
server_side_encryption_configuration { | |
rule { | |
apply_server_side_encryption_by_default { | |
sse_algorithm = "AES256" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_dynamodb_table" "tf_lock_state" { | |
name = "${var.dynamo_db_table_name}" | |
# Pay per request is cheaper for low-i/o applications, like our TF lock state | |
billing_mode = "PAY_PER_REQUEST" | |
# Hash key is required, and must be an attribute | |
hash_key = "LockID" | |
# Attribute LockID is required for TF to use this table for lock state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_iam_user" "ado_iam_user" { | |
name = "${var.iam_user_name}" | |
path = "/" | |
tags = { | |
BuiltBy = "Terraform" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export AWS_ACCESS_KEY_ID=your_access_key | |
export AWS_SECRET_ACCESS_KEY=your_secret_access_key | |
export AWS_DEFAULT_REGION="us-east-1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_version = "=0.12.6" | |
backend "s3" { | |
bucket = "s3-bucket-name-kyler-ue1-tfstate" | |
key = "terraform.tfstate" | |
region = "us-east-1" | |
dynamodb_table = "aws-locks" | |
encrypt = true | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_version = "=0.12.6" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "us-east-1" | |
version = "~> 2.19.0" | |
} |
OlderNewer