import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Creates a MWAA Environment resource. * * ## Example Usage * * A MWAA Environment requires an IAM role (`aws.iam.Role`), two subnets in the private zone (`aws.ec2.Subnet`) and a versioned S3 bucket (`aws.s3.Bucket`). * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.mwaa.Environment("example", { * networkConfiguration: { * securityGroupIds: [exampleAwsSecurityGroup.id], * subnetIds: _private.map(__item => __item.id), * }, * dagS3Path: "dags/", * executionRoleArn: exampleAwsIamRole.arn, * name: "example", * sourceBucketArn: exampleAwsS3Bucket.arn, * }); * ``` * * ### Example with Airflow configuration options * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.mwaa.Environment("example", { * networkConfiguration: { * securityGroupIds: [exampleAwsSecurityGroup.id], * subnetIds: _private.map(__item => __item.id), * }, * airflowConfigurationOptions: { * "core.default_task_retries": "16", * "core.parallelism": "1", * }, * dagS3Path: "dags/", * executionRoleArn: exampleAwsIamRole.arn, * name: "example", * sourceBucketArn: exampleAwsS3Bucket.arn, * }); * ``` * * ### Example with logging configurations * * Note that Airflow task logs are enabled by default with the `INFO` log level. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.mwaa.Environment("example", { * loggingConfiguration: { * dagProcessingLogs: { * enabled: true, * logLevel: "DEBUG", * }, * schedulerLogs: { * enabled: true, * logLevel: "INFO", * }, * taskLogs: { * enabled: true, * logLevel: "WARNING", * }, * webserverLogs: { * enabled: true, * logLevel: "ERROR", * }, * workerLogs: { * enabled: true, * logLevel: "CRITICAL", * }, * }, * networkConfiguration: { * securityGroupIds: [exampleAwsSecurityGroup.id], * subnetIds: _private.map(__item => __item.id), * }, * dagS3Path: "dags/", * executionRoleArn: exampleAwsIamRole.arn, * name: "example", * sourceBucketArn: exampleAwsS3Bucket.arn, * }); * ``` * * ### Example with tags * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.mwaa.Environment("example", { * networkConfiguration: { * securityGroupIds: [exampleAwsSecurityGroup.id], * subnetIds: _private.map(__item => __item.id), * }, * dagS3Path: "dags/", * executionRoleArn: exampleAwsIamRole.arn, * name: "example", * sourceBucketArn: exampleAwsS3Bucket.arn, * tags: { * Name: "example", * Environment: "production", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import MWAA Environment using `Name`. For example: * * ```sh * $ pulumi import aws:mwaa/environment:Environment example MyAirflowEnvironment * ``` */ export declare class Environment extends pulumi.CustomResource { /** * Get an existing Environment 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. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: EnvironmentState, opts?: pulumi.CustomResourceOptions): Environment; /** * Check whether an existing Environment resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: EnvironmentState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of Environment. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Environment; /** * 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. */ readonly airflowConfigurationOptions: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Airflow version of your environment, will be set by default to the latest version that MWAA supports. */ readonly airflowVersion: pulumi.Output; /** * ARN of the MWAA Environment. */ readonly arn: pulumi.Output; /** * Date and time the environment was last updated. */ readonly createdAt: pulumi.Output; /** * 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). */ readonly dagS3Path: pulumi.Output; /** * VPC endpoint for the environment's Amazon RDS database. */ readonly databaseVpcEndpointService: pulumi.Output; /** * Whether the VPC endpoints configured for the environment are created and managed by the customer or by AWS. If set to `SERVICE`, Amazon MWAA will create and manage the required VPC endpoints in your VPC. If set to `CUSTOMER`, you must create, and manage, the VPC endpoints for your VPC. Defaults to `SERVICE` if not set. */ readonly endpointManagement: pulumi.Output; /** * Environment class for the cluster. Possible options are `mw1.micro`, `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. */ readonly environmentClass: pulumi.Output; /** * 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. */ readonly executionRoleArn: pulumi.Output; /** * 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. */ readonly kmsKey: pulumi.Output; /** * Information about the last update of the environment. See `lastUpdated` Block for details. */ readonly lastUpdateds: pulumi.Output; /** * Apache Airflow logs you want to send to Amazon CloudWatch Logs. See `loggingConfiguration` Block for details. */ readonly loggingConfiguration: pulumi.Output; /** * Maximum number of web servers that you want to run in your environment. Value need to be between `2` and `5` if `environmentClass` is not `mw1.micro`, `1` otherwise. */ readonly maxWebservers: pulumi.Output; /** * Maximum number of workers that can be automatically scaled up. Value need to be between `1` and `25`. Will be `10` by default. */ readonly maxWorkers: pulumi.Output; /** * Minimum number of web servers that you want to run in your environment. Value need to be between `2` and `5` if `environmentClass` is not `mw1.micro`, `1` otherwise. */ readonly minWebservers: pulumi.Output; /** * Minimum number of workers that you want to run in your environment. Will be `1` by default. */ readonly minWorkers: pulumi.Output; /** * Name of the Apache Airflow Environment. */ readonly name: pulumi.Output; /** * 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 `networkConfiguration` Block for details. */ readonly networkConfiguration: pulumi.Output; /** * Version of the plugins.zip file you want to use. */ readonly pluginsS3ObjectVersion: pulumi.Output; /** * 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). */ readonly pluginsS3Path: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Version of the requirements.txt file you want to use. */ readonly requirementsS3ObjectVersion: pulumi.Output; /** * 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). */ readonly requirementsS3Path: pulumi.Output; /** * 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`. */ readonly schedulers: pulumi.Output; /** * Service Role ARN of the Amazon MWAA Environment. */ readonly serviceRoleArn: pulumi.Output; /** * ARN of your Amazon S3 storage bucket. For example, arn:aws:s3:::airflow-mybucketname. */ readonly sourceBucketArn: pulumi.Output; /** * 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. */ readonly startupScriptS3ObjectVersion: pulumi.Output; /** * 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. */ readonly startupScriptS3Path: pulumi.Output; /** * Status of the last update. */ readonly status: pulumi.Output; /** * 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. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Whether the webserver should be accessible over the internet or via your specified VPC. Possible options: `PRIVATE_ONLY` (default), `PUBLIC_ONLY` and `PUBLIC_AND_PRIVATE`. */ readonly webserverAccessMode: pulumi.Output; /** * Webserver URL of the MWAA Environment. */ readonly webserverUrl: pulumi.Output; /** * VPC endpoint for the environment's web server. */ readonly webserverVpcEndpointService: pulumi.Output; /** * Start date for the weekly maintenance window. */ readonly weeklyMaintenanceWindowStart: pulumi.Output; /** * Worker replacement strategy. Valid values: `FORCED`, `GRACEFUL`. */ readonly workerReplacementStrategy: pulumi.Output; /** * Create a Environment 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: EnvironmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Environment resources. */ export interface EnvironmentState { /** * 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.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Airflow version of your environment, will be set by default to the latest version that MWAA supports. */ airflowVersion?: pulumi.Input; /** * ARN of the MWAA Environment. */ arn?: pulumi.Input; /** * Date and time the environment was last updated. */ createdAt?: pulumi.Input; /** * 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.Input; /** * VPC endpoint for the environment's Amazon RDS database. */ databaseVpcEndpointService?: pulumi.Input; /** * Whether the VPC endpoints configured for the environment are created and managed by the customer or by AWS. If set to `SERVICE`, Amazon MWAA will create and manage the required VPC endpoints in your VPC. If set to `CUSTOMER`, you must create, and manage, the VPC endpoints for your VPC. Defaults to `SERVICE` if not set. */ endpointManagement?: pulumi.Input; /** * Environment class for the cluster. Possible options are `mw1.micro`, `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.Input; /** * 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.Input; /** * 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.Input; /** * Information about the last update of the environment. See `lastUpdated` Block for details. */ lastUpdateds?: pulumi.Input[] | undefined>; /** * Apache Airflow logs you want to send to Amazon CloudWatch Logs. See `loggingConfiguration` Block for details. */ loggingConfiguration?: pulumi.Input; /** * Maximum number of web servers that you want to run in your environment. Value need to be between `2` and `5` if `environmentClass` is not `mw1.micro`, `1` otherwise. */ maxWebservers?: pulumi.Input; /** * 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.Input; /** * Minimum number of web servers that you want to run in your environment. Value need to be between `2` and `5` if `environmentClass` is not `mw1.micro`, `1` otherwise. */ minWebservers?: pulumi.Input; /** * Minimum number of workers that you want to run in your environment. Will be `1` by default. */ minWorkers?: pulumi.Input; /** * Name of the Apache Airflow Environment. */ name?: pulumi.Input; /** * 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 `networkConfiguration` Block for details. */ networkConfiguration?: pulumi.Input; /** * Version of the plugins.zip file you want to use. */ pluginsS3ObjectVersion?: pulumi.Input; /** * 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.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Version of the requirements.txt file you want to use. */ requirementsS3ObjectVersion?: pulumi.Input; /** * 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.Input; /** * 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.Input; /** * Service Role ARN of the Amazon MWAA Environment. */ serviceRoleArn?: pulumi.Input; /** * ARN of your Amazon S3 storage bucket. For example, arn:aws:s3:::airflow-mybucketname. */ sourceBucketArn?: pulumi.Input; /** * 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.Input; /** * 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.Input; /** * Status of the last update. */ status?: pulumi.Input; /** * 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.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Whether the webserver should be accessible over the internet or via your specified VPC. Possible options: `PRIVATE_ONLY` (default), `PUBLIC_ONLY` and `PUBLIC_AND_PRIVATE`. */ webserverAccessMode?: pulumi.Input; /** * Webserver URL of the MWAA Environment. */ webserverUrl?: pulumi.Input; /** * VPC endpoint for the environment's web server. */ webserverVpcEndpointService?: pulumi.Input; /** * Start date for the weekly maintenance window. */ weeklyMaintenanceWindowStart?: pulumi.Input; /** * Worker replacement strategy. Valid values: `FORCED`, `GRACEFUL`. */ workerReplacementStrategy?: pulumi.Input; } /** * The set of arguments for constructing a Environment resource. */ export interface EnvironmentArgs { /** * 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.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Airflow version of your environment, will be set by default to the latest version that MWAA supports. */ airflowVersion?: pulumi.Input; /** * 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.Input; /** * Whether the VPC endpoints configured for the environment are created and managed by the customer or by AWS. If set to `SERVICE`, Amazon MWAA will create and manage the required VPC endpoints in your VPC. If set to `CUSTOMER`, you must create, and manage, the VPC endpoints for your VPC. Defaults to `SERVICE` if not set. */ endpointManagement?: pulumi.Input; /** * Environment class for the cluster. Possible options are `mw1.micro`, `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.Input; /** * 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.Input; /** * 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.Input; /** * Apache Airflow logs you want to send to Amazon CloudWatch Logs. See `loggingConfiguration` Block for details. */ loggingConfiguration?: pulumi.Input; /** * Maximum number of web servers that you want to run in your environment. Value need to be between `2` and `5` if `environmentClass` is not `mw1.micro`, `1` otherwise. */ maxWebservers?: pulumi.Input; /** * 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.Input; /** * Minimum number of web servers that you want to run in your environment. Value need to be between `2` and `5` if `environmentClass` is not `mw1.micro`, `1` otherwise. */ minWebservers?: pulumi.Input; /** * Minimum number of workers that you want to run in your environment. Will be `1` by default. */ minWorkers?: pulumi.Input; /** * Name of the Apache Airflow Environment. */ name?: pulumi.Input; /** * 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 `networkConfiguration` Block for details. */ networkConfiguration: pulumi.Input; /** * Version of the plugins.zip file you want to use. */ pluginsS3ObjectVersion?: pulumi.Input; /** * 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.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Version of the requirements.txt file you want to use. */ requirementsS3ObjectVersion?: pulumi.Input; /** * 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.Input; /** * 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.Input; /** * ARN of your Amazon S3 storage bucket. For example, arn:aws:s3:::airflow-mybucketname. */ sourceBucketArn: pulumi.Input; /** * 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.Input; /** * 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.Input; /** * 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.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Whether the webserver should be accessible over the internet or via your specified VPC. Possible options: `PRIVATE_ONLY` (default), `PUBLIC_ONLY` and `PUBLIC_AND_PRIVATE`. */ webserverAccessMode?: pulumi.Input; /** * Start date for the weekly maintenance window. */ weeklyMaintenanceWindowStart?: pulumi.Input; /** * Worker replacement strategy. Valid values: `FORCED`, `GRACEFUL`. */ workerReplacementStrategy?: pulumi.Input; } //# sourceMappingURL=environment.d.ts.map