-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzxy.tf
77 lines (68 loc) · 1.91 KB
/
zxy.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
resource "aws_imagebuilder_component" "InstallCLI2" {
data = yamlencode({
phases = [{
name = "build"
steps = [{
action = "ExecuteBash"
inputs = {
//commands = ["sudo apt-get update"]
commands = ["sudo apt-get install awscli"]
}
name = "YamlCode"
onFailure = "Continue"
}]
}]
schemaVersion = 1.0
})
name = "InstallCLI2"
platform = "Linux"
version = "2.0.0"
}
*/
/* this is still on testing to directly create AMI
resource "aws_imagebuilder_image" "NewImage-TFE" {
image_recipe_arn = aws_imagebuilder_image_recipe.NewRecipe2-TFE.arn
infrastructure_configuration_arn = aws_imagebuilder_infrastructure_configuration.NewConfig2-TFE.arn
distribution_configuration_arn = aws_imagebuilder_distribution_configuration.NewDistSet2-TFE.arn
depends_on = [
aws_imagebuilder_image_recipe.NewRecipe2-TFE,
aws_imagebuilder_distribution_configuration.NewDistSet2-TFE,
aws_imagebuilder_infrastructure_configuration.NewConfig2-TFE
]
}*/
/*
resource "aws_imagebuilder_component" "Test1" {
data = yamlencode({
phases = [{
name = "build"
steps = [{
action = "ExecuteBash"
inputs = {
commands = ["echo 'hello AR world'"]
}
name = "YamlCode"
onFailure = "Continue"
}]
}]
schemaVersion = 1.0
})
name = "HelloComponent"
platform = "Linux"
version = "1.0.0"
}*/
/*
resource "aws_s3_bucket_object" "compofile" {
for_each = fileset("/arimagebuildcomponents/", "*")
bucket = var.aws_s3_bucket
key = "/arimagebuildcomponents/${each.value}"
source = "/arimagebuildcomponents/${each.value}"
# If the md5 hash is different it will re-upload
etag = filemd5("/arimagebuildcomponents/${each.value}")
}
data "aws_s3_bucket_object" "compfile" {
}
data "aws_kms_key" "image_builder" {
key_id = "alias/image-builder"
}
*/