Top Level Namespace

Defined Under Namespace

Modules: Terrafied Classes: Hash

Class Method Summary collapse

Class Method Details

.add_resource_alias(type) ⇒ Object



26
27
28
29
30
# File 'lib/terrafied/builder.rb', line 26

def add_resource_alias(type)
  define_singleton_method type.to_sym do |name, spec={}|
    resource(type, name, spec)
  end
end

.aws_ami(name, spec = {}) ⇒ Object



151
152
153
154
155
# File 'lib/terrafied/resource_shortcuts.rb', line 151

def aws_ami(name, spec={})
  default_spec = { name: name }
  resource 'aws_ami', name,
           default_spec.deep_merge(spec)
end

.aws_ami_copy(name, spec = {}) ⇒ Object



157
158
159
160
161
# File 'lib/terrafied/resource_shortcuts.rb', line 157

def aws_ami_copy(name, spec={})
  default_spec = { name: name }
  resource 'aws_ami_copy', name,
           default_spec.deep_merge(spec)
end

.aws_ami_from_instance(name, spec = {}) ⇒ Object



163
164
165
166
167
# File 'lib/terrafied/resource_shortcuts.rb', line 163

def aws_ami_from_instance(name, spec={})
  default_spec = { name: name }
  resource 'aws_ami_from_instance', name,
           default_spec.deep_merge(spec)
end

.aws_api_gateway_account(name, spec = {}) ⇒ Object



13
14
15
16
17
# File 'lib/terrafied/resource_shortcuts.rb', line 13

def (name, spec={})
  default_spec = { name: name }
  resource 'aws_api_gateway_account', name,
           default_spec.deep_merge(spec)
end

.aws_api_gateway_api_key(name, spec = {}) ⇒ Object



19
20
21
22
23
# File 'lib/terrafied/resource_shortcuts.rb', line 19

def aws_api_gateway_api_key(name, spec={})
  default_spec = { name: name }
  resource 'aws_api_gateway_api_key', name,
           default_spec.deep_merge(spec)
end

.aws_api_gateway_authorizer(name, spec = {}) ⇒ Object



25
26
27
28
29
# File 'lib/terrafied/resource_shortcuts.rb', line 25

def aws_api_gateway_authorizer(name, spec={})
  default_spec = { name: name }
  resource 'aws_api_gateway_authorizer', name,
           default_spec.deep_merge(spec)
end

.aws_api_gateway_deployment(name, spec = {}) ⇒ Object



31
32
33
# File 'lib/terrafied/resource_shortcuts.rb', line 31

def aws_api_gateway_deployment(name, spec={})
  resource 'aws_api_gateway_deployment', name, spec
end

.aws_api_gateway_integration(name, spec = {}) ⇒ Object



35
36
37
# File 'lib/terrafied/resource_shortcuts.rb', line 35

def aws_api_gateway_integration(name, spec={})
  resource 'aws_api_gateway_integration', name, spec
end

.aws_api_gateway_integration_response(name, spec = {}) ⇒ Object



39
40
41
# File 'lib/terrafied/resource_shortcuts.rb', line 39

def aws_api_gateway_integration_response(name, spec={})
  resource 'aws_api_gateway_integration_response', name, spec
end

.aws_api_gateway_method(name, spec = {}) ⇒ Object



43
44
45
# File 'lib/terrafied/resource_shortcuts.rb', line 43

def aws_api_gateway_method(name, spec={})
  resource 'aws_api_gateway_method', name, spec
end

.aws_api_gateway_method_response(name, spec = {}) ⇒ Object



47
48
49
# File 'lib/terrafied/resource_shortcuts.rb', line 47

def aws_api_gateway_method_response(name, spec={})
  resource 'aws_api_gateway_method_response', name, spec
end

.aws_api_gateway_model(name, spec = {}) ⇒ Object



51
52
53
54
55
# File 'lib/terrafied/resource_shortcuts.rb', line 51

def aws_api_gateway_model(name, spec={})
  default_spec = { name: name }
  resource 'aws_api_gateway_model', name,
           default_spec.deep_merge(spec)
end

.aws_api_gateway_resource(name, spec = {}) ⇒ Object



57
58
59
# File 'lib/terrafied/resource_shortcuts.rb', line 57

def aws_api_gateway_resource(name, spec={})
  resource 'aws_api_gateway_resource', name, spec
end

.aws_api_gateway_rest_api(name, spec = {}) ⇒ Object



61
62
63
64
65
# File 'lib/terrafied/resource_shortcuts.rb', line 61

def aws_api_gateway_rest_api(name, spec={})
  default_spec = { name: name }
  resource 'aws_api_gateway_rest_api', name,
           default_spec.deep_merge(spec)
end


169
170
171
172
173
# File 'lib/terrafied/resource_shortcuts.rb', line 169

def aws_app_cookie_stickiness_policy(name, spec={})
  default_spec = { name: name }
  resource 'aws_app_cookie_stickiness_policy', name,
           default_spec.deep_merge(spec)
end

.aws_autoscaling_group(name, spec = {}) ⇒ Object



175
176
177
178
179
# File 'lib/terrafied/resource_shortcuts.rb', line 175

def aws_autoscaling_group(name, spec={})
  default_spec = { name: name }
  resource 'aws_autoscaling_group', name,
           default_spec.deep_merge(spec)
end

.aws_autoscaling_lifecycle_hook(name, spec = {}) ⇒ Object



181
182
183
184
185
# File 'lib/terrafied/resource_shortcuts.rb', line 181

def aws_autoscaling_lifecycle_hook(name, spec={})
  default_spec = { name: name }
  resource 'aws_autoscaling_lifecycle_hook', name,
           default_spec.deep_merge(spec)
end

.aws_autoscaling_notification(name, spec = {}) ⇒ Object



187
188
189
# File 'lib/terrafied/resource_shortcuts.rb', line 187

def aws_autoscaling_notification(name, spec={})
  resource 'aws_autoscaling_notification', name, spec
end

.aws_autoscaling_policy(name, spec = {}) ⇒ Object



191
192
193
194
195
# File 'lib/terrafied/resource_shortcuts.rb', line 191

def aws_autoscaling_policy(name, spec={})
  default_spec = { name: name }
  resource 'aws_autoscaling_policy', name,
           default_spec.deep_merge(spec)
end

.aws_autoscaling_schedule(name, spec = {}) ⇒ Object



197
198
199
# File 'lib/terrafied/resource_shortcuts.rb', line 197

def aws_autoscaling_schedule(name, spec={})
  resource 'aws_autoscaling_schedule', name, spec
end

.aws_cloudformation_stack(name, spec = {}) ⇒ Object



67
68
69
70
71
# File 'lib/terrafied/resource_shortcuts.rb', line 67

def aws_cloudformation_stack(name, spec={})
  default_spec = { name: name }
  resource 'aws_cloudformation_stack', name,
           default_spec.deep_merge(spec)
end

.aws_cloudfront_distribution(name, spec = {}) ⇒ Object



73
74
75
# File 'lib/terrafied/resource_shortcuts.rb', line 73

def aws_cloudfront_distribution(name, spec={})
  resource 'aws_cloudfront_distribution', name, spec
end

.aws_cloudfront_origin_access_identity(name, spec = {}) ⇒ Object



77
78
79
# File 'lib/terrafied/resource_shortcuts.rb', line 77

def aws_cloudfront_origin_access_identity(name, spec={})
  resource 'aws_cloudfront_origin_access_identity', name, spec
end

.aws_cloudtrail(name, spec = {}) ⇒ Object



81
82
83
84
85
# File 'lib/terrafied/resource_shortcuts.rb', line 81

def aws_cloudtrail(name, spec={})
  default_spec = { name: name }
  resource 'aws_cloudtrail', name,
           default_spec.deep_merge(spec)
end

.aws_cloudwatch_event_rule(name, spec = {}) ⇒ Object



87
88
89
90
91
# File 'lib/terrafied/resource_shortcuts.rb', line 87

def aws_cloudwatch_event_rule(name, spec={})
  default_spec = { name: name }
  resource 'aws_cloudwatch_event_rule', name,
           default_spec.deep_merge(spec)
end

.aws_cloudwatch_event_target(name, spec = {}) ⇒ Object



93
94
95
# File 'lib/terrafied/resource_shortcuts.rb', line 93

def aws_cloudwatch_event_target(name, spec={})
  resource 'aws_cloudwatch_event_target', name, spec
end

.aws_cloudwatch_log_group(name, spec = {}) ⇒ Object



97
98
99
100
101
# File 'lib/terrafied/resource_shortcuts.rb', line 97

def aws_cloudwatch_log_group(name, spec={})
  default_spec = { name: name }
  resource 'aws_cloudwatch_log_group', name,
           default_spec.deep_merge(spec)
end

.aws_cloudwatch_log_metric_filter(name, spec = {}) ⇒ Object



109
110
111
112
113
# File 'lib/terrafied/resource_shortcuts.rb', line 109

def aws_cloudwatch_log_metric_filter(name, spec={})
  default_spec = { name: name }
  resource 'aws_cloudwatch_log_metric_filter', name,
           default_spec.deep_merge(spec)
end

.aws_cloudwatch_log_subscription_filter(name, spec = {}) ⇒ Object



103
104
105
106
107
# File 'lib/terrafied/resource_shortcuts.rb', line 103

def aws_cloudwatch_log_subscription_filter(name, spec={})
  default_spec = { name: name }
  resource 'aws_cloudwatch_log_subscription_filter', name,
           default_spec.deep_merge(spec)
end

.aws_cloudwatch_metric_alarm(name, spec = {}) ⇒ Object



115
116
117
118
119
# File 'lib/terrafied/resource_shortcuts.rb', line 115

def aws_cloudwatch_metric_alarm(name, spec={})
  default_spec = { alarm_name: name }
  resource 'aws_cloudwatch_metric_alarm', name,
           default_spec.deep_merge(spec)
end

.aws_codecommit_repository(name, spec = {}) ⇒ Object



121
122
123
124
125
# File 'lib/terrafied/resource_shortcuts.rb', line 121

def aws_codecommit_repository(name, spec={})
  default_spec = { repository_name: name }
  resource 'aws_codecommit_repository', name,
           default_spec.deep_merge(spec)
end

.aws_codedeploy_app(name, spec = {}) ⇒ Object



127
128
129
130
131
# File 'lib/terrafied/resource_shortcuts.rb', line 127

def aws_codedeploy_app(name, spec={})
  default_spec = { name: name }
  resource 'aws_codedeploy_app', name,
           default_spec.deep_merge(spec)
end

.aws_codedeploy_deployment_group(name, spec = {}) ⇒ Object



133
134
135
136
137
# File 'lib/terrafied/resource_shortcuts.rb', line 133

def aws_codedeploy_deployment_group(name, spec={})
  default_spec = { app_name: name }
  resource 'aws_codedeploy_deployment_group', name,
           default_spec.deep_merge(spec)
end

.aws_customer_gateway(name, spec = {}) ⇒ Object



679
680
681
# File 'lib/terrafied/resource_shortcuts.rb', line 679

def aws_customer_gateway(name, spec={})
  resource 'aws_customer_gateway', name, spec
end

.aws_db_event_subscription(name, spec = {}) ⇒ Object



553
554
555
556
557
# File 'lib/terrafied/resource_shortcuts.rb', line 553

def aws_db_event_subscription(name, spec={})
  default_spec = { name: name }
  resource 'aws_db_event_subscription', name,
           default_spec.deep_merge(spec)
end

.aws_db_instance(name, spec = {}) ⇒ Object



549
550
551
# File 'lib/terrafied/resource_shortcuts.rb', line 549

def aws_db_instance(name, spec={})
  resource 'aws_db_instance', name, spec
end

.aws_db_option_group(name, spec = {}) ⇒ Object



559
560
561
562
563
# File 'lib/terrafied/resource_shortcuts.rb', line 559

def aws_db_option_group(name, spec={})
  default_spec = { name: name }
  resource 'aws_db_option_group', name,
           default_spec.deep_merge(spec)
end

.aws_db_parameter_group(name, spec = {}) ⇒ Object



565
566
567
568
569
570
571
# File 'lib/terrafied/resource_shortcuts.rb', line 565

def aws_db_parameter_group(name, spec={})
  default_spec = { name: name,
                   description: name
                 }
  resource 'aws_db_parameter_group', name,
           default_spec.deep_merge(spec)
end

.aws_db_security_group(name, spec = {}) ⇒ Object



573
574
575
576
577
578
579
# File 'lib/terrafied/resource_shortcuts.rb', line 573

def aws_db_security_group(name, spec={})
  default_spec = { name: name,
                   description: name
                 }
  resource 'aws_db_security_group', name,
           default_spec.deep_merge(spec)
end

.aws_db_subnet_group(name, spec = {}) ⇒ Object



581
582
583
584
585
586
587
# File 'lib/terrafied/resource_shortcuts.rb', line 581

def aws_db_subnet_group(name, spec={})
  default_spec = { name: name,
                   description: name
                 }
  resource 'aws_db_subnet_group', name,
           default_spec.deep_merge(spec)
end

.aws_default_network_acl(name, spec = {}) ⇒ Object



699
700
701
# File 'lib/terrafied/resource_shortcuts.rb', line 699

def aws_default_network_acl(name, spec={})
  resource 'aws_default_network_acl', name, spec
end

.aws_directory_service_directory(name, spec = {}) ⇒ Object



139
140
141
142
143
# File 'lib/terrafied/resource_shortcuts.rb', line 139

def aws_directory_service_directory(name, spec={})
  default_spec = { name: name }
  resource 'aws_directory_service_directory', name,
           default_spec.deep_merge(spec)
end

.aws_dynamodb_table(name, spec = {}) ⇒ Object



145
146
147
148
149
# File 'lib/terrafied/resource_shortcuts.rb', line 145

def aws_dynamodb_table(name, spec={})
  default_spec = { name: name }
  resource 'aws_dynamodb_table', name,
           default_spec.deep_merge(spec)
end

.aws_ebs_volume(name, spec = {}) ⇒ Object



201
202
203
# File 'lib/terrafied/resource_shortcuts.rb', line 201

def aws_ebs_volume(name, spec={})
  resource 'aws_ebs_volume', name, spec
end

.aws_ecr_repository(name, spec = {}) ⇒ Object



275
276
277
278
279
# File 'lib/terrafied/resource_shortcuts.rb', line 275

def aws_ecr_repository(name, spec={})
  default_spec = { name: name }
  resource 'aws_ecr_repository', name,
           default_spec.deep_merge(spec)
end

.aws_ecr_repository_policy(name, spec = {}) ⇒ Object



281
282
283
# File 'lib/terrafied/resource_shortcuts.rb', line 281

def aws_ecr_repository_policy(name, spec={})
  resource 'aws_ecr_repository_policy', name, spec
end

.aws_ecs_cluster(name, spec = {}) ⇒ Object



257
258
259
260
261
# File 'lib/terrafied/resource_shortcuts.rb', line 257

def aws_ecs_cluster(name, spec={})
  default_spec = { name: name }
  resource 'aws_ecs_cluster', name,
           default_spec.deep_merge(spec)
end

.aws_ecs_service(name, spec = {}) ⇒ Object



263
264
265
266
267
# File 'lib/terrafied/resource_shortcuts.rb', line 263

def aws_ecs_service(name, spec={})
  default_spec = { name: name }
  resource 'aws_ecs_service', name,
           default_spec.deep_merge(spec)
end

.aws_ecs_task_definition(name, spec = {}) ⇒ Object



269
270
271
272
273
# File 'lib/terrafied/resource_shortcuts.rb', line 269

def aws_ecs_task_definition(name, spec={})
  default_spec = { family: name }
  resource 'aws_ecs_task_definition', name,
           default_spec.deep_merge(spec)
end

.aws_efs_file_system(name, spec = {}) ⇒ Object



285
286
287
# File 'lib/terrafied/resource_shortcuts.rb', line 285

def aws_efs_file_system(name, spec={})
  resource 'aws_efs_file_system', name, spec
end

.aws_efs_mount_target(name, spec = {}) ⇒ Object



289
290
291
# File 'lib/terrafied/resource_shortcuts.rb', line 289

def aws_efs_mount_target(name, spec={})
  resource 'aws_efs_mount_target', name, spec
end

.aws_eip(name, spec = {}) ⇒ Object



209
210
211
# File 'lib/terrafied/resource_shortcuts.rb', line 209

def aws_eip(name, spec={})
  resource 'aws_eip', name, spec
end

.aws_eip_association(name, spec = {}) ⇒ Object



205
206
207
# File 'lib/terrafied/resource_shortcuts.rb', line 205

def aws_eip_association(name, spec={})
  resource 'aws_eip_association', name, spec
end

.aws_elastic_beanstalk_application(name, spec = {}) ⇒ Object



317
318
319
320
321
# File 'lib/terrafied/resource_shortcuts.rb', line 317

def aws_elastic_beanstalk_application(name, spec={})
  default_spec = { name: name }
  resource 'aws_elastic_beanstalk_application', name,
           default_spec.deep_merge(spec)
end

.aws_elastic_beanstalk_configuration_template(name, spec = {}) ⇒ Object



323
324
325
326
327
# File 'lib/terrafied/resource_shortcuts.rb', line 323

def aws_elastic_beanstalk_configuration_template(name, spec={})
  default_spec = { name: name }
  resource 'aws_elastic_beanstalk_configuration_template', name,
           default_spec.deep_merge(spec)
end

.aws_elastic_beanstalk_environment(name, spec = {}) ⇒ Object



329
330
331
332
333
# File 'lib/terrafied/resource_shortcuts.rb', line 329

def aws_elastic_beanstalk_environment(name, spec={})
  default_spec = { name: name }
  resource 'aws_elastic_beanstalk_environment', name,
           default_spec.deep_merge(spec)
end

.aws_elasticache_cluster(name, spec = {}) ⇒ Object



293
294
295
296
297
# File 'lib/terrafied/resource_shortcuts.rb', line 293

def aws_elasticache_cluster(name, spec={})
  default_spec = { cluster_id: name }
  resource 'aws_elasticache_cluster', name,
           default_spec.deep_merge(spec)
end

.aws_elasticache_parameter_group(name, spec = {}) ⇒ Object



299
300
301
302
303
# File 'lib/terrafied/resource_shortcuts.rb', line 299

def aws_elasticache_parameter_group(name, spec={})
  default_spec = { name: name }
  resource 'aws_elasticache_parameter_group', name,
           default_spec.deep_merge(spec)
end

.aws_elasticache_security_group(name, spec = {}) ⇒ Object



305
306
307
308
309
# File 'lib/terrafied/resource_shortcuts.rb', line 305

def aws_elasticache_security_group(name, spec={})
  default_spec = { name: name }
  resource 'aws_elasticache_security_group', name,
           default_spec.deep_merge(spec)
end

.aws_elasticache_subnet_group(name, spec = {}) ⇒ Object



311
312
313
314
315
# File 'lib/terrafied/resource_shortcuts.rb', line 311

def aws_elasticache_subnet_group(name, spec={})
  default_spec = { name: name }
  resource 'aws_elasticache_subnet_group', name,
           default_spec.deep_merge(spec)
end

.aws_elasticsearch_domain(name, spec = {}) ⇒ Object



335
336
337
338
339
# File 'lib/terrafied/resource_shortcuts.rb', line 335

def aws_elasticsearch_domain(name, spec={})
  default_spec = { domain_name: name }
  resource 'aws_elasticsearch_domain', name,
           default_spec.deep_merge(spec)
end

.aws_elb(name, spec = {}) ⇒ Object



213
214
215
216
217
# File 'lib/terrafied/resource_shortcuts.rb', line 213

def aws_elb(name, spec={})
  default_spec = { name: name }
  resource 'aws_elb', name,
           default_spec.deep_merge(spec)
end

.aws_flow_log(name, spec = {}) ⇒ Object



683
684
685
# File 'lib/terrafied/resource_shortcuts.rb', line 683

def aws_flow_log(name, spec={})
  resource 'aws_flow_log', name, spec
end

.aws_glacier_vault(name, spec = {}) ⇒ Object



341
342
343
344
345
# File 'lib/terrafied/resource_shortcuts.rb', line 341

def aws_glacier_vault(name, spec={})
  default_spec = { name: name }
  resource 'aws_glacier_vault', name,
           default_spec.deep_merge(spec)
end

.aws_iam_access_key(name, spec = {}) ⇒ Object



347
348
349
# File 'lib/terrafied/resource_shortcuts.rb', line 347

def aws_iam_access_key(name, spec={})
  resource 'aws_iam_access_key', name, spec
end

.aws_iam_account_password_policy(name, spec = {}) ⇒ Object



351
352
353
# File 'lib/terrafied/resource_shortcuts.rb', line 351

def (name, spec={})
  resource 'aws_iam_account_password_policy', name, spec
end

.aws_iam_group(name, spec = {}) ⇒ Object



355
356
357
358
359
# File 'lib/terrafied/resource_shortcuts.rb', line 355

def aws_iam_group(name, spec={})
  default_spec = { name: name }
  resource 'aws_iam_group', name,
           default_spec.deep_merge(spec)
end

.aws_iam_group_membership(name, spec = {}) ⇒ Object



367
368
369
370
371
# File 'lib/terrafied/resource_shortcuts.rb', line 367

def aws_iam_group_membership(name, spec={})
  default_spec = { name: name }
  resource 'aws_iam_group_membership', name,
           default_spec.deep_merge(spec)
end

.aws_iam_group_policy(name, spec = {}) ⇒ Object



361
362
363
364
365
# File 'lib/terrafied/resource_shortcuts.rb', line 361

def aws_iam_group_policy(name, spec={})
  default_spec = { name: name }
  resource 'aws_iam_group_policy', name,
           default_spec.deep_merge(spec)
end

.aws_iam_instance_profile(name, spec = {}) ⇒ Object



373
374
375
376
377
# File 'lib/terrafied/resource_shortcuts.rb', line 373

def aws_iam_instance_profile(name, spec={})
  default_spec = { name: name }
  resource 'aws_iam_instance_profile', name,
           default_spec.deep_merge(spec)
end

.aws_iam_policy(name, spec = {}) ⇒ Object



379
380
381
382
383
# File 'lib/terrafied/resource_shortcuts.rb', line 379

def aws_iam_policy(name, spec={})
  default_spec = { name: name }
  resource 'aws_iam_policy', name,
           default_spec.deep_merge(spec)
end

.aws_iam_policy_attachment(name, spec = {}) ⇒ Object



385
386
387
388
389
# File 'lib/terrafied/resource_shortcuts.rb', line 385

def aws_iam_policy_attachment(name, spec={})
  default_spec = { name: name }
  resource 'aws_iam_policy_attachment', name,
           default_spec.deep_merge(spec)
end

.aws_iam_role(name, spec = {}) ⇒ Object



391
392
393
394
395
# File 'lib/terrafied/resource_shortcuts.rb', line 391

def aws_iam_role(name, spec={})
  default_spec = { name: name }
  resource 'aws_iam_role', name,
           default_spec.deep_merge(spec)
end

.aws_iam_role_policy(name, spec = {}) ⇒ Object



397
398
399
400
401
# File 'lib/terrafied/resource_shortcuts.rb', line 397

def aws_iam_role_policy(name, spec={})
  default_spec = { name: name }
  resource 'aws_iam_role_policy', name,
           default_spec.deep_merge(spec)
end

.aws_iam_saml_provider(name, spec = {}) ⇒ Object



403
404
405
406
407
# File 'lib/terrafied/resource_shortcuts.rb', line 403

def aws_iam_saml_provider(name, spec={})
  default_spec = { name: name }
  resource 'aws_iam_saml_provider', name,
           default_spec.deep_merge(spec)
end

.aws_iam_server_certificate(name, spec = {}) ⇒ Object



409
410
411
412
413
# File 'lib/terrafied/resource_shortcuts.rb', line 409

def aws_iam_server_certificate(name, spec={})
  default_spec = { name: name }
  resource 'aws_iam_server_certificate', name,
           default_spec.deep_merge(spec)
end

.aws_iam_user(name, spec = {}) ⇒ Object



415
416
417
418
419
# File 'lib/terrafied/resource_shortcuts.rb', line 415

def aws_iam_user(name, spec={})
  default_spec = { name: name }
  resource 'aws_iam_user', name,
           default_spec.deep_merge(spec)
end

.aws_iam_user_policy(name, spec = {}) ⇒ Object



421
422
423
424
425
# File 'lib/terrafied/resource_shortcuts.rb', line 421

def aws_iam_user_policy(name, spec={})
  default_spec = { name: name }
  resource 'aws_iam_user_policy', name,
           default_spec.deep_merge(spec)
end

.aws_iam_user_ssh_key(name, spec = {}) ⇒ Object



427
428
429
430
431
# File 'lib/terrafied/resource_shortcuts.rb', line 427

def aws_iam_user_ssh_key(name, spec={})
  default_spec = { username: name }
  resource 'aws_iam_user_ssh_key', name,
           default_spec.deep_merge(spec)
end

.aws_instance(name, spec = {}) ⇒ Object



219
220
221
# File 'lib/terrafied/resource_shortcuts.rb', line 219

def aws_instance(name, spec={})
  resource 'aws_instance', name, spec
end

.aws_internet_gateway(name, spec = {}) ⇒ Object



687
688
689
# File 'lib/terrafied/resource_shortcuts.rb', line 687

def aws_internet_gateway(name, spec={})
  resource 'aws_internet_gateway', name, spec
end

.aws_key_pair(name, spec = {}) ⇒ Object



223
224
225
226
227
# File 'lib/terrafied/resource_shortcuts.rb', line 223

def aws_key_pair(name, spec={})
  default_spec = { key_name: name }
  resource 'aws_key_pair', name,
           default_spec.deep_merge(spec)
end

.aws_kinesis_firehose_delivery_stream(name, spec = {}) ⇒ Object



439
440
441
442
443
# File 'lib/terrafied/resource_shortcuts.rb', line 439

def aws_kinesis_firehose_delivery_stream(name, spec={})
  default_spec = { name: name }
  resource 'aws_kinesis_firehose_delivery_stream', name,
           default_spec.deep_merge(spec)
end

.aws_kinesis_stream(name, spec = {}) ⇒ Object



433
434
435
436
437
# File 'lib/terrafied/resource_shortcuts.rb', line 433

def aws_kinesis_stream(name, spec={})
  default_spec = { name: name }
  resource 'aws_kinesis_stream', name,
           default_spec.deep_merge(spec)
end

.aws_kms_alias(name, spec = {}) ⇒ Object



449
450
451
452
453
# File 'lib/terrafied/resource_shortcuts.rb', line 449

def aws_kms_alias(name, spec={})
  default_spec = { name: name }
  resource 'aws_kms_alias', name,
           default_spec.deep_merge(spec)
end

.aws_kms_key(name, spec = {}) ⇒ Object



445
446
447
# File 'lib/terrafied/resource_shortcuts.rb', line 445

def aws_kms_key(name, spec={})
  resource 'aws_kms_key', name, spec
end

.aws_lambda_alias(name, spec = {}) ⇒ Object



455
456
457
458
459
# File 'lib/terrafied/resource_shortcuts.rb', line 455

def aws_lambda_alias(name, spec={})
  default_spec = { name: name }
  resource 'aws_lambda_alias', name,
           default_spec.deep_merge(spec)
end

.aws_lambda_event_source_mapping(name, spec = {}) ⇒ Object



465
466
467
# File 'lib/terrafied/resource_shortcuts.rb', line 465

def aws_lambda_event_source_mapping(name, spec={})
  resource 'aws_lambda_event_source_mapping', name, spec
end

.aws_lambda_function(name, spec = {}) ⇒ Object



461
462
463
# File 'lib/terrafied/resource_shortcuts.rb', line 461

def aws_lambda_function(name, spec={})
  resource 'aws_lambda_function', name, spec
end

.aws_lambda_permission(name, spec = {}) ⇒ Object



469
470
471
# File 'lib/terrafied/resource_shortcuts.rb', line 469

def aws_lambda_permission(name, spec={})
  resource 'aws_lambda_permission', name, spec
end

.aws_launch_configuration(name, spec = {}) ⇒ Object



229
230
231
# File 'lib/terrafied/resource_shortcuts.rb', line 229

def aws_launch_configuration(name, spec={})
  resource 'aws_launch_configuration', name, spec
end


233
234
235
236
237
# File 'lib/terrafied/resource_shortcuts.rb', line 233

def aws_lb_cookie_stickiness_policy(name, spec={})
  default_spec = { name: name }
  resource 'aws_lb_cookie_stickiness_policy', name,
           default_spec.deep_merge(spec)
end

.aws_main_route_table_association(name, spec = {}) ⇒ Object



691
692
693
# File 'lib/terrafied/resource_shortcuts.rb', line 691

def aws_main_route_table_association(name, spec={})
  resource 'aws_main_route_table_association', name, spec
end

.aws_nat_gateway(name, spec = {}) ⇒ Object



695
696
697
# File 'lib/terrafied/resource_shortcuts.rb', line 695

def aws_nat_gateway(name, spec={})
  resource 'aws_nat_gateway', name, spec
end

.aws_network_acl(name, spec = {}) ⇒ Object



703
704
705
# File 'lib/terrafied/resource_shortcuts.rb', line 703

def aws_network_acl(name, spec={})
  resource 'aws_network_acl', name, spec
end

.aws_network_acl_rule(name, spec = {}) ⇒ Object



707
708
709
# File 'lib/terrafied/resource_shortcuts.rb', line 707

def aws_network_acl_rule(name, spec={})
  resource 'aws_network_acl_rule', name, spec
end

.aws_network_interface(name, spec = {}) ⇒ Object



711
712
713
# File 'lib/terrafied/resource_shortcuts.rb', line 711

def aws_network_interface(name, spec={})
  resource 'aws_network_interface', name, spec
end

.aws_opsworks_application(name, spec = {}) ⇒ Object



543
544
545
546
547
# File 'lib/terrafied/resource_shortcuts.rb', line 543

def aws_opsworks_application(name, spec={})
  default_spec = { name: name }
  resource 'aws_opsworks_application', name,
           default_spec.deep_merge(spec)
end

.aws_opsworks_custom_layer(name, spec = {}) ⇒ Object



473
474
475
476
477
# File 'lib/terrafied/resource_shortcuts.rb', line 473

def aws_opsworks_custom_layer(name, spec={})
  default_spec = { name: name }
  resource 'aws_opsworks_custom_layer', name,
           default_spec.deep_merge(spec)
end

.aws_opsworks_ganglia_layer(name, spec = {}) ⇒ Object



479
480
481
482
483
# File 'lib/terrafied/resource_shortcuts.rb', line 479

def aws_opsworks_ganglia_layer(name, spec={})
  default_spec = { name: name }
  resource 'aws_opsworks_ganglia_layer', name,
           default_spec.deep_merge(spec)
end

.aws_opsworks_haproxy_layer(name, spec = {}) ⇒ Object



485
486
487
488
489
# File 'lib/terrafied/resource_shortcuts.rb', line 485

def aws_opsworks_haproxy_layer(name, spec={})
  default_spec = { name: name }
  resource 'aws_opsworks_haproxy_layer', name,
           default_spec.deep_merge(spec)
end

.aws_opsworks_instance(name, spec = {}) ⇒ Object



491
492
493
# File 'lib/terrafied/resource_shortcuts.rb', line 491

def aws_opsworks_instance(name, spec={})
  resource 'aws_opsworks_instance', name, spec
end

.aws_opsworks_java_app_layer(name, spec = {}) ⇒ Object



495
496
497
498
499
# File 'lib/terrafied/resource_shortcuts.rb', line 495

def aws_opsworks_java_app_layer(name, spec={})
  default_spec = { name: name }
  resource 'aws_opsworks_java_app_layer', name,
           default_spec.deep_merge(spec)
end

.aws_opsworks_memcached_layer(name, spec = {}) ⇒ Object



501
502
503
504
505
# File 'lib/terrafied/resource_shortcuts.rb', line 501

def aws_opsworks_memcached_layer(name, spec={})
  default_spec = { name: name }
  resource 'aws_opsworks_memcached_layer', name,
           default_spec.deep_merge(spec)
end

.aws_opsworks_mysql_layer(name, spec = {}) ⇒ Object



507
508
509
510
511
# File 'lib/terrafied/resource_shortcuts.rb', line 507

def aws_opsworks_mysql_layer(name, spec={})
  default_spec = { name: name }
  resource 'aws_opsworks_mysql_layer', name,
           default_spec.deep_merge(spec)
end

.aws_opsworks_nodejs_app_layer(name, spec = {}) ⇒ Object



513
514
515
516
517
# File 'lib/terrafied/resource_shortcuts.rb', line 513

def aws_opsworks_nodejs_app_layer(name, spec={})
  default_spec = { name: name }
  resource 'aws_opsworks_nodejs_app_layer', name,
           default_spec.deep_merge(spec)
end

.aws_opsworks_php_app_layer(name, spec = {}) ⇒ Object



519
520
521
522
523
# File 'lib/terrafied/resource_shortcuts.rb', line 519

def aws_opsworks_php_app_layer(name, spec={})
  default_spec = { name: name }
  resource 'aws_opsworks_php_app_layer', name,
           default_spec.deep_merge(spec)
end

.aws_opsworks_rails_app_layer(name, spec = {}) ⇒ Object



525
526
527
528
529
# File 'lib/terrafied/resource_shortcuts.rb', line 525

def aws_opsworks_rails_app_layer(name, spec={})
  default_spec = { name: name }
  resource 'aws_opsworks_rails_app_layer', name,
           default_spec.deep_merge(spec)
end

.aws_opsworks_stack(name, spec = {}) ⇒ Object



531
532
533
534
535
# File 'lib/terrafied/resource_shortcuts.rb', line 531

def aws_opsworks_stack(name, spec={})
  default_spec = { name: name }
  resource 'aws_opsworks_stack', name,
           default_spec.deep_merge(spec)
end

.aws_opsworks_static_web_layer(name, spec = {}) ⇒ Object



537
538
539
540
541
# File 'lib/terrafied/resource_shortcuts.rb', line 537

def aws_opsworks_static_web_layer(name, spec={})
  default_spec = { name: name }
  resource 'aws_opsworks_static_web_layer', name,
           default_spec.deep_merge(spec)
end

.aws_placement_group(name, spec = {}) ⇒ Object



239
240
241
242
243
# File 'lib/terrafied/resource_shortcuts.rb', line 239

def aws_placement_group(name, spec={})
  default_spec = { name: name }
  resource 'aws_placement_group', name,
           default_spec.deep_merge(spec)
end

.aws_proxy_protocol_policy(name, spec = {}) ⇒ Object



245
246
247
# File 'lib/terrafied/resource_shortcuts.rb', line 245

def aws_proxy_protocol_policy(name, spec={})
  resource 'aws_proxy_protocol_policy', name, spec
end

.aws_rds_cluster(name, spec = {}) ⇒ Object



589
590
591
592
593
# File 'lib/terrafied/resource_shortcuts.rb', line 589

def aws_rds_cluster(name, spec={})
  default_spec = { cluster_identifier: name.downcase }
  resource 'aws_rds_cluster', name,
           default_spec.deep_merge(spec)
end

.aws_rds_cluster_instance(name, spec = {}) ⇒ Object



595
596
597
# File 'lib/terrafied/resource_shortcuts.rb', line 595

def aws_rds_cluster_instance(name, spec={})
  resource 'aws_rds_cluster_instance', name, spec
end

.aws_redshift_cluster(name, spec = {}) ⇒ Object



599
600
601
# File 'lib/terrafied/resource_shortcuts.rb', line 599

def aws_redshift_cluster(name, spec={})
  resource 'aws_redshift_cluster', name, spec
end

.aws_redshift_parameter_group(name, spec = {}) ⇒ Object



603
604
605
606
607
# File 'lib/terrafied/resource_shortcuts.rb', line 603

def aws_redshift_parameter_group(name, spec={})
  default_spec = { name: name }
  resource 'aws_redshift_parameter_group', name,
           default_spec.deep_merge(spec)
end

.aws_redshift_security_group(name, spec = {}) ⇒ Object



609
610
611
612
613
614
615
# File 'lib/terrafied/resource_shortcuts.rb', line 609

def aws_redshift_security_group(name, spec={})
  default_spec = { name: name,
                   description: name
                 }
  resource 'aws_redshift_security_group', name,
           default_spec.deep_merge(spec)
end

.aws_redshift_subnet_group(name, spec = {}) ⇒ Object



617
618
619
620
621
622
623
# File 'lib/terrafied/resource_shortcuts.rb', line 617

def aws_redshift_subnet_group(name, spec={})
  default_spec = { name: name,
                   description: name
                 }
  resource 'aws_redshift_subnet_group', name,
           default_spec.deep_merge(spec)
end

.aws_route(name, spec = {}) ⇒ Object



715
716
717
# File 'lib/terrafied/resource_shortcuts.rb', line 715

def aws_route(name, spec={})
  resource 'aws_route', name, spec
end

.aws_route53_delegation_set(name, spec = {}) ⇒ Object



625
626
627
# File 'lib/terrafied/resource_shortcuts.rb', line 625

def aws_route53_delegation_set(name, spec={})
  resource 'aws_route53_delegation_set', name, spec
end

.aws_route53_health_check(name, spec = {}) ⇒ Object



629
630
631
# File 'lib/terrafied/resource_shortcuts.rb', line 629

def aws_route53_health_check(name, spec={})
  resource 'aws_route53_health_check', name, spec
end

.aws_route53_record(name, spec = {}) ⇒ Object



633
634
635
636
637
# File 'lib/terrafied/resource_shortcuts.rb', line 633

def aws_route53_record(name, spec={})
  default_spec = { name: name }
  resource 'aws_route53_record', name,
           default_spec.deep_merge(spec)
end

.aws_route53_zone(name, spec = {}) ⇒ Object



639
640
641
642
643
# File 'lib/terrafied/resource_shortcuts.rb', line 639

def aws_route53_zone(name, spec={})
  default_spec = { name: name }
  resource 'aws_route53_zone', name,
           default_spec.deep_merge(spec)
end

.aws_route53_zone_association(name, spec = {}) ⇒ Object



645
646
647
# File 'lib/terrafied/resource_shortcuts.rb', line 645

def aws_route53_zone_association(name, spec={})
  resource 'aws_route53_zone_association', name, spec
end

.aws_route_table(name, spec = {}) ⇒ Object



719
720
721
# File 'lib/terrafied/resource_shortcuts.rb', line 719

def aws_route_table(name, spec={})
  resource 'aws_route_table', name, spec
end

.aws_route_table_association(name, spec = {}) ⇒ Object



723
724
725
# File 'lib/terrafied/resource_shortcuts.rb', line 723

def aws_route_table_association(name, spec={})
  resource 'aws_route_table_association', name, spec
end

.aws_s3_bucket(name, spec = {}) ⇒ Object



649
650
651
652
653
# File 'lib/terrafied/resource_shortcuts.rb', line 649

def aws_s3_bucket(name, spec={})
  default_spec = { bucket: name }
  resource 'aws_s3_bucket', name,
           default_spec.deep_merge(spec)
end

.aws_s3_bucket_notification(name, spec = {}) ⇒ Object



659
660
661
# File 'lib/terrafied/resource_shortcuts.rb', line 659

def aws_s3_bucket_notification(name, spec={})
  resource 'aws_s3_bucket_notification', name, spec
end

.aws_s3_bucket_object(name, spec = {}) ⇒ Object



655
656
657
# File 'lib/terrafied/resource_shortcuts.rb', line 655

def aws_s3_bucket_object(name, spec={})
  resource 'aws_s3_bucket_object', name, spec
end

.aws_security_group(name, spec = {}) ⇒ Object



727
728
729
730
731
732
733
# File 'lib/terrafied/resource_shortcuts.rb', line 727

def aws_security_group(name, spec={})
  default_spec = { name: name,
                   tags: { Name: name }
                 }
  resource('aws_security_group', name,
           default_spec.deep_merge(spec))
end

.aws_security_group_rule(name, spec = {}) ⇒ Object



735
736
737
# File 'lib/terrafied/resource_shortcuts.rb', line 735

def aws_security_group_rule(name, spec={})
  resource 'aws_security_group_rule', name, spec
end

.aws_sns_topic(name, spec = {}) ⇒ Object



663
664
665
666
667
# File 'lib/terrafied/resource_shortcuts.rb', line 663

def aws_sns_topic(name, spec={})
  default_spec = { name: name }
  resource 'aws_sns_topic', name,
           default_spec.deep_merge(spec)
end

.aws_sns_topic_subscription(name, spec = {}) ⇒ Object



669
670
671
# File 'lib/terrafied/resource_shortcuts.rb', line 669

def aws_sns_topic_subscription(name, spec={})
  resource 'aws_sns_topic_subscription', name, spec
end

.aws_spot_instance_request(name, spec = {}) ⇒ Object



249
250
251
# File 'lib/terrafied/resource_shortcuts.rb', line 249

def aws_spot_instance_request(name, spec={})
  resource 'aws_spot_instance_request', name, spec
end

.aws_sqs_queue(name, spec = {}) ⇒ Object



673
674
675
676
677
# File 'lib/terrafied/resource_shortcuts.rb', line 673

def aws_sqs_queue(name, spec={})
  default_spec = { name: name }
  resource 'aws_sqs_queue', name,
           default_spec.deep_merge(spec)
end

.aws_subnet(name, spec = {}) ⇒ Object



739
740
741
# File 'lib/terrafied/resource_shortcuts.rb', line 739

def aws_subnet(name, spec={})
  resource 'aws_subnet', name, spec
end

.aws_volume_attachment(name, spec = {}) ⇒ Object



253
254
255
# File 'lib/terrafied/resource_shortcuts.rb', line 253

def aws_volume_attachment(name, spec={})
  resource 'aws_volume_attachment', name, spec
end

.aws_vpc(name, spec = {}) ⇒ Object



743
744
745
# File 'lib/terrafied/resource_shortcuts.rb', line 743

def aws_vpc(name, spec={})
  resource 'aws_vpc', name, spec
end

.aws_vpc_dhcp_options(name, spec = {}) ⇒ Object



747
748
749
# File 'lib/terrafied/resource_shortcuts.rb', line 747

def aws_vpc_dhcp_options(name, spec={})
 resource 'aws_vpc_dhcp_options', name, spec
end

.aws_vpc_dhcp_options_association(name, spec = {}) ⇒ Object



751
752
753
# File 'lib/terrafied/resource_shortcuts.rb', line 751

def aws_vpc_dhcp_options_association(name, spec={})
  resource 'aws_vpc_dhcp_options_association', name, spec
end

.aws_vpc_endpoint(name, spec = {}) ⇒ Object



755
756
757
# File 'lib/terrafied/resource_shortcuts.rb', line 755

def aws_vpc_endpoint(name, spec={})
  resource 'aws_vpc_endpoint', name, spec
end

.aws_vpc_peering_connection(name, spec = {}) ⇒ Object



759
760
761
# File 'lib/terrafied/resource_shortcuts.rb', line 759

def aws_vpc_peering_connection(name, spec={})
  resource 'aws_vpc_peering_connection', name, spec
end

.aws_vpn_connection(name, spec = {}) ⇒ Object



763
764
765
# File 'lib/terrafied/resource_shortcuts.rb', line 763

def aws_vpn_connection(name, spec={})
  resource 'aws_vpn_connection', name, spec
end

.aws_vpn_connection_route(name, spec = {}) ⇒ Object



767
768
769
# File 'lib/terrafied/resource_shortcuts.rb', line 767

def aws_vpn_connection_route(name, spec={})
  resource 'aws_vpn_connection_route', name, spec
end

.aws_vpn_gateway(name, spec = {}) ⇒ Object



771
772
773
# File 'lib/terrafied/resource_shortcuts.rb', line 771

def aws_vpn_gateway(name, spec={})
  resource 'aws_vpn_gateway', name, spec
end

.id_of(type, name) ⇒ Object



18
19
20
# File 'lib/terrafied/builder.rb', line 18

def id_of(type,name)
  "${#{type}.#{name}.id}"
end

.output_of(type, name, *values) ⇒ Object



22
23
24
# File 'lib/terrafied/builder.rb', line 22

def output_of(type, name, *values)
  "${#{type}.#{name}.#{values.join(".")}}"
end

.provider(name, spec = {}) ⇒ Object



6
7
8
# File 'lib/terrafied/builder.rb', line 6

def provider(name, spec={})
  @output["provider"][name.to_s] = spec
end

.resource(type, name, spec = {}) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/terrafied/builder.rb', line 10

def resource(type, name, spec={})
  @output["resource"][type.to_s] ||= {}
  if @output["resource"][type.to_s][name.to_s]
    throw "Tried to create a resource of type #{type} called '#{name}' when one already exists"
  end
  @output["resource"][type.to_s][name.to_s] = spec
end

.use_resource_shortcuts!Object



32
33
34
# File 'lib/terrafied/builder.rb', line 32

def use_resource_shortcuts!
  require_relative 'resource_shortcuts'
end