Skip to content

Conversation

@prabhu34
Copy link
Contributor

@prabhu34 prabhu34 commented Jan 31, 2025

Added a submodule to support Composer v3 version, a managed service of Apache Airflow.

Composer v3 simplifies networking for the environment. This module creates a network attachment by only setting create_network_attachment to true.

Also use existing network attachment by setting create_network_attachment to false and composer_network_attachment_name with the name of the attachment.

Refer to Composer v3 networking changes in the documentation.

This will resolve #152.

@prabhu34 prabhu34 requested review from a team and imrannayer as code owners January 31, 2025 18:26
@prabhu34
Copy link
Contributor Author

/gcbrun

@prabhu34
Copy link
Contributor Author

prabhu34 commented Feb 1, 2025

/gcbrun

@prabhu34
Copy link
Contributor Author

prabhu34 commented Feb 1, 2025

/gcbrun

2 similar comments
@prabhu34
Copy link
Contributor Author

prabhu34 commented Feb 1, 2025

/gcbrun

@prabhu34
Copy link
Contributor Author

prabhu34 commented Feb 3, 2025

/gcbrun

@imrannayer
Copy link
Collaborator

/gcbrun

1 similar comment
@prabhu34
Copy link
Contributor Author

prabhu34 commented Feb 4, 2025

/gcbrun

@prabhu34 prabhu34 requested a review from imrannayer February 7, 2025 16:40
locals {
network_project_id = var.network_project_id != "" ? var.network_project_id : var.project_id
subnetwork_region = var.subnetwork_region != "" ? var.subnetwork_region : var.region
cloud_composer_sa = format("service-%[email protected]", data.google_project.project.number)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@prabhu34 can u try project_service_identity to get service account name. This resource support a few service.

Copy link
Contributor Author

@prabhu34 prabhu34 Feb 8, 2025

Choose a reason for hiding this comment

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

Yes, I'm aware of this. We can infact update it in here as well test/setup/iam.tf and use that output directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would add on to it. Enabling service identities are already part of project-factory module in the setup/. Lets not complicate this as Composer identity is being created when API is enabled.

From a customer perspective as well, they can enable identities and then invoke Composer modules.
Skipping this for now.

Feel free to add your thoughts!

}

dynamic "software_config" {
for_each = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

@prabhu34 can this handle software_config = null

Copy link
Contributor Author

Choose a reason for hiding this comment

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

software_config is never null in this implementation as it is not a single map or object.
image_version and web_server_plugins_mode are having default values, so this will never be null.

Let me know your thoughts!

@prabhu34 prabhu34 requested a review from imrannayer February 11, 2025 02:48
@imrannayer
Copy link
Collaborator

/gcbrun

1 similar comment
@prabhu34
Copy link
Contributor Author

/gcbrun

@prabhu34
Copy link
Contributor Author

@imrannayer Somehow the fixtures are being demanded for v3. Any reason why?

@imrannayer
Copy link
Collaborator

@prabhu34 check variables in your example. They should be all hard coded except the ones which are coming from output of test/setup execution.

@imrannayer imrannayer changed the title feat: initial commit composer v3 feat: Add Composer v3 sub-module Feb 11, 2025
@imrannayer imrannayer merged commit 444aa02 into terraform-google-modules:main Feb 11, 2025
4 checks passed
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.

Update to support Cloud Composer v3

3 participants