dsccommunity / SharePointDsc

The SharePointDsc PowerShell module provides DSC resources that can be used to deploy and manage a SharePoint farm
MIT License
241 stars 107 forks source link

SP_List - New Resource Proposal #1338

Open kilasuit opened 3 years ago

kilasuit commented 3 years ago

Description

Way to provision Content Types in Content Type Hub or Sites

Proposed properties

Name SchemaXML

Special considerations or limitations

Would also require Site Column Resource to be created - see #1337 Would also require Content Type Resource to be created - see #1336

kilasuit commented 3 years ago

Note: Use of SchemaXml and not all other properties that List objects could take is to reduce the overhead in development and is often used cross on-premises & online with CSOM so should allow developers (or admins) to easily use this where they deem it fit to do so

ykuijs commented 3 years ago

SharePointDsc focusses on infrastructure components, not content. This because editing content can result in a conflict with user edits (e.g. a user edits the title of a site and your desired state is no longer compliant). This resource is an area where conflicts can happen very easily: Lists are something site admins will create or edit regularly. That is why I think this resource isn't very suitable for SharePointDsc.

kilasuit commented 3 years ago

Whilst I do see your point @ykuijs there are times where like within the Content Type Hub or other sites used by administrators that there is a need to ensure that a list/library gets created as part of a baseline configuration

shurick81 commented 3 years ago

A useful analogy might be the line between what Microsoft is providing you within SharePoint Online and what you can customize. Content Type Hub is a site collection that you can configure via DSC, but does SharePoint Online create any custom lists that are not in site collection template?

andikrueger commented 3 years ago

I would recommend to use PnP PowerShell to apply these settings. Preferably you would limit administrative access to those site collections, afterwards, so that the configuration will not change.

I don't see added value to have these content related settings within the configuration.

kilasuit commented 2 years ago

To address comments - I totally get that in the majority of cases this seems like a counter intuitive resource to have that could perhaps be better served using other tooling - however there are use cases that I have seen used where this functionality would be incredibly useful and would negate needing to have additional tooling in place, as such I intend to in future raise a PR that implements this.

@ykuijs - If you can assign this to me I will work on implementing this next week.

andikrueger commented 2 years ago

Could you give some examples? I'd like to understand the scenarios that cause the need.

ykuijs commented 2 years ago

Agree with Andi, really interested in the examples.

In general: I understand that there are use cases where having this resource will be usable, but at the same time the resource will then also be used by other admins to create lists who will end up in conflicts with users: The admin configures a list and a user updates that same list. Implementing these use cases with solutions like PnP PowerShell sounds like a better solution here.