import * as core from "@terrascript/core"; export interface NetworkConfigurationArgs extends core.SchemaArgs { securityGroupIds: core.Array | core.ArrayOut; subnetIds: core.Array | core.ArrayOut; } export class NetworkConfiguration extends core.Schema { @core.attr(String, { kind: "array" }) public securityGroupIds!: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public subnetIds!: core.Array | core.ArrayOut; } export interface ErrorArgs extends core.SchemaArgs { errorCode: string | core.StringOut; errorMessage: string | core.StringOut; } export class Error extends core.Schema { @core.attr(String, { computed: true }) public errorCode!: string | core.StringOut; @core.attr(String, { computed: true }) public errorMessage!: string | core.StringOut; } export interface LastUpdatedArgs extends core.SchemaArgs { createdAt: string | core.StringOut; error: core.Array | core.ArrayOut; status: string | core.StringOut; } export class LastUpdated extends core.Schema { @core.attr(String, { computed: true }) public createdAt!: string | core.StringOut; @core.attr(Error, { computed: true, kind: "array" }) public error!: core.Array | core.ArrayOut; @core.attr(String, { computed: true }) public status!: string | core.StringOut; } export interface TaskLogsArgs extends core.SchemaArgs { cloudWatchLogGroupArn: string | core.StringOut; enabled?: boolean | core.BooleanOut; logLevel?: string | core.StringOut; } export class TaskLogs extends core.Schema { @core.attr(String, { computed: true }) public cloudWatchLogGroupArn!: string | core.StringOut; @core.attr(Boolean, { computed: true }) public enabled?: boolean | core.BooleanOut; @core.attr(String, { computed: true }) public logLevel?: string | core.StringOut; } export interface WebserverLogsArgs extends core.SchemaArgs { cloudWatchLogGroupArn: string | core.StringOut; enabled?: boolean | core.BooleanOut; logLevel?: string | core.StringOut; } export class WebserverLogs extends core.Schema { @core.attr(String, { computed: true }) public cloudWatchLogGroupArn!: string | core.StringOut; @core.attr(Boolean, { computed: true }) public enabled?: boolean | core.BooleanOut; @core.attr(String, { computed: true }) public logLevel?: string | core.StringOut; } export interface WorkerLogsArgs extends core.SchemaArgs { cloudWatchLogGroupArn: string | core.StringOut; enabled?: boolean | core.BooleanOut; logLevel?: string | core.StringOut; } export class WorkerLogs extends core.Schema { @core.attr(String, { computed: true }) public cloudWatchLogGroupArn!: string | core.StringOut; @core.attr(Boolean, { computed: true }) public enabled?: boolean | core.BooleanOut; @core.attr(String, { computed: true }) public logLevel?: string | core.StringOut; } export interface DagProcessingLogsArgs extends core.SchemaArgs { cloudWatchLogGroupArn: string | core.StringOut; enabled?: boolean | core.BooleanOut; logLevel?: string | core.StringOut; } export class DagProcessingLogs extends core.Schema { @core.attr(String, { computed: true }) public cloudWatchLogGroupArn!: string | core.StringOut; @core.attr(Boolean, { computed: true }) public enabled?: boolean | core.BooleanOut; @core.attr(String, { computed: true }) public logLevel?: string | core.StringOut; } export interface SchedulerLogsArgs extends core.SchemaArgs { cloudWatchLogGroupArn: string | core.StringOut; enabled?: boolean | core.BooleanOut; logLevel?: string | core.StringOut; } export class SchedulerLogs extends core.Schema { @core.attr(String, { computed: true }) public cloudWatchLogGroupArn!: string | core.StringOut; @core.attr(Boolean, { computed: true }) public enabled?: boolean | core.BooleanOut; @core.attr(String, { computed: true }) public logLevel?: string | core.StringOut; } export interface LoggingConfigurationArgs extends core.SchemaArgs { dagProcessingLogs?: DagProcessingLogs; schedulerLogs?: SchedulerLogs; taskLogs?: TaskLogs; webserverLogs?: WebserverLogs; workerLogs?: WorkerLogs; } export class LoggingConfiguration extends core.Schema { @core.attr(DagProcessingLogs, { computed: true }) public dagProcessingLogs?: DagProcessingLogs; @core.attr(SchedulerLogs, { computed: true }) public schedulerLogs?: SchedulerLogs; @core.attr(TaskLogs, { computed: true }) public taskLogs?: TaskLogs; @core.attr(WebserverLogs, { computed: true }) public webserverLogs?: WebserverLogs; @core.attr(WorkerLogs, { computed: true }) public workerLogs?: WorkerLogs; } export interface EnvironmentArgs extends core.ResourceArgs { /** * (Optional) The `airflow_configuration_options` parameter specifies airflow override options. Check t * he [Official documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variab * les.html#configuring-env-variables-reference) for all possible configuration options. */ airflowConfigurationOptions?: | core.Map | core.MapOut; /** * (Optional) Airflow version of your environment, will be set by default to the latest version that MW * AA supports. */ airflowVersion?: string | core.StringOut; /** * (Required) 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/us * erguide/configuring-dag-import.html). */ dagS3Path: string | core.StringOut; /** * (Optional) Environment class for the cluster. Possible options are `mw1.small`, `mw1.medium`, `mw1.l * arge`. 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 | core.StringOut; /** * (Required) The Amazon Resource Name (ARN) of the task execution role that the Amazon MWAA and its en * vironment 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 | core.StringOut; /** * (Optional) 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 Docume * ntation](https://docs.aws.amazon.com/mwaa/latest/userguide/custom-keys-certs.html) for more informat * ion. */ kmsKey?: string | core.StringOut; /** * (Optional) The Apache Airflow logs you want to send to Amazon CloudWatch Logs. */ loggingConfiguration?: LoggingConfiguration; /** * (Optional) The maximum number of workers that can be automatically scaled up. Value need to be betwe * en `1` and `25`. Will be `10` by default. */ maxWorkers?: number | core.NumberOut; /** * (Optional) The minimum number of workers that you want to run in your environment. Will be `1` by de * fault. */ minWorkers?: number | core.NumberOut; /** * (Required) The name of the Apache Airflow Environment */ name: string | core.StringOut; /** * (Required) Specifies the network configuration for your Apache Airflow Environment. This includes tw * o private subnets as well as security groups for the Airflow environment. Each subnet requires inter * net connection, otherwise the deployment will fail. See [Network configuration](#network-configurati * on) below for details. */ networkConfiguration: NetworkConfiguration; /** * (Optional) The plugins.zip file version you want to use. */ pluginsS3ObjectVersion?: string | core.StringOut; /** * (Optional) 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 plugins_s3_object_version is requir * ed. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/lates * t/userguide/configuring-dag-import.html). */ pluginsS3Path?: string | core.StringOut; /** * (Optional) The requirements.txt file version you want to use. */ requirementsS3ObjectVersion?: string | core.StringOut; /** * (Optional) The relative path to the requirements.txt file on your Amazon S3 storage bucket. For exam * ple, requirements.txt. If a relative path is provided in the request, then requirements_s3_object_ve * rsion 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 | core.StringOut; /** * (Optional) The number of schedulers that you want to run in your environment. v2.0.2 and above accep * ts `2` - `5`, default `2`. v1.10.12 accepts `1`. */ schedulers?: number | core.NumberOut; /** * (Required) The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, arn:aws:s3: * ::airflow-mybucketname. */ sourceBucketArn: string | core.StringOut; /** * (Optional) A map of resource tags to associate with the resource. If configured with a provider [`de * fault_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#d * efault_tags-configuration-block) present, tags with matching keys will overwrite those defined at th * e provider-level. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Optional) Specifies whether the webserver should be accessible over the internet or via your specif * ied VPC. Possible options: `PRIVATE_ONLY` (default) and `PUBLIC_ONLY`. */ webserverAccessMode?: string | core.StringOut; /** * (Optional) Specifies the start date for the weekly maintenance window. */ weeklyMaintenanceWindowStart?: string | core.StringOut; } export class Environment extends core.Resource { /** * (Optional) The `airflow_configuration_options` parameter specifies airflow override options. Check t * he [Official documentation](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variab * les.html#configuring-env-variables-reference) for all possible configuration options. */ @core.attr(String, { kind: "map" }) public airflowConfigurationOptions?: | core.Map | core.MapOut; /** * (Optional) Airflow version of your environment, will be set by default to the latest version that MW * AA supports. */ @core.attr(String, { computed: true }) public airflowVersion?: string | core.StringOut; /** * The ARN of the MWAA Environment */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * The Created At date of the MWAA Environment */ @core.attr(String, { computed: true }) public createdAt!: string | core.StringOut; /** * (Required) 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/us * erguide/configuring-dag-import.html). */ @core.attr(String) public dagS3Path!: string | core.StringOut; /** * (Optional) Environment class for the cluster. Possible options are `mw1.small`, `mw1.medium`, `mw1.l * arge`. 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 * . */ @core.attr(String, { computed: true }) public environmentClass?: string | core.StringOut; /** * (Required) The Amazon Resource Name (ARN) of the task execution role that the Amazon MWAA and its en * vironment can assume. Check the [official AWS documentation](https://docs.aws.amazon.com/mwaa/latest * /userguide/mwaa-create-role.html) for the detailed role specification. */ @core.attr(String) public executionRoleArn!: string | core.StringOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) 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 Docume * ntation](https://docs.aws.amazon.com/mwaa/latest/userguide/custom-keys-certs.html) for more informat * ion. */ @core.attr(String) public kmsKey?: string | core.StringOut; @core.attr(LastUpdated, { computed: true, kind: "array" }) public lastUpdated!: core.Array | core.ArrayOut; /** * (Optional) The Apache Airflow logs you want to send to Amazon CloudWatch Logs. */ @core.attr(LoggingConfiguration, { computed: true }) public loggingConfiguration?: LoggingConfiguration; /** * (Optional) The maximum number of workers that can be automatically scaled up. Value need to be betwe * en `1` and `25`. Will be `10` by default. */ @core.attr(Number, { computed: true }) public maxWorkers?: number | core.NumberOut; /** * (Optional) The minimum number of workers that you want to run in your environment. Will be `1` by de * fault. */ @core.attr(Number, { computed: true }) public minWorkers?: number | core.NumberOut; /** * (Required) The name of the Apache Airflow Environment */ @core.attr(String) public name!: string | core.StringOut; /** * (Required) Specifies the network configuration for your Apache Airflow Environment. This includes tw * o private subnets as well as security groups for the Airflow environment. Each subnet requires inter * net connection, otherwise the deployment will fail. See [Network configuration](#network-configurati * on) below for details. */ @core.attr(NetworkConfiguration) public networkConfiguration!: NetworkConfiguration; /** * (Optional) The plugins.zip file version you want to use. */ @core.attr(String, { computed: true }) public pluginsS3ObjectVersion?: string | core.StringOut; /** * (Optional) 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 plugins_s3_object_version is requir * ed. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon.com/mwaa/lates * t/userguide/configuring-dag-import.html). */ @core.attr(String) public pluginsS3Path?: string | core.StringOut; /** * (Optional) The requirements.txt file version you want to use. */ @core.attr(String, { computed: true }) public requirementsS3ObjectVersion?: string | core.StringOut; /** * (Optional) The relative path to the requirements.txt file on your Amazon S3 storage bucket. For exam * ple, requirements.txt. If a relative path is provided in the request, then requirements_s3_object_ve * rsion is required. For more information, see [Importing DAGs on Amazon MWAA](https://docs.aws.amazon * .com/mwaa/latest/userguide/configuring-dag-import.html). */ @core.attr(String) public requirementsS3Path?: string | core.StringOut; /** * (Optional) The number of schedulers that you want to run in your environment. v2.0.2 and above accep * ts `2` - `5`, default `2`. v1.10.12 accepts `1`. */ @core.attr(Number, { computed: true }) public schedulers?: number | core.NumberOut; /** * The Service Role ARN of the Amazon MWAA Environment */ @core.attr(String, { computed: true }) public serviceRoleArn!: string | core.StringOut; /** * (Required) The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, arn:aws:s3: * ::airflow-mybucketname. */ @core.attr(String) public sourceBucketArn!: string | core.StringOut; /** * The status of the Amazon MWAA Environment */ @core.attr(String, { computed: true }) public status!: string | core.StringOut; /** * (Optional) A map of resource tags to associate with the resource. If configured with a provider [`de * fault_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#d * efault_tags-configuration-block) present, tags with matching keys will overwrite those defined at th * e provider-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Optional) Specifies whether the webserver should be accessible over the internet or via your specif * ied VPC. Possible options: `PRIVATE_ONLY` (default) and `PUBLIC_ONLY`. */ @core.attr(String, { computed: true }) public webserverAccessMode?: string | core.StringOut; /** * The webserver URL of the MWAA Environment */ @core.attr(String, { computed: true }) public webserverUrl!: string | core.StringOut; /** * (Optional) Specifies the start date for the weekly maintenance window. */ @core.attr(String, { computed: true }) public weeklyMaintenanceWindowStart?: string | core.StringOut; constructor(name: string, args?: EnvironmentArgs) { super(name, "aws_mwaa_environment", args); } public override getNamespace(): string { return "aws_mwaa"; } }