@@ -3,17 +3,82 @@ A basic example for this repository
3
3
4
4
## Code
5
5
``` hcl
6
- module "test_component" {
6
+ data "aws_caller_identity" "current" {
7
+ }
8
+
9
+ locals {
10
+ account_id = data.aws_caller_identity.current.account_id
11
+ tags = module.tags.tags_no_name
12
+ }
13
+
14
+ module "tags" {
15
+ source = "rhythmictech/tags"
16
+ version = "~> 1.1.0"
17
+
18
+
19
+ names = [
20
+ "smiller",
21
+ "imagebuilder-test"
22
+ ]
23
+
24
+ tags = merge({
25
+ "Env" = "test"
26
+ "Namespace" = "smiller"
27
+ "notes" = "Testing only - Can be safely deleted"
28
+ "Owner" = var.owner
29
+ }, var.additional_tags)
30
+ }
31
+
32
+ module "component_ansible_setup" {
33
+ source = "rhythmictech/imagebuilder-component-ansible-setup/aws"
34
+ version = "~> 1.0.0-rc1"
35
+
36
+ component_version = "1.0.0"
37
+ description = "Testing ansible setup"
38
+ name = "testing-setup-component"
39
+ tags = local.tags
40
+ }
41
+
42
+ module "component_ansible" {
7
43
source = "rhythmictech/imagebuilder-component-ansible/aws"
8
- version = "~> 0. 2.0"
44
+ version = "~> 2.0.0-rc1 "
9
45
10
46
component_version = "1.0.0"
11
47
description = "Testing component"
12
48
name = "testing-component"
13
- playbook_dir = "packer-generic-images/base"
14
- playbook_repo = "https://github.com/rhythmictech/packer-generic-images.git"
15
49
tags = local.tags
16
50
}
51
+
52
+ module "test_recipe" {
53
+ source = "rhythmictech/imagebuilder-recipe/aws"
54
+ version = "~> 0.2.0"
55
+
56
+ description = "Testing recipe"
57
+ name = "test-recipe"
58
+ parent_image = "arn:aws:imagebuilder:us-east-1:aws:image/amazon-linux-2-x86/x.x.x"
59
+ recipe_version = "1.0.0"
60
+ tags = local.tags
61
+ update = true
62
+
63
+ component_arns = [
64
+ module.component_ansible_setup.component_arn,
65
+ module.component_ansible.component_arn,
66
+ "arn:aws:imagebuilder:us-east-1:aws:component/simple-boot-test-linux/1.0.0/1",
67
+ "arn:aws:imagebuilder:us-east-1:aws:component/reboot-test-linux/1.0.0/1"
68
+ ]
69
+ }
70
+
71
+ module "test_pipeline" {
72
+ source = "rhythmictech/imagebuilder-pipeline/aws"
73
+ version = "~> 0.3.0"
74
+
75
+ description = "Testing pipeline"
76
+ name = "test-pipeline"
77
+ tags = local.tags
78
+ recipe_arn = module.test_recipe.recipe_arn
79
+ public = false
80
+ }
81
+
17
82
```
18
83
19
84
## Applying
0 commit comments