Skip to content

Conversation

@maiconrocha
Copy link
Contributor

No description provided.

Copy link
Contributor

@drewmullen drewmullen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR should be reviewed by @bryantbiggs or @vara-bonthu but heres just a few thoughts from me

}

variable "airflow_version" {
description = "(Optional) Airflow version of your environment, will be set by default to the latest version that MWAA supports."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a semantic version? can you add a validation here? https://dev.to/drewmullen/terraform-variable-validation-with-samples-1ank#semantic-version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently allowed values are 2.2.2, 2.0.2 and 1.10.12. If you do not specify a version when you create an environment, the latest version is used. Do you still want to add a semantic version validation? what will happen if MWAA release a new version? do we will need to update the module to add the new version?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could validate explicit versions... or you could just validate that the input looks like a server (which is probably what I would recommend)

You can do ~semver || null so users can omit


variable "airflow_configuration_options" {
description = "(Optional) The airflow_configuration_options parameter specifies airflow override options."
type = any
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you either change to object() or provide validations for the allowed keys in this variable? same for other any types where it makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for airflow_configuration_options I don't think I can convert to object since there are listed and custom options, https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html#configuring-env-variables-customizing
which means there is no way to map all possible options beforehand
and object type must contain all of the specified keys

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, feel free to disregard

Copy link
Collaborator

@vara-bonthu vara-bonthu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maiconrocha This looks great! Thanks for the PR. I am testing this one and send another PR if any changes are required.

@drewmullen Seen your comments which i will implement in my PR. I would like to add few more changes to this module so I am merging this one as a first commit. I will send another PR.

@vara-bonthu vara-bonthu merged commit 23470f4 into aws-ia:main Jun 26, 2022
vara-bonthu pushed a commit that referenced this pull request Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants