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

Add Output.when convenience method #435

Closed
pawelprazak opened this issue Apr 4, 2024 · 0 comments · Fixed by #439
Closed

Add Output.when convenience method #435

pawelprazak opened this issue Apr 4, 2024 · 0 comments · Fixed by #439
Assignees
Labels
area/api User visible API impact/usability Something that impacts users' ability to use the product easily and intuitively kind/improvement An improvement with existing workaround size/S Estimated effort to complete (1-2 days).
Milestone

Comments

@pawelprazak
Copy link
Contributor

Allow for easy combination of Output[Boolean] and Output[Resource] to mamy Output[Option[Resource]].

e.g. instead of

 val databaseInstance: Output[Option[Output[Server]]] =
    bootzookaConfig.dbEnabled.map(Option.when(_)(postgresDatabase(appName, resourceGroup, bootzookaConfig.sql)))

allow for:

val databaseInstance: Output[Option[Server]] = Output.when(bootzookaConfig.dbEnabled)(postgresDatabase(appName, resourceGroup, bootzookaConfig.sql)
@pawelprazak pawelprazak added kind/improvement An improvement with existing workaround impact/usability Something that impacts users' ability to use the product easily and intuitively size/S Estimated effort to complete (1-2 days). area/api User visible API labels Apr 4, 2024
@pawelprazak pawelprazak added this to the 0.3.0 milestone Apr 4, 2024
@pawelprazak pawelprazak self-assigned this Apr 4, 2024
pawelprazak added a commit that referenced this issue Apr 5, 2024
pawelprazak added a commit that referenced this issue Apr 5, 2024
pawelprazak added a commit that referenced this issue Apr 8, 2024
pawelprazak added a commit that referenced this issue Apr 8, 2024
pawelprazak added a commit that referenced this issue Apr 8, 2024
pawelprazak added a commit that referenced this issue Apr 8, 2024
pawelprazak added a commit that referenced this issue Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api User visible API impact/usability Something that impacts users' ability to use the product easily and intuitively kind/improvement An improvement with existing workaround size/S Estimated effort to complete (1-2 days).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant