-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
42 lines (39 loc) · 894 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
variable "region" {
default = "eu-west-2"
}
#raj added a new comment
provider "aws" {
alias = "sandbox"
region = var.region
assume_role {
role_arn = "arn:aws:iam::${var.sandbox_account_id}:role/AdministratorAccess"
}
}
resource "aws_s3_bucket" "foo-bucket" {
region = var.region
bucket = local.bucket_name
force_destroy = true
tags = {
Name = "foo-${data.aws_caller_identity.current.account_id}"
}
versioning {
enabled = true
}
logging {
target_bucket = "${aws_s3_bucket.log_bucket.id}"
target_prefix = "log/"
}
server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
kms_master_key_id = "${aws_kms_key.mykey.arn}"
sse_algorithm = "aws:kms"
}
}
}
acl = "private"
}
#hello world
module "raj_otherstuff" {
source = "./modules/otherstuff"
}