-
Notifications
You must be signed in to change notification settings - Fork 155
/
memcachedLayer.ts
316 lines (310 loc) · 14.9 KB
/
memcachedLayer.ts
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "../utilities";
/**
* Provides an OpsWorks memcached layer resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const cache = new aws.opsworks.MemcachedLayer("cache", {
* stackId: aws_opsworks_stack_main.id,
* });
* ```
*/
export class MemcachedLayer extends pulumi.CustomResource {
/**
* Get an existing MemcachedLayer resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MemcachedLayerState, opts?: pulumi.CustomResourceOptions): MemcachedLayer {
return new MemcachedLayer(name, <any>state, { ...opts, id: id });
}
/**
* Amount of memory to allocate for the cache on each instance, in megabytes. Defaults to 512MB.
*/
public readonly allocatedMemory!: pulumi.Output<number | undefined>;
/**
* Whether to automatically assign an elastic IP address to the layer's instances.
*/
public readonly autoAssignElasticIps!: pulumi.Output<boolean | undefined>;
/**
* For stacks belonging to a VPC, whether to automatically assign a public IP address to each of the layer's instances.
*/
public readonly autoAssignPublicIps!: pulumi.Output<boolean | undefined>;
/**
* Whether to enable auto-healing for the layer.
*/
public readonly autoHealing!: pulumi.Output<boolean | undefined>;
public readonly customConfigureRecipes!: pulumi.Output<string[] | undefined>;
public readonly customDeployRecipes!: pulumi.Output<string[] | undefined>;
/**
* The ARN of an IAM profile that will be used for the layer's instances.
*/
public readonly customInstanceProfileArn!: pulumi.Output<string | undefined>;
/**
* Custom JSON attributes to apply to the layer.
*/
public readonly customJson!: pulumi.Output<string | undefined>;
/**
* Ids for a set of security groups to apply to the layer's instances.
*/
public readonly customSecurityGroupIds!: pulumi.Output<string[] | undefined>;
public readonly customSetupRecipes!: pulumi.Output<string[] | undefined>;
public readonly customShutdownRecipes!: pulumi.Output<string[] | undefined>;
public readonly customUndeployRecipes!: pulumi.Output<string[] | undefined>;
/**
* Whether to enable Elastic Load Balancing connection draining.
*/
public readonly drainElbOnShutdown!: pulumi.Output<boolean | undefined>;
/**
* `ebs_volume` blocks, as described below, will each create an EBS volume and connect it to the layer's instances.
*/
public readonly ebsVolumes!: pulumi.Output<{ iops?: number, mountPoint: string, numberOfDisks: number, raidLevel?: string, size: number, type?: string }[] | undefined>;
/**
* Name of an Elastic Load Balancer to attach to this layer
*/
public readonly elasticLoadBalancer!: pulumi.Output<string | undefined>;
/**
* Whether to install OS and package updates on each instance when it boots.
*/
public readonly installUpdatesOnBoot!: pulumi.Output<boolean | undefined>;
/**
* The time, in seconds, that OpsWorks will wait for Chef to complete after triggering the Shutdown event.
*/
public readonly instanceShutdownTimeout!: pulumi.Output<number | undefined>;
/**
* A human-readable name for the layer.
*/
public readonly name!: pulumi.Output<string>;
/**
* The id of the stack the layer will belong to.
*/
public readonly stackId!: pulumi.Output<string>;
/**
* Names of a set of system packages to install on the layer's instances.
*/
public readonly systemPackages!: pulumi.Output<string[] | undefined>;
/**
* Whether to use EBS-optimized instances.
*/
public readonly useEbsOptimizedInstances!: pulumi.Output<boolean | undefined>;
/**
* Create a MemcachedLayer resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: MemcachedLayerArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: MemcachedLayerArgs | MemcachedLayerState, opts?: pulumi.CustomResourceOptions) {
let inputs: pulumi.Inputs = {};
if (opts && opts.id) {
const state = argsOrState as MemcachedLayerState | undefined;
inputs["allocatedMemory"] = state ? state.allocatedMemory : undefined;
inputs["autoAssignElasticIps"] = state ? state.autoAssignElasticIps : undefined;
inputs["autoAssignPublicIps"] = state ? state.autoAssignPublicIps : undefined;
inputs["autoHealing"] = state ? state.autoHealing : undefined;
inputs["customConfigureRecipes"] = state ? state.customConfigureRecipes : undefined;
inputs["customDeployRecipes"] = state ? state.customDeployRecipes : undefined;
inputs["customInstanceProfileArn"] = state ? state.customInstanceProfileArn : undefined;
inputs["customJson"] = state ? state.customJson : undefined;
inputs["customSecurityGroupIds"] = state ? state.customSecurityGroupIds : undefined;
inputs["customSetupRecipes"] = state ? state.customSetupRecipes : undefined;
inputs["customShutdownRecipes"] = state ? state.customShutdownRecipes : undefined;
inputs["customUndeployRecipes"] = state ? state.customUndeployRecipes : undefined;
inputs["drainElbOnShutdown"] = state ? state.drainElbOnShutdown : undefined;
inputs["ebsVolumes"] = state ? state.ebsVolumes : undefined;
inputs["elasticLoadBalancer"] = state ? state.elasticLoadBalancer : undefined;
inputs["installUpdatesOnBoot"] = state ? state.installUpdatesOnBoot : undefined;
inputs["instanceShutdownTimeout"] = state ? state.instanceShutdownTimeout : undefined;
inputs["name"] = state ? state.name : undefined;
inputs["stackId"] = state ? state.stackId : undefined;
inputs["systemPackages"] = state ? state.systemPackages : undefined;
inputs["useEbsOptimizedInstances"] = state ? state.useEbsOptimizedInstances : undefined;
} else {
const args = argsOrState as MemcachedLayerArgs | undefined;
if (!args || args.stackId === undefined) {
throw new Error("Missing required property 'stackId'");
}
inputs["allocatedMemory"] = args ? args.allocatedMemory : undefined;
inputs["autoAssignElasticIps"] = args ? args.autoAssignElasticIps : undefined;
inputs["autoAssignPublicIps"] = args ? args.autoAssignPublicIps : undefined;
inputs["autoHealing"] = args ? args.autoHealing : undefined;
inputs["customConfigureRecipes"] = args ? args.customConfigureRecipes : undefined;
inputs["customDeployRecipes"] = args ? args.customDeployRecipes : undefined;
inputs["customInstanceProfileArn"] = args ? args.customInstanceProfileArn : undefined;
inputs["customJson"] = args ? args.customJson : undefined;
inputs["customSecurityGroupIds"] = args ? args.customSecurityGroupIds : undefined;
inputs["customSetupRecipes"] = args ? args.customSetupRecipes : undefined;
inputs["customShutdownRecipes"] = args ? args.customShutdownRecipes : undefined;
inputs["customUndeployRecipes"] = args ? args.customUndeployRecipes : undefined;
inputs["drainElbOnShutdown"] = args ? args.drainElbOnShutdown : undefined;
inputs["ebsVolumes"] = args ? args.ebsVolumes : undefined;
inputs["elasticLoadBalancer"] = args ? args.elasticLoadBalancer : undefined;
inputs["installUpdatesOnBoot"] = args ? args.installUpdatesOnBoot : undefined;
inputs["instanceShutdownTimeout"] = args ? args.instanceShutdownTimeout : undefined;
inputs["name"] = args ? args.name : undefined;
inputs["stackId"] = args ? args.stackId : undefined;
inputs["systemPackages"] = args ? args.systemPackages : undefined;
inputs["useEbsOptimizedInstances"] = args ? args.useEbsOptimizedInstances : undefined;
}
super("aws:opsworks/memcachedLayer:MemcachedLayer", name, inputs, opts);
}
}
/**
* Input properties used for looking up and filtering MemcachedLayer resources.
*/
export interface MemcachedLayerState {
/**
* Amount of memory to allocate for the cache on each instance, in megabytes. Defaults to 512MB.
*/
readonly allocatedMemory?: pulumi.Input<number>;
/**
* Whether to automatically assign an elastic IP address to the layer's instances.
*/
readonly autoAssignElasticIps?: pulumi.Input<boolean>;
/**
* For stacks belonging to a VPC, whether to automatically assign a public IP address to each of the layer's instances.
*/
readonly autoAssignPublicIps?: pulumi.Input<boolean>;
/**
* Whether to enable auto-healing for the layer.
*/
readonly autoHealing?: pulumi.Input<boolean>;
readonly customConfigureRecipes?: pulumi.Input<pulumi.Input<string>[]>;
readonly customDeployRecipes?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The ARN of an IAM profile that will be used for the layer's instances.
*/
readonly customInstanceProfileArn?: pulumi.Input<string>;
/**
* Custom JSON attributes to apply to the layer.
*/
readonly customJson?: pulumi.Input<string>;
/**
* Ids for a set of security groups to apply to the layer's instances.
*/
readonly customSecurityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
readonly customSetupRecipes?: pulumi.Input<pulumi.Input<string>[]>;
readonly customShutdownRecipes?: pulumi.Input<pulumi.Input<string>[]>;
readonly customUndeployRecipes?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Whether to enable Elastic Load Balancing connection draining.
*/
readonly drainElbOnShutdown?: pulumi.Input<boolean>;
/**
* `ebs_volume` blocks, as described below, will each create an EBS volume and connect it to the layer's instances.
*/
readonly ebsVolumes?: pulumi.Input<pulumi.Input<{ iops?: pulumi.Input<number>, mountPoint: pulumi.Input<string>, numberOfDisks: pulumi.Input<number>, raidLevel?: pulumi.Input<string>, size: pulumi.Input<number>, type?: pulumi.Input<string> }>[]>;
/**
* Name of an Elastic Load Balancer to attach to this layer
*/
readonly elasticLoadBalancer?: pulumi.Input<string>;
/**
* Whether to install OS and package updates on each instance when it boots.
*/
readonly installUpdatesOnBoot?: pulumi.Input<boolean>;
/**
* The time, in seconds, that OpsWorks will wait for Chef to complete after triggering the Shutdown event.
*/
readonly instanceShutdownTimeout?: pulumi.Input<number>;
/**
* A human-readable name for the layer.
*/
readonly name?: pulumi.Input<string>;
/**
* The id of the stack the layer will belong to.
*/
readonly stackId?: pulumi.Input<string>;
/**
* Names of a set of system packages to install on the layer's instances.
*/
readonly systemPackages?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Whether to use EBS-optimized instances.
*/
readonly useEbsOptimizedInstances?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a MemcachedLayer resource.
*/
export interface MemcachedLayerArgs {
/**
* Amount of memory to allocate for the cache on each instance, in megabytes. Defaults to 512MB.
*/
readonly allocatedMemory?: pulumi.Input<number>;
/**
* Whether to automatically assign an elastic IP address to the layer's instances.
*/
readonly autoAssignElasticIps?: pulumi.Input<boolean>;
/**
* For stacks belonging to a VPC, whether to automatically assign a public IP address to each of the layer's instances.
*/
readonly autoAssignPublicIps?: pulumi.Input<boolean>;
/**
* Whether to enable auto-healing for the layer.
*/
readonly autoHealing?: pulumi.Input<boolean>;
readonly customConfigureRecipes?: pulumi.Input<pulumi.Input<string>[]>;
readonly customDeployRecipes?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The ARN of an IAM profile that will be used for the layer's instances.
*/
readonly customInstanceProfileArn?: pulumi.Input<string>;
/**
* Custom JSON attributes to apply to the layer.
*/
readonly customJson?: pulumi.Input<string>;
/**
* Ids for a set of security groups to apply to the layer's instances.
*/
readonly customSecurityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
readonly customSetupRecipes?: pulumi.Input<pulumi.Input<string>[]>;
readonly customShutdownRecipes?: pulumi.Input<pulumi.Input<string>[]>;
readonly customUndeployRecipes?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Whether to enable Elastic Load Balancing connection draining.
*/
readonly drainElbOnShutdown?: pulumi.Input<boolean>;
/**
* `ebs_volume` blocks, as described below, will each create an EBS volume and connect it to the layer's instances.
*/
readonly ebsVolumes?: pulumi.Input<pulumi.Input<{ iops?: pulumi.Input<number>, mountPoint: pulumi.Input<string>, numberOfDisks: pulumi.Input<number>, raidLevel?: pulumi.Input<string>, size: pulumi.Input<number>, type?: pulumi.Input<string> }>[]>;
/**
* Name of an Elastic Load Balancer to attach to this layer
*/
readonly elasticLoadBalancer?: pulumi.Input<string>;
/**
* Whether to install OS and package updates on each instance when it boots.
*/
readonly installUpdatesOnBoot?: pulumi.Input<boolean>;
/**
* The time, in seconds, that OpsWorks will wait for Chef to complete after triggering the Shutdown event.
*/
readonly instanceShutdownTimeout?: pulumi.Input<number>;
/**
* A human-readable name for the layer.
*/
readonly name?: pulumi.Input<string>;
/**
* The id of the stack the layer will belong to.
*/
readonly stackId: pulumi.Input<string>;
/**
* Names of a set of system packages to install on the layer's instances.
*/
readonly systemPackages?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Whether to use EBS-optimized instances.
*/
readonly useEbsOptimizedInstances?: pulumi.Input<boolean>;
}