-
Notifications
You must be signed in to change notification settings - Fork 115
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
Do not return IDs when previewing creates. #1526
Conversation
Instead, return the empty string. This will prevent the engine and core SDKs from treating an uncreated resource's ID as known. Fixes pulumi/pulumi#5728.
Though I'm fairly confident that we should take this, I do want to point out that it is a behavioral change and may reduce the efficacy of previews if resources are connected via IDs. That said, it will correct problems like those mentioned in the linked issue, and better reflects the intended semantics of known vs. unknown IDs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM aside from the apiversion comment
@@ -0,0 +1,52 @@ | |||
# Copyright 2016-2020, Pulumi Corporation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Copyright 2016-2020, Pulumi Corporation. | |
# Copyright 2016-2021, Pulumi Corporation. |
|
||
import pulumi | ||
from pulumi_kubernetes.apiextensions.CustomResource import CustomResource | ||
from pulumi_kubernetes.apiextensions.v1beta1.CustomResourceDefinition import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apiextensions/v1beta1 is deprecated and will be removed in the next k8s release. It would be better to use apiextensions/v1 for these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SG
Instead, return the empty string. This will prevent the engine and core
SDKs from treating an uncreated resource's ID as known.
Fixes pulumi/pulumi#5728.