Skip to content

Commit ca0eb0e

Browse files
committed
update example
1 parent cf04335 commit ca0eb0e

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

examples/complete/main.tf

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,48 @@ module "ec2_ignore_ami_changes" {
180180
tags = local.tags
181181
}
182182

183+
################################################################################
184+
# EC2 Module - with ignore AMI changes and ignore user_data changes
185+
################################################################################
186+
187+
module "ec2_ignore_ami_changes" {
188+
source = "../../"
189+
190+
name = local.name
191+
192+
ignore_ami_changes = true
193+
ignore_user_data_changes = true
194+
195+
ami = data.aws_ami.amazon_linux.id
196+
instance_type = "t2.micro"
197+
availability_zone = element(module.vpc.azs, 0)
198+
subnet_id = element(module.vpc.private_subnets, 0)
199+
vpc_security_group_ids = [module.security_group.security_group_id]
200+
201+
tags = local.tags
202+
}
203+
204+
################################################################################
205+
# EC2 Module - with ignore user_data changes
206+
################################################################################
207+
208+
module "ec2_ignore_ami_changes" {
209+
source = "../../"
210+
211+
name = local.name
212+
213+
ignore_user_data_changes = true
214+
215+
ami = data.aws_ami.amazon_linux.id
216+
instance_type = "t2.micro"
217+
availability_zone = element(module.vpc.azs, 0)
218+
subnet_id = element(module.vpc.private_subnets, 0)
219+
vpc_security_group_ids = [module.security_group.security_group_id]
220+
221+
tags = local.tags
222+
}
223+
224+
183225
################################################################################
184226
# EC2 Module - multiple instances with `for_each`
185227
################################################################################

0 commit comments

Comments
 (0)