Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added new outputs to the COS DA #783

Merged
merged 3 commits into from
Nov 27, 2024
Merged

feat: added new outputs to the COS DA #783

merged 3 commits into from
Nov 27, 2024

Conversation

iamar7
Copy link
Member

@iamar7 iamar7 commented Nov 25, 2024

Description

Add in the outputs for the resource group name to be used by other DAs in a stack/addon

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

@iamar7
Copy link
Member Author

iamar7 commented Nov 25, 2024

/run pipeline

Comment on lines 9 to 13
output "resource_group_name" {
description = "Resource group name"
value = module.resource_group.resource_group_name
}

Copy link
Contributor

Choose a reason for hiding this comment

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

The DA can be provided existing_resource_group so at best this output is intermittent.

It would appear that just returning var.resource_group_name would be more complete; but that introduces the concern of just passing an input back as an output. In which case every DA would have to do this.

Surely the calling process already has the required information. Is there more detail on why this may be desirable?

Copy link
Member Author

Choose a reason for hiding this comment

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

I am creating SLZ ROKS add-on that depends on COS and KMS DA. As per the configuration it takes existing_cos_instance_name & existing_cos_resource_group for which I need resource_group_name as an output from COS DA.

I am thinking of updating the condition to this instead of directly outputting the input back

value = !var.existing_resource_group ? module.resource_group.resource_group_name : var.existing_resource_group

@iamar7
Copy link
Member Author

iamar7 commented Nov 26, 2024

/run pipeline

@shemau shemau self-requested a review November 26, 2024 16:03
Copy link
Contributor

@shemau shemau left a comment

Choose a reason for hiding this comment

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

LGTM

@iamar7
Copy link
Member Author

iamar7 commented Nov 27, 2024

/run pipeline

1 similar comment
@iamar7
Copy link
Member Author

iamar7 commented Nov 27, 2024

/run pipeline

@maheshwarishikha maheshwarishikha merged commit 9d43dde into main Nov 27, 2024
2 checks passed
@maheshwarishikha maheshwarishikha deleted the add-output branch November 27, 2024 13:53
@terraform-ibm-modules-ops
Copy link
Contributor

🎉 This PR is included in version 8.15.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants