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

Investigate if there are common patterns that should be implemented as 'mixins' #797

Open
leezen opened this issue Apr 28, 2021 · 1 comment
Labels
kind/enhancement Improvements or new features

Comments

@leezen
Copy link
Contributor

leezen commented Apr 28, 2021

There are some common patterns that we might want to extract as function mixins or some other abstraction. This is distinct from #567 in that that seeks to build higher-level components, whereas we should see if there are any patterns (similar to the one described in #631) that we want to provide conveniences for.

@leezen leezen added this to the 0.56 milestone Apr 28, 2021
@leezen leezen modified the milestones: 0.56, 0.57 May 17, 2021
@leezen leezen removed this from the 0.57 milestone Jun 8, 2021
@TechWatching
Copy link

Writing Pulumi code for RoleAssigment in Azure is not very convenient because the role definition id must be hardcoded after searching it in the documentation or computed at runtime using some mechanism (like here).

The code in C# for a RoleAssigment look likes the following:

        var storageReaderRole = new RoleAssignment("storageReader", new RoleAssignmentArgs
        {
            PrincipalId = functionApp.Identity.Apply(i => i.PrincipalId),
            PrincipalType = PrincipalType.ServicePrincipal,
            RoleDefinitionId = "/providers/Microsoft.Authorization/roleDefinitions/b7e6dc6d-f1e8-4753-8033-0f276bb0955b",
            Scope = storageAccount.Id
        });

I am pretty sure that these role definitions ids don't change over time so I guess it would be really easier to have an enum with all the role we can find in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

4 participants