docs
docs copied to clipboard
Missing details about Component Resource supported options (and their inheritance)
Hello!
- Vote on this issue by adding a đ reaction
- If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)
Issue details
Currently, our document does cover resource option but there's no mention about supported options for a Component Resource. While all are accepted, a few of them generate a warning and for others it may seem unclear of said options are working as intended.
Affected area/feature
- docs
Currently, I have found the following information in our code.
Unsupported resource options
According to this test, the resource options aren't supported.
additionalSecretOutputscustomTimeoutsignoreChangesretainOnDeletereplaceOnChanges
I also think the one below isn't supported for a Component Resource due to the nature of a Component Resource.
importprovider(according to @ringods )
Other resource options
The list below and the associated comment is based on tribal knowledge / conversations but it's unclear.
aliasesdeleteBeforeReplacedependsOnI've been told this doesn't work.parentNot inherited onto sub-resourcesprotectSeems passed down to sub-resourcesprovidersThis should work according to our doc. It should be passed onto sub-resources as well.transformationsNot testedversionProbably not supported but it's unclear
FWIW, regarding the note about dependsOn above, it does appear to work with a component resource as expected.
For example, this code:
const storageAccount1 = new storage.StorageAccount("sa1", {
resourceGroupName: resourceGroup.name,
sku: {
name: storage.SkuName.Standard_LRS,
},
kind: storage.Kind.StorageV2,
});
const storageInfra = new StorageInfra("si1", {
resourceGroupName: resourceGroup.name
}, {dependsOn: [storageAccount1]})
did not start building the storageinfra resource or its children until storageAccount1 was created..
@pierskarsenbarg for visibility
Some docs were added along these lines: https://github.com/pulumi/docs/commit/9da1943043145b75e547da56e9e1016b8bef7885
We need to do an audit of what is and what is not answered in the above questions.
@claude, could you look into this and comment on the issue with what you find?
Claude finished @jkodroff's task ââ View job
Component Resource Options Documentation Audit
I've completed a comprehensive audit of our current Component Resource documentation against the questions raised in this issue. Here are my findings:
Todo List:
- [x] Read repository setup instructions and understand codebase structure
- [x] Find and analyze current Component Resource documentation
- [x] Cross-reference documentation against the specific resource options questions from the issue
- [x] Identify gaps between what's documented vs. what users need to know
- [x] Document findings and recommendations
Current Documentation Status
â Well Documented - Resource Options That DON'T Work with Component Resources
The following resource options clearly state they don't work with component resources:
-
additionalSecretOutputs-content/docs/iac/concepts/options/additionalsecretoutputs.md:92- â ī¸ Warning: "The additionalSecretOutputs resource option does not apply to component resources, and will not have the intended effect."
-
customTimeouts-content/docs/iac/concepts/options/customtimeouts.md:97- â ī¸ Warning: "The customTimeouts resource option does not apply to component resources, and will not have the intended effect."
-
ignoreChanges-content/docs/iac/concepts/options/ignorechanges.md:103- âšī¸ Info: "The ignoreChanges resource option does not apply to inputs to component resources. If ignoreChanges is passed to a component resource, it is up to that component's implementation to decide what if anything it will do."
-
replaceOnChanges-content/docs/iac/concepts/options/replaceonchanges.md:137- â ī¸ Warning: "The replaceOnChanges resource option does not apply to component resources, and will not have the intended effect."
-
retainOnDelete-content/docs/iac/concepts/options/retainondelete.md:93- â ī¸ Warning: "The retainOnDelete resource option does not apply to component resources, and will not have the intended effect."
â Well Documented - Resource Options That DO Work with Component Resources
-
aliases-content/docs/iac/concepts/options/aliases.md:18- â Explicitly mentions: "provides a list of aliases for a resource or component resource"
- â Shows inheritance behavior for parent/child relationships
-
parent-content/docs/iac/concepts/options/parent.md:17,108-119- â Explicitly mentions component resources as good parents
- â
Documents inheritance of
provider,aliases,protect,transformations, andtransforms
-
providers- Both main component docs and providers option docs- â
Components documentation (
content/docs/iac/concepts/components/_index.md:449-526) has a full section on "Inheriting Resource Providers" - â
Shows how
providersoption works with component resources - â Documents inheritance from parent to child
- â
Components documentation (
-
transformationsandtransforms- Well documented as working with components- â Documentation shows these are specifically designed for use with component resources
- â Examples show applying transforms to component resources to affect their children
â ī¸ Documentation Gaps Identified
Missing Documentation for These Resource Options:
-
dependsOn- â No mention in component docs about whether it works
- â The issue comment says "I've been told this doesn't work" but @MitchellGerdisch provided evidence it DOES work
- đ Gap: Need to clarify and document the actual behavior
-
protect- â
Parent docs mention it's inherited (
content/docs/iac/concepts/options/parent.md:114) - â But there's no explicit documentation about using
protectdirectly on component resources - đ Gap: Need to clarify direct usage vs inheritance
- â
Parent docs mention it's inherited (
-
import- â No documentation about whether components can be imported
- â Issue suggests this doesn't work "due to the nature of Component Resources"
- đ Gap: Need to document this limitation
-
provider(singular)- â Issue suggests this doesn't work for components, but documentation is unclear
- â We document
providers(plural) but not the singularprovideroption - đ Gap: Need to clarify difference and document limitations
-
version- â No documentation about whether this works with components
- â Issue says "Probably not supported but it's unclear"
- đ Gap: Need to clarify and document
-
deleteBeforeReplace- â Not mentioned in component context anywhere
- đ Gap: Need to clarify behavior
Missing from Main Component Resource Documentation
The main component resource documentation (content/docs/iac/concepts/components/_index.md) has no dedicated section about resource options support. It only mentions:
providersoption (well documented)parentoption in examples- No comprehensive section explaining which options work vs don't work
đ Recommendations
-
Add a dedicated section to the main Component Resources page explaining:
- Which resource options work with component resources
- Which don't work (with brief explanations why)
- How inheritance works for supported options
-
Clarify the unclear cases through testing/code review:
dependsOn- Document actual behavior since there's conflicting informationprotect- Clarify direct usage vs inheritanceprovidervsproviders- Document the differencesversion,import,deleteBeforeReplace- Test and document actual behavior
-
Cross-reference consistency: Ensure all resource option pages consistently mention their component resource compatibility status
This audit shows that while some aspects are well documented, there's a significant gap in having a centralized, comprehensive explanation of resource options support for component resources - which is exactly what this issue is requesting.