-
Notifications
You must be signed in to change notification settings - Fork 5
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
Allow passing a pulumi provider to a cdk resource #61
Labels
kind/enhancement
Improvements or new features
Comments
iwahbe
added
kind/enhancement
Improvements or new features
and removed
kind/question
Questions about existing features
labels
Jul 24, 2023
iwahbe
changed the title
Is there a way to pass a pulumi provider to a cdk resource?
Allow passing a pulumi provider to a cdk resource
Jul 24, 2023
Tangentially related: #219 |
CC @flostadler - we might need to revisit design options here (Resource or Stack level). |
corymhall
added a commit
that referenced
this issue
Nov 22, 2024
It has been possible to specify Pulumi resource options at the stack level, but it did not flow through to the actual resources. This PR makes sure that the inheritance works correctly. This PR also adds functionality to automatically set the Stack environment based on the App provider. Because the App creates the stacks in an async context, we can use provider functions to lookup the environment and then pass the resolved environment to the stack. This means that all Stacks have their environment provided by default. This will cut down on the number of Intrinsics used in the generated template. If the user provides a provider to the Stack we are no longer in an async context which means we can't determine the environment from the provider and fall back to an environment agnostic stack. re #61, re #219
corymhall
added a commit
that referenced
this issue
Nov 22, 2024
It has been possible to specify Pulumi resource options at the stack level, but it did not flow through to the actual resources. This PR makes sure that the inheritance works correctly. This PR also adds functionality to automatically set the Stack environment based on the App provider. Because the App creates the stacks in an async context, we can use provider functions to lookup the environment and then pass the resolved environment to the stack. This means that all Stacks have their environment provided by default. This will cut down on the number of Intrinsics used in the generated template. If the user provides a provider to the Stack we are no longer in an async context which means we can't determine the environment from the provider and fall back to an environment agnostic stack. re #61, re #219
corymhall
added a commit
that referenced
this issue
Nov 25, 2024
It has been possible to specify Pulumi resource options at the stack level, but it did not flow through to the actual resources. This PR makes sure that the inheritance works correctly. This PR also adds functionality to automatically set the Stack environment based on the App provider. Because the App creates the stacks in an async context, we can use provider functions to lookup the environment and then pass the resolved environment to the stack. This means that all Stacks have their environment provided by default. This will cut down on the number of Intrinsics used in the generated template. If the user provides a provider to the Stack we are no longer in an async context which means we can't determine the environment from the provider and fall back to an environment agnostic stack. re #61, re #219
corymhall
added a commit
that referenced
this issue
Nov 25, 2024
It has been possible to specify Pulumi resource options at the stack level, but it did not flow through to the actual resources. This PR makes sure that the inheritance works correctly. This PR also adds functionality to automatically set the Stack environment based on the App provider. Because the App creates the stacks in an async context, we can use provider functions to lookup the environment and then pass the resolved environment to the stack. For now this is something that the user will have to specify (example in the `lookups` example test). This would mean that all Stacks have their environment provided by default. This will cut down on the number of Intrinsics used in the generated template. The reason I am not turning this on by default is because it requires lookups to be enabled (environment agnostic stacks use Intrinsics to find availability zones, but explicit environment stacks use lookups). If the user provides a provider to the Stack we are no longer in an async context which means we can't determine the environment from the provider and fall back to an environment agnostic stack. re #61, re #219
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was asked in community slack.
I believe there is not currently. All resources are parented to the
StackComponent
, but that resource is constructed automatically without the end user being able to provide and parameters, including resource options.The
Stack
resource that users create does accept anoptions
parameter which is derived fromComponentResourceOptions
(and thus supports passingparent
andprovider
), but we don't ultimately pass that through into the PulumiStackComponent
resource. I expect we can and should forward this on to allow the normal inheritance of resource options down into component and it's CDK-based children.The text was updated successfully, but these errors were encountered: