/
environment.go
791 lines (716 loc) · 50 KB
/
environment.go
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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package mwaa
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Creates a MWAA Environment resource.
//
// ## Example Usage
//
// A MWAA Environment requires an IAM role (`iam.Role`), two subnets in the private zone (`ec2.Subnet`) and a versioned S3 bucket (`s3.BucketV2`).
// ### Basic Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/mwaa"
// )
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := mwaa.NewEnvironment(ctx, "example", &mwaa.EnvironmentArgs{
// DagS3Path: pulumi.String("dags/"),
// ExecutionRoleArn: pulumi.Any(aws_iam_role.Example.Arn),
// NetworkConfiguration: &mwaa.EnvironmentNetworkConfigurationArgs{
// SecurityGroupIds: pulumi.StringArray{
// aws_security_group.Example.Id,
// },
// SubnetIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-resources-aws:mwaa-environment:Environment.pp:5,25-49),
// },
// SourceBucketArn: pulumi.Any(aws_s3_bucket.Example.Arn),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Example with Airflow configuration options
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/mwaa"
// )
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := mwaa.NewEnvironment(ctx, "example", &mwaa.EnvironmentArgs{
// AirflowConfigurationOptions: pulumi.StringMap{
// "core.default_task_retries": pulumi.String("16"),
// "core.parallelism": pulumi.String("1"),
// },
// DagS3Path: pulumi.String("dags/"),
// ExecutionRoleArn: pulumi.Any(aws_iam_role.Example.Arn),
// NetworkConfiguration: &mwaa.EnvironmentNetworkConfigurationArgs{
// SecurityGroupIds: pulumi.StringArray{
// aws_security_group.Example.Id,
// },
// SubnetIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-resources-aws:mwaa-environment:Environment.pp:9,25-49),
// },
// SourceBucketArn: pulumi.Any(aws_s3_bucket.Example.Arn),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Example with logging configurations
//
// Note that Airflow task logs are enabled by default with the `INFO` log level.
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/mwaa"
// )
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := mwaa.NewEnvironment(ctx, "example", &mwaa.EnvironmentArgs{
// DagS3Path: pulumi.String("dags/"),
// ExecutionRoleArn: pulumi.Any(aws_iam_role.Example.Arn),
// LoggingConfiguration: &mwaa.EnvironmentLoggingConfigurationArgs{
// DagProcessingLogs: &mwaa.EnvironmentLoggingConfigurationDagProcessingLogsArgs{
// Enabled: pulumi.Bool(true),
// LogLevel: pulumi.String("DEBUG"),
// },
// SchedulerLogs: &mwaa.EnvironmentLoggingConfigurationSchedulerLogsArgs{
// Enabled: pulumi.Bool(true),
// LogLevel: pulumi.String("INFO"),
// },
// TaskLogs: &mwaa.EnvironmentLoggingConfigurationTaskLogsArgs{
// Enabled: pulumi.Bool(true),
// LogLevel: pulumi.String("WARNING"),
// },
// WebserverLogs: &mwaa.EnvironmentLoggingConfigurationWebserverLogsArgs{
// Enabled: pulumi.Bool(true),
// LogLevel: pulumi.String("ERROR"),
// },
// WorkerLogs: &mwaa.EnvironmentLoggingConfigurationWorkerLogsArgs{
// Enabled: pulumi.Bool(true),
// LogLevel: pulumi.String("CRITICAL"),
// },
// },
// NetworkConfiguration: &mwaa.EnvironmentNetworkConfigurationArgs{
// SecurityGroupIds: pulumi.StringArray{
// aws_security_group.Example.Id,
// },
// SubnetIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-resources-aws:mwaa-environment:Environment.pp:27,25-49),
// },
// SourceBucketArn: pulumi.Any(aws_s3_bucket.Example.Arn),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Example with tags
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/mwaa"
// )
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := mwaa.NewEnvironment(ctx, "example", &mwaa.EnvironmentArgs{
// DagS3Path: pulumi.String("dags/"),
// ExecutionRoleArn: pulumi.Any(aws_iam_role.Example.Arn),
// NetworkConfiguration: &mwaa.EnvironmentNetworkConfigurationArgs{
// SecurityGroupIds: pulumi.StringArray{
// aws_security_group.Example.Id,
// },
// SubnetIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-resources-aws:mwaa-environment:Environment.pp:5,25-49),
// },
// SourceBucketArn: pulumi.Any(aws_s3_bucket.Example.Arn),
// Tags: pulumi.StringMap{
// "Name": pulumi.String("example"),
// "Environment": pulumi.String("production"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// MWAA Environment can be imported using `Name` e.g.,
//
// ```sh
//
// $ pulumi import aws:mwaa/environment:Environment example MyAirflowEnvironment
//
// ```
type Environment struct {
pulumi.CustomResourceState
// The `airflowConfigurationOptions` parameter specifies airflow override options. Check the [Official documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html#configuring-env-variables-reference) for all possible configuration options.
AirflowConfigurationOptions pulumi.StringMapOutput `pulumi:"airflowConfigurationOptions"`
// Airflow version of your environment, will be set by default to the latest version that MWAA supports.
AirflowVersion pulumi.StringOutput `pulumi:"airflowVersion"`
// The ARN of the MWAA Environment
Arn pulumi.StringOutput `pulumi:"arn"`
// The Created At date of the MWAA Environment
// * `logging_configuration[0].<LOG_CONFIGURATION_TYPE>[0].cloud_watch_log_group_arn` - Provides the ARN for the CloudWatch group where the logs will be published
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// The relative path to the DAG folder on your Amazon S3 storage bucket. For example, dags. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
DagS3Path pulumi.StringOutput `pulumi:"dagS3Path"`
// Environment class for the cluster. Possible options are `mw1.small`, `mw1.medium`, `mw1.large`. Will be set by default to `mw1.small`. Please check the [AWS Pricing](https://aws.amazon.com/de/managed-workflows-for-apache-airflow/pricing/) for more information about the environment classes.
EnvironmentClass pulumi.StringOutput `pulumi:"environmentClass"`
// The Amazon Resource Name (ARN) of the task execution role that the Amazon MWAA and its environment can assume. Check the [official AWS documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html) for the detailed role specification.
ExecutionRoleArn pulumi.StringOutput `pulumi:"executionRoleArn"`
// The Amazon Resource Name (ARN) of your KMS key that you want to use for encryption. Will be set to the ARN of the managed KMS key `aws/airflow` by default. Please check the [Official Documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/custom-keys-certs.html) for more information.
KmsKey pulumi.StringPtrOutput `pulumi:"kmsKey"`
LastUpdateds EnvironmentLastUpdatedArrayOutput `pulumi:"lastUpdateds"`
// The Apache Airflow logs you want to send to Amazon CloudWatch Logs.
LoggingConfiguration EnvironmentLoggingConfigurationOutput `pulumi:"loggingConfiguration"`
// The maximum number of workers that can be automatically scaled up. Value need to be between `1` and `25`. Will be `10` by default.
MaxWorkers pulumi.IntOutput `pulumi:"maxWorkers"`
// The minimum number of workers that you want to run in your environment. Will be `1` by default.
MinWorkers pulumi.IntOutput `pulumi:"minWorkers"`
// The name of the Apache Airflow Environment
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the network configuration for your Apache Airflow Environment. This includes two private subnets as well as security groups for the Airflow environment. Each subnet requires internet connection, otherwise the deployment will fail. See Network configuration below for details.
NetworkConfiguration EnvironmentNetworkConfigurationOutput `pulumi:"networkConfiguration"`
// The plugins.zip file version you want to use.
PluginsS3ObjectVersion pulumi.StringOutput `pulumi:"pluginsS3ObjectVersion"`
// The relative path to the plugins.zip file on your Amazon S3 storage bucket. For example, plugins.zip. If a relative path is provided in the request, then pluginsS3ObjectVersion is required. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
PluginsS3Path pulumi.StringPtrOutput `pulumi:"pluginsS3Path"`
// The requirements.txt file version you want to use.
RequirementsS3ObjectVersion pulumi.StringOutput `pulumi:"requirementsS3ObjectVersion"`
// The relative path to the requirements.txt file on your Amazon S3 storage bucket. For example, requirements.txt. If a relative path is provided in the request, then requirementsS3ObjectVersion is required. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
RequirementsS3Path pulumi.StringPtrOutput `pulumi:"requirementsS3Path"`
// The number of schedulers that you want to run in your environment. v2.0.2 and above accepts `2` - `5`, default `2`. v1.10.12 accepts `1`.
Schedulers pulumi.IntOutput `pulumi:"schedulers"`
// The Service Role ARN of the Amazon MWAA Environment
ServiceRoleArn pulumi.StringOutput `pulumi:"serviceRoleArn"`
// The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, arn:aws:s3:::airflow-mybucketname.
SourceBucketArn pulumi.StringOutput `pulumi:"sourceBucketArn"`
// The version of the startup shell script you want to use. You must specify the version ID that Amazon S3 assigns to the file every time you update the script.
StartupScriptS3ObjectVersion pulumi.StringOutput `pulumi:"startupScriptS3ObjectVersion"`
// The relative path to the script hosted in your bucket. The script runs as your environment starts before starting the Apache Airflow process. Use this script to install dependencies, modify configuration options, and set environment variables. See [Using a startup script](https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html). Supported for environment versions 2.x and later.
StartupScriptS3Path pulumi.StringPtrOutput `pulumi:"startupScriptS3Path"`
// The status of the Amazon MWAA Environment
Status pulumi.StringOutput `pulumi:"status"`
// A map of resource tags to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
// Specifies whether the webserver should be accessible over the internet or via your specified VPC. Possible options: `PRIVATE_ONLY` (default) and `PUBLIC_ONLY`.
WebserverAccessMode pulumi.StringOutput `pulumi:"webserverAccessMode"`
// The webserver URL of the MWAA Environment
WebserverUrl pulumi.StringOutput `pulumi:"webserverUrl"`
// Specifies the start date for the weekly maintenance window.
WeeklyMaintenanceWindowStart pulumi.StringOutput `pulumi:"weeklyMaintenanceWindowStart"`
}
// NewEnvironment registers a new resource with the given unique name, arguments, and options.
func NewEnvironment(ctx *pulumi.Context,
name string, args *EnvironmentArgs, opts ...pulumi.ResourceOption) (*Environment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DagS3Path == nil {
return nil, errors.New("invalid value for required argument 'DagS3Path'")
}
if args.ExecutionRoleArn == nil {
return nil, errors.New("invalid value for required argument 'ExecutionRoleArn'")
}
if args.NetworkConfiguration == nil {
return nil, errors.New("invalid value for required argument 'NetworkConfiguration'")
}
if args.SourceBucketArn == nil {
return nil, errors.New("invalid value for required argument 'SourceBucketArn'")
}
if args.AirflowConfigurationOptions != nil {
args.AirflowConfigurationOptions = pulumi.ToSecret(args.AirflowConfigurationOptions).(pulumi.StringMapInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"airflowConfigurationOptions",
})
opts = append(opts, secrets)
var resource Environment
err := ctx.RegisterResource("aws:mwaa/environment:Environment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEnvironment gets an existing Environment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetEnvironment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EnvironmentState, opts ...pulumi.ResourceOption) (*Environment, error) {
var resource Environment
err := ctx.ReadResource("aws:mwaa/environment:Environment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Environment resources.
type environmentState struct {
// The `airflowConfigurationOptions` parameter specifies airflow override options. Check the [Official documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html#configuring-env-variables-reference) for all possible configuration options.
AirflowConfigurationOptions map[string]string `pulumi:"airflowConfigurationOptions"`
// Airflow version of your environment, will be set by default to the latest version that MWAA supports.
AirflowVersion *string `pulumi:"airflowVersion"`
// The ARN of the MWAA Environment
Arn *string `pulumi:"arn"`
// The Created At date of the MWAA Environment
// * `logging_configuration[0].<LOG_CONFIGURATION_TYPE>[0].cloud_watch_log_group_arn` - Provides the ARN for the CloudWatch group where the logs will be published
CreatedAt *string `pulumi:"createdAt"`
// The relative path to the DAG folder on your Amazon S3 storage bucket. For example, dags. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
DagS3Path *string `pulumi:"dagS3Path"`
// Environment class for the cluster. Possible options are `mw1.small`, `mw1.medium`, `mw1.large`. Will be set by default to `mw1.small`. Please check the [AWS Pricing](https://aws.amazon.com/de/managed-workflows-for-apache-airflow/pricing/) for more information about the environment classes.
EnvironmentClass *string `pulumi:"environmentClass"`
// The Amazon Resource Name (ARN) of the task execution role that the Amazon MWAA and its environment can assume. Check the [official AWS documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html) for the detailed role specification.
ExecutionRoleArn *string `pulumi:"executionRoleArn"`
// The Amazon Resource Name (ARN) of your KMS key that you want to use for encryption. Will be set to the ARN of the managed KMS key `aws/airflow` by default. Please check the [Official Documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/custom-keys-certs.html) for more information.
KmsKey *string `pulumi:"kmsKey"`
LastUpdateds []EnvironmentLastUpdated `pulumi:"lastUpdateds"`
// The Apache Airflow logs you want to send to Amazon CloudWatch Logs.
LoggingConfiguration *EnvironmentLoggingConfiguration `pulumi:"loggingConfiguration"`
// The maximum number of workers that can be automatically scaled up. Value need to be between `1` and `25`. Will be `10` by default.
MaxWorkers *int `pulumi:"maxWorkers"`
// The minimum number of workers that you want to run in your environment. Will be `1` by default.
MinWorkers *int `pulumi:"minWorkers"`
// The name of the Apache Airflow Environment
Name *string `pulumi:"name"`
// Specifies the network configuration for your Apache Airflow Environment. This includes two private subnets as well as security groups for the Airflow environment. Each subnet requires internet connection, otherwise the deployment will fail. See Network configuration below for details.
NetworkConfiguration *EnvironmentNetworkConfiguration `pulumi:"networkConfiguration"`
// The plugins.zip file version you want to use.
PluginsS3ObjectVersion *string `pulumi:"pluginsS3ObjectVersion"`
// The relative path to the plugins.zip file on your Amazon S3 storage bucket. For example, plugins.zip. If a relative path is provided in the request, then pluginsS3ObjectVersion is required. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
PluginsS3Path *string `pulumi:"pluginsS3Path"`
// The requirements.txt file version you want to use.
RequirementsS3ObjectVersion *string `pulumi:"requirementsS3ObjectVersion"`
// The relative path to the requirements.txt file on your Amazon S3 storage bucket. For example, requirements.txt. If a relative path is provided in the request, then requirementsS3ObjectVersion is required. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
RequirementsS3Path *string `pulumi:"requirementsS3Path"`
// The number of schedulers that you want to run in your environment. v2.0.2 and above accepts `2` - `5`, default `2`. v1.10.12 accepts `1`.
Schedulers *int `pulumi:"schedulers"`
// The Service Role ARN of the Amazon MWAA Environment
ServiceRoleArn *string `pulumi:"serviceRoleArn"`
// The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, arn:aws:s3:::airflow-mybucketname.
SourceBucketArn *string `pulumi:"sourceBucketArn"`
// The version of the startup shell script you want to use. You must specify the version ID that Amazon S3 assigns to the file every time you update the script.
StartupScriptS3ObjectVersion *string `pulumi:"startupScriptS3ObjectVersion"`
// The relative path to the script hosted in your bucket. The script runs as your environment starts before starting the Apache Airflow process. Use this script to install dependencies, modify configuration options, and set environment variables. See [Using a startup script](https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html). Supported for environment versions 2.x and later.
StartupScriptS3Path *string `pulumi:"startupScriptS3Path"`
// The status of the Amazon MWAA Environment
Status *string `pulumi:"status"`
// A map of resource tags to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll map[string]string `pulumi:"tagsAll"`
// Specifies whether the webserver should be accessible over the internet or via your specified VPC. Possible options: `PRIVATE_ONLY` (default) and `PUBLIC_ONLY`.
WebserverAccessMode *string `pulumi:"webserverAccessMode"`
// The webserver URL of the MWAA Environment
WebserverUrl *string `pulumi:"webserverUrl"`
// Specifies the start date for the weekly maintenance window.
WeeklyMaintenanceWindowStart *string `pulumi:"weeklyMaintenanceWindowStart"`
}
type EnvironmentState struct {
// The `airflowConfigurationOptions` parameter specifies airflow override options. Check the [Official documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html#configuring-env-variables-reference) for all possible configuration options.
AirflowConfigurationOptions pulumi.StringMapInput
// Airflow version of your environment, will be set by default to the latest version that MWAA supports.
AirflowVersion pulumi.StringPtrInput
// The ARN of the MWAA Environment
Arn pulumi.StringPtrInput
// The Created At date of the MWAA Environment
// * `logging_configuration[0].<LOG_CONFIGURATION_TYPE>[0].cloud_watch_log_group_arn` - Provides the ARN for the CloudWatch group where the logs will be published
CreatedAt pulumi.StringPtrInput
// The relative path to the DAG folder on your Amazon S3 storage bucket. For example, dags. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
DagS3Path pulumi.StringPtrInput
// Environment class for the cluster. Possible options are `mw1.small`, `mw1.medium`, `mw1.large`. Will be set by default to `mw1.small`. Please check the [AWS Pricing](https://aws.amazon.com/de/managed-workflows-for-apache-airflow/pricing/) for more information about the environment classes.
EnvironmentClass pulumi.StringPtrInput
// The Amazon Resource Name (ARN) of the task execution role that the Amazon MWAA and its environment can assume. Check the [official AWS documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html) for the detailed role specification.
ExecutionRoleArn pulumi.StringPtrInput
// The Amazon Resource Name (ARN) of your KMS key that you want to use for encryption. Will be set to the ARN of the managed KMS key `aws/airflow` by default. Please check the [Official Documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/custom-keys-certs.html) for more information.
KmsKey pulumi.StringPtrInput
LastUpdateds EnvironmentLastUpdatedArrayInput
// The Apache Airflow logs you want to send to Amazon CloudWatch Logs.
LoggingConfiguration EnvironmentLoggingConfigurationPtrInput
// The maximum number of workers that can be automatically scaled up. Value need to be between `1` and `25`. Will be `10` by default.
MaxWorkers pulumi.IntPtrInput
// The minimum number of workers that you want to run in your environment. Will be `1` by default.
MinWorkers pulumi.IntPtrInput
// The name of the Apache Airflow Environment
Name pulumi.StringPtrInput
// Specifies the network configuration for your Apache Airflow Environment. This includes two private subnets as well as security groups for the Airflow environment. Each subnet requires internet connection, otherwise the deployment will fail. See Network configuration below for details.
NetworkConfiguration EnvironmentNetworkConfigurationPtrInput
// The plugins.zip file version you want to use.
PluginsS3ObjectVersion pulumi.StringPtrInput
// The relative path to the plugins.zip file on your Amazon S3 storage bucket. For example, plugins.zip. If a relative path is provided in the request, then pluginsS3ObjectVersion is required. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
PluginsS3Path pulumi.StringPtrInput
// The requirements.txt file version you want to use.
RequirementsS3ObjectVersion pulumi.StringPtrInput
// The relative path to the requirements.txt file on your Amazon S3 storage bucket. For example, requirements.txt. If a relative path is provided in the request, then requirementsS3ObjectVersion is required. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
RequirementsS3Path pulumi.StringPtrInput
// The number of schedulers that you want to run in your environment. v2.0.2 and above accepts `2` - `5`, default `2`. v1.10.12 accepts `1`.
Schedulers pulumi.IntPtrInput
// The Service Role ARN of the Amazon MWAA Environment
ServiceRoleArn pulumi.StringPtrInput
// The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, arn:aws:s3:::airflow-mybucketname.
SourceBucketArn pulumi.StringPtrInput
// The version of the startup shell script you want to use. You must specify the version ID that Amazon S3 assigns to the file every time you update the script.
StartupScriptS3ObjectVersion pulumi.StringPtrInput
// The relative path to the script hosted in your bucket. The script runs as your environment starts before starting the Apache Airflow process. Use this script to install dependencies, modify configuration options, and set environment variables. See [Using a startup script](https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html). Supported for environment versions 2.x and later.
StartupScriptS3Path pulumi.StringPtrInput
// The status of the Amazon MWAA Environment
Status pulumi.StringPtrInput
// A map of resource tags to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapInput
// Specifies whether the webserver should be accessible over the internet or via your specified VPC. Possible options: `PRIVATE_ONLY` (default) and `PUBLIC_ONLY`.
WebserverAccessMode pulumi.StringPtrInput
// The webserver URL of the MWAA Environment
WebserverUrl pulumi.StringPtrInput
// Specifies the start date for the weekly maintenance window.
WeeklyMaintenanceWindowStart pulumi.StringPtrInput
}
func (EnvironmentState) ElementType() reflect.Type {
return reflect.TypeOf((*environmentState)(nil)).Elem()
}
type environmentArgs struct {
// The `airflowConfigurationOptions` parameter specifies airflow override options. Check the [Official documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html#configuring-env-variables-reference) for all possible configuration options.
AirflowConfigurationOptions map[string]string `pulumi:"airflowConfigurationOptions"`
// Airflow version of your environment, will be set by default to the latest version that MWAA supports.
AirflowVersion *string `pulumi:"airflowVersion"`
// The relative path to the DAG folder on your Amazon S3 storage bucket. For example, dags. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
DagS3Path string `pulumi:"dagS3Path"`
// Environment class for the cluster. Possible options are `mw1.small`, `mw1.medium`, `mw1.large`. Will be set by default to `mw1.small`. Please check the [AWS Pricing](https://aws.amazon.com/de/managed-workflows-for-apache-airflow/pricing/) for more information about the environment classes.
EnvironmentClass *string `pulumi:"environmentClass"`
// The Amazon Resource Name (ARN) of the task execution role that the Amazon MWAA and its environment can assume. Check the [official AWS documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html) for the detailed role specification.
ExecutionRoleArn string `pulumi:"executionRoleArn"`
// The Amazon Resource Name (ARN) of your KMS key that you want to use for encryption. Will be set to the ARN of the managed KMS key `aws/airflow` by default. Please check the [Official Documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/custom-keys-certs.html) for more information.
KmsKey *string `pulumi:"kmsKey"`
// The Apache Airflow logs you want to send to Amazon CloudWatch Logs.
LoggingConfiguration *EnvironmentLoggingConfiguration `pulumi:"loggingConfiguration"`
// The maximum number of workers that can be automatically scaled up. Value need to be between `1` and `25`. Will be `10` by default.
MaxWorkers *int `pulumi:"maxWorkers"`
// The minimum number of workers that you want to run in your environment. Will be `1` by default.
MinWorkers *int `pulumi:"minWorkers"`
// The name of the Apache Airflow Environment
Name *string `pulumi:"name"`
// Specifies the network configuration for your Apache Airflow Environment. This includes two private subnets as well as security groups for the Airflow environment. Each subnet requires internet connection, otherwise the deployment will fail. See Network configuration below for details.
NetworkConfiguration EnvironmentNetworkConfiguration `pulumi:"networkConfiguration"`
// The plugins.zip file version you want to use.
PluginsS3ObjectVersion *string `pulumi:"pluginsS3ObjectVersion"`
// The relative path to the plugins.zip file on your Amazon S3 storage bucket. For example, plugins.zip. If a relative path is provided in the request, then pluginsS3ObjectVersion is required. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
PluginsS3Path *string `pulumi:"pluginsS3Path"`
// The requirements.txt file version you want to use.
RequirementsS3ObjectVersion *string `pulumi:"requirementsS3ObjectVersion"`
// The relative path to the requirements.txt file on your Amazon S3 storage bucket. For example, requirements.txt. If a relative path is provided in the request, then requirementsS3ObjectVersion is required. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
RequirementsS3Path *string `pulumi:"requirementsS3Path"`
// The number of schedulers that you want to run in your environment. v2.0.2 and above accepts `2` - `5`, default `2`. v1.10.12 accepts `1`.
Schedulers *int `pulumi:"schedulers"`
// The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, arn:aws:s3:::airflow-mybucketname.
SourceBucketArn string `pulumi:"sourceBucketArn"`
// The version of the startup shell script you want to use. You must specify the version ID that Amazon S3 assigns to the file every time you update the script.
StartupScriptS3ObjectVersion *string `pulumi:"startupScriptS3ObjectVersion"`
// The relative path to the script hosted in your bucket. The script runs as your environment starts before starting the Apache Airflow process. Use this script to install dependencies, modify configuration options, and set environment variables. See [Using a startup script](https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html). Supported for environment versions 2.x and later.
StartupScriptS3Path *string `pulumi:"startupScriptS3Path"`
// A map of resource tags to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// Specifies whether the webserver should be accessible over the internet or via your specified VPC. Possible options: `PRIVATE_ONLY` (default) and `PUBLIC_ONLY`.
WebserverAccessMode *string `pulumi:"webserverAccessMode"`
// Specifies the start date for the weekly maintenance window.
WeeklyMaintenanceWindowStart *string `pulumi:"weeklyMaintenanceWindowStart"`
}
// The set of arguments for constructing a Environment resource.
type EnvironmentArgs struct {
// The `airflowConfigurationOptions` parameter specifies airflow override options. Check the [Official documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html#configuring-env-variables-reference) for all possible configuration options.
AirflowConfigurationOptions pulumi.StringMapInput
// Airflow version of your environment, will be set by default to the latest version that MWAA supports.
AirflowVersion pulumi.StringPtrInput
// The relative path to the DAG folder on your Amazon S3 storage bucket. For example, dags. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
DagS3Path pulumi.StringInput
// Environment class for the cluster. Possible options are `mw1.small`, `mw1.medium`, `mw1.large`. Will be set by default to `mw1.small`. Please check the [AWS Pricing](https://aws.amazon.com/de/managed-workflows-for-apache-airflow/pricing/) for more information about the environment classes.
EnvironmentClass pulumi.StringPtrInput
// The Amazon Resource Name (ARN) of the task execution role that the Amazon MWAA and its environment can assume. Check the [official AWS documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html) for the detailed role specification.
ExecutionRoleArn pulumi.StringInput
// The Amazon Resource Name (ARN) of your KMS key that you want to use for encryption. Will be set to the ARN of the managed KMS key `aws/airflow` by default. Please check the [Official Documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/custom-keys-certs.html) for more information.
KmsKey pulumi.StringPtrInput
// The Apache Airflow logs you want to send to Amazon CloudWatch Logs.
LoggingConfiguration EnvironmentLoggingConfigurationPtrInput
// The maximum number of workers that can be automatically scaled up. Value need to be between `1` and `25`. Will be `10` by default.
MaxWorkers pulumi.IntPtrInput
// The minimum number of workers that you want to run in your environment. Will be `1` by default.
MinWorkers pulumi.IntPtrInput
// The name of the Apache Airflow Environment
Name pulumi.StringPtrInput
// Specifies the network configuration for your Apache Airflow Environment. This includes two private subnets as well as security groups for the Airflow environment. Each subnet requires internet connection, otherwise the deployment will fail. See Network configuration below for details.
NetworkConfiguration EnvironmentNetworkConfigurationInput
// The plugins.zip file version you want to use.
PluginsS3ObjectVersion pulumi.StringPtrInput
// The relative path to the plugins.zip file on your Amazon S3 storage bucket. For example, plugins.zip. If a relative path is provided in the request, then pluginsS3ObjectVersion is required. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
PluginsS3Path pulumi.StringPtrInput
// The requirements.txt file version you want to use.
RequirementsS3ObjectVersion pulumi.StringPtrInput
// The relative path to the requirements.txt file on your Amazon S3 storage bucket. For example, requirements.txt. If a relative path is provided in the request, then requirementsS3ObjectVersion is required. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
RequirementsS3Path pulumi.StringPtrInput
// The number of schedulers that you want to run in your environment. v2.0.2 and above accepts `2` - `5`, default `2`. v1.10.12 accepts `1`.
Schedulers pulumi.IntPtrInput
// The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, arn:aws:s3:::airflow-mybucketname.
SourceBucketArn pulumi.StringInput
// The version of the startup shell script you want to use. You must specify the version ID that Amazon S3 assigns to the file every time you update the script.
StartupScriptS3ObjectVersion pulumi.StringPtrInput
// The relative path to the script hosted in your bucket. The script runs as your environment starts before starting the Apache Airflow process. Use this script to install dependencies, modify configuration options, and set environment variables. See [Using a startup script](https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html). Supported for environment versions 2.x and later.
StartupScriptS3Path pulumi.StringPtrInput
// A map of resource tags to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// Specifies whether the webserver should be accessible over the internet or via your specified VPC. Possible options: `PRIVATE_ONLY` (default) and `PUBLIC_ONLY`.
WebserverAccessMode pulumi.StringPtrInput
// Specifies the start date for the weekly maintenance window.
WeeklyMaintenanceWindowStart pulumi.StringPtrInput
}
func (EnvironmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*environmentArgs)(nil)).Elem()
}
type EnvironmentInput interface {
pulumi.Input
ToEnvironmentOutput() EnvironmentOutput
ToEnvironmentOutputWithContext(ctx context.Context) EnvironmentOutput
}
func (*Environment) ElementType() reflect.Type {
return reflect.TypeOf((**Environment)(nil)).Elem()
}
func (i *Environment) ToEnvironmentOutput() EnvironmentOutput {
return i.ToEnvironmentOutputWithContext(context.Background())
}
func (i *Environment) ToEnvironmentOutputWithContext(ctx context.Context) EnvironmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(EnvironmentOutput)
}
// EnvironmentArrayInput is an input type that accepts EnvironmentArray and EnvironmentArrayOutput values.
// You can construct a concrete instance of `EnvironmentArrayInput` via:
//
// EnvironmentArray{ EnvironmentArgs{...} }
type EnvironmentArrayInput interface {
pulumi.Input
ToEnvironmentArrayOutput() EnvironmentArrayOutput
ToEnvironmentArrayOutputWithContext(context.Context) EnvironmentArrayOutput
}
type EnvironmentArray []EnvironmentInput
func (EnvironmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Environment)(nil)).Elem()
}
func (i EnvironmentArray) ToEnvironmentArrayOutput() EnvironmentArrayOutput {
return i.ToEnvironmentArrayOutputWithContext(context.Background())
}
func (i EnvironmentArray) ToEnvironmentArrayOutputWithContext(ctx context.Context) EnvironmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EnvironmentArrayOutput)
}
// EnvironmentMapInput is an input type that accepts EnvironmentMap and EnvironmentMapOutput values.
// You can construct a concrete instance of `EnvironmentMapInput` via:
//
// EnvironmentMap{ "key": EnvironmentArgs{...} }
type EnvironmentMapInput interface {
pulumi.Input
ToEnvironmentMapOutput() EnvironmentMapOutput
ToEnvironmentMapOutputWithContext(context.Context) EnvironmentMapOutput
}
type EnvironmentMap map[string]EnvironmentInput
func (EnvironmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Environment)(nil)).Elem()
}
func (i EnvironmentMap) ToEnvironmentMapOutput() EnvironmentMapOutput {
return i.ToEnvironmentMapOutputWithContext(context.Background())
}
func (i EnvironmentMap) ToEnvironmentMapOutputWithContext(ctx context.Context) EnvironmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EnvironmentMapOutput)
}
type EnvironmentOutput struct{ *pulumi.OutputState }
func (EnvironmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Environment)(nil)).Elem()
}
func (o EnvironmentOutput) ToEnvironmentOutput() EnvironmentOutput {
return o
}
func (o EnvironmentOutput) ToEnvironmentOutputWithContext(ctx context.Context) EnvironmentOutput {
return o
}
// The `airflowConfigurationOptions` parameter specifies airflow override options. Check the [Official documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html#configuring-env-variables-reference) for all possible configuration options.
func (o EnvironmentOutput) AirflowConfigurationOptions() pulumi.StringMapOutput {
return o.ApplyT(func(v *Environment) pulumi.StringMapOutput { return v.AirflowConfigurationOptions }).(pulumi.StringMapOutput)
}
// Airflow version of your environment, will be set by default to the latest version that MWAA supports.
func (o EnvironmentOutput) AirflowVersion() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.AirflowVersion }).(pulumi.StringOutput)
}
// The ARN of the MWAA Environment
func (o EnvironmentOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
// The Created At date of the MWAA Environment
// * `logging_configuration[0].<LOG_CONFIGURATION_TYPE>[0].cloud_watch_log_group_arn` - Provides the ARN for the CloudWatch group where the logs will be published
func (o EnvironmentOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// The relative path to the DAG folder on your Amazon S3 storage bucket. For example, dags. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
func (o EnvironmentOutput) DagS3Path() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.DagS3Path }).(pulumi.StringOutput)
}
// Environment class for the cluster. Possible options are `mw1.small`, `mw1.medium`, `mw1.large`. Will be set by default to `mw1.small`. Please check the [AWS Pricing](https://aws.amazon.com/de/managed-workflows-for-apache-airflow/pricing/) for more information about the environment classes.
func (o EnvironmentOutput) EnvironmentClass() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.EnvironmentClass }).(pulumi.StringOutput)
}
// The Amazon Resource Name (ARN) of the task execution role that the Amazon MWAA and its environment can assume. Check the [official AWS documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html) for the detailed role specification.
func (o EnvironmentOutput) ExecutionRoleArn() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.ExecutionRoleArn }).(pulumi.StringOutput)
}
// The Amazon Resource Name (ARN) of your KMS key that you want to use for encryption. Will be set to the ARN of the managed KMS key `aws/airflow` by default. Please check the [Official Documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/custom-keys-certs.html) for more information.
func (o EnvironmentOutput) KmsKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Environment) pulumi.StringPtrOutput { return v.KmsKey }).(pulumi.StringPtrOutput)
}
func (o EnvironmentOutput) LastUpdateds() EnvironmentLastUpdatedArrayOutput {
return o.ApplyT(func(v *Environment) EnvironmentLastUpdatedArrayOutput { return v.LastUpdateds }).(EnvironmentLastUpdatedArrayOutput)
}
// The Apache Airflow logs you want to send to Amazon CloudWatch Logs.
func (o EnvironmentOutput) LoggingConfiguration() EnvironmentLoggingConfigurationOutput {
return o.ApplyT(func(v *Environment) EnvironmentLoggingConfigurationOutput { return v.LoggingConfiguration }).(EnvironmentLoggingConfigurationOutput)
}
// The maximum number of workers that can be automatically scaled up. Value need to be between `1` and `25`. Will be `10` by default.
func (o EnvironmentOutput) MaxWorkers() pulumi.IntOutput {
return o.ApplyT(func(v *Environment) pulumi.IntOutput { return v.MaxWorkers }).(pulumi.IntOutput)
}
// The minimum number of workers that you want to run in your environment. Will be `1` by default.
func (o EnvironmentOutput) MinWorkers() pulumi.IntOutput {
return o.ApplyT(func(v *Environment) pulumi.IntOutput { return v.MinWorkers }).(pulumi.IntOutput)
}
// The name of the Apache Airflow Environment
func (o EnvironmentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the network configuration for your Apache Airflow Environment. This includes two private subnets as well as security groups for the Airflow environment. Each subnet requires internet connection, otherwise the deployment will fail. See Network configuration below for details.
func (o EnvironmentOutput) NetworkConfiguration() EnvironmentNetworkConfigurationOutput {
return o.ApplyT(func(v *Environment) EnvironmentNetworkConfigurationOutput { return v.NetworkConfiguration }).(EnvironmentNetworkConfigurationOutput)
}
// The plugins.zip file version you want to use.
func (o EnvironmentOutput) PluginsS3ObjectVersion() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.PluginsS3ObjectVersion }).(pulumi.StringOutput)
}
// The relative path to the plugins.zip file on your Amazon S3 storage bucket. For example, plugins.zip. If a relative path is provided in the request, then pluginsS3ObjectVersion is required. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
func (o EnvironmentOutput) PluginsS3Path() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Environment) pulumi.StringPtrOutput { return v.PluginsS3Path }).(pulumi.StringPtrOutput)
}
// The requirements.txt file version you want to use.
func (o EnvironmentOutput) RequirementsS3ObjectVersion() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.RequirementsS3ObjectVersion }).(pulumi.StringOutput)
}
// The relative path to the requirements.txt file on your Amazon S3 storage bucket. For example, requirements.txt. If a relative path is provided in the request, then requirementsS3ObjectVersion is required. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import.html).
func (o EnvironmentOutput) RequirementsS3Path() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Environment) pulumi.StringPtrOutput { return v.RequirementsS3Path }).(pulumi.StringPtrOutput)
}
// The number of schedulers that you want to run in your environment. v2.0.2 and above accepts `2` - `5`, default `2`. v1.10.12 accepts `1`.
func (o EnvironmentOutput) Schedulers() pulumi.IntOutput {
return o.ApplyT(func(v *Environment) pulumi.IntOutput { return v.Schedulers }).(pulumi.IntOutput)
}
// The Service Role ARN of the Amazon MWAA Environment
func (o EnvironmentOutput) ServiceRoleArn() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.ServiceRoleArn }).(pulumi.StringOutput)
}
// The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, arn:aws:s3:::airflow-mybucketname.
func (o EnvironmentOutput) SourceBucketArn() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.SourceBucketArn }).(pulumi.StringOutput)
}
// The version of the startup shell script you want to use. You must specify the version ID that Amazon S3 assigns to the file every time you update the script.
func (o EnvironmentOutput) StartupScriptS3ObjectVersion() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.StartupScriptS3ObjectVersion }).(pulumi.StringOutput)
}
// The relative path to the script hosted in your bucket. The script runs as your environment starts before starting the Apache Airflow process. Use this script to install dependencies, modify configuration options, and set environment variables. See [Using a startup script](https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html). Supported for environment versions 2.x and later.
func (o EnvironmentOutput) StartupScriptS3Path() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Environment) pulumi.StringPtrOutput { return v.StartupScriptS3Path }).(pulumi.StringPtrOutput)
}
// The status of the Amazon MWAA Environment
func (o EnvironmentOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// A map of resource tags to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
func (o EnvironmentOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Environment) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
func (o EnvironmentOutput) TagsAll() pulumi.StringMapOutput {
return o.ApplyT(func(v *Environment) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
}
// Specifies whether the webserver should be accessible over the internet or via your specified VPC. Possible options: `PRIVATE_ONLY` (default) and `PUBLIC_ONLY`.
func (o EnvironmentOutput) WebserverAccessMode() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.WebserverAccessMode }).(pulumi.StringOutput)
}
// The webserver URL of the MWAA Environment
func (o EnvironmentOutput) WebserverUrl() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.WebserverUrl }).(pulumi.StringOutput)
}
// Specifies the start date for the weekly maintenance window.
func (o EnvironmentOutput) WeeklyMaintenanceWindowStart() pulumi.StringOutput {
return o.ApplyT(func(v *Environment) pulumi.StringOutput { return v.WeeklyMaintenanceWindowStart }).(pulumi.StringOutput)
}
type EnvironmentArrayOutput struct{ *pulumi.OutputState }
func (EnvironmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Environment)(nil)).Elem()
}
func (o EnvironmentArrayOutput) ToEnvironmentArrayOutput() EnvironmentArrayOutput {
return o
}
func (o EnvironmentArrayOutput) ToEnvironmentArrayOutputWithContext(ctx context.Context) EnvironmentArrayOutput {
return o
}
func (o EnvironmentArrayOutput) Index(i pulumi.IntInput) EnvironmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Environment {
return vs[0].([]*Environment)[vs[1].(int)]
}).(EnvironmentOutput)
}
type EnvironmentMapOutput struct{ *pulumi.OutputState }
func (EnvironmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Environment)(nil)).Elem()
}
func (o EnvironmentMapOutput) ToEnvironmentMapOutput() EnvironmentMapOutput {
return o
}
func (o EnvironmentMapOutput) ToEnvironmentMapOutputWithContext(ctx context.Context) EnvironmentMapOutput {
return o
}
func (o EnvironmentMapOutput) MapIndex(k pulumi.StringInput) EnvironmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Environment {
return vs[0].(map[string]*Environment)[vs[1].(string)]
}).(EnvironmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EnvironmentInput)(nil)).Elem(), &Environment{})
pulumi.RegisterInputType(reflect.TypeOf((*EnvironmentArrayInput)(nil)).Elem(), EnvironmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EnvironmentMapInput)(nil)).Elem(), EnvironmentMap{})
pulumi.RegisterOutputType(EnvironmentOutput{})
pulumi.RegisterOutputType(EnvironmentArrayOutput{})
pulumi.RegisterOutputType(EnvironmentMapOutput{})
}