-
Notifications
You must be signed in to change notification settings - Fork 104
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
Would like to use a different version of the pulumi-aws package then the one pinned by pulumi-awsx #1191
Comments
Yes, that's a limitation of the current design I believe. We explicitly pin the underlying provider version here: https://github.com/pulumi/pulumi-awsx/blob/master/awsx/package.json#L23C6-L23C6 I can understand the desire to use an alternate version, but there would potentially be some compatibility complications to address. |
Hi @mjeffryes, Additionally the aws package until v6.12.0 renders this package unusable to anyone who wish to use the endpoints option. |
Also just ran into this issue. Took a while to narrow it down here. @lakkeger thanks for reporting it. Did you find any way to work around this other than not using pulumi-awsx? I skipped configuring |
@mikeshultz Unfortunately no. By being selective with my aws endpoints I could reduce the run time to a reasonable length: |
I have some updates on this issue. There are actually two issues: one is being unable to use pulumilocal helper that sets
This is an issue with the pulumi-aws provider. I was able to bisect it and see that it is fixed in v6.36.0. 6.34.0 BAD pulumi/pulumi-aws@v6.35.0...v6.36.0 Looking at the diff, it seems that in v6.36.0 endpoints structure received an update to recognize
|
The good news is that we should be able to release an awsx update shortly that is built against the latest AWS provider and is able to recognize aws:endpoints. This solution will break again when pulumilocal adds more entries to aws:endpoints and pulumi-aws provider will be lagging behind. There is an issue here I will extract for the pulumi-aws provider to handle this gracefully (both lax parsing and better error reporting). On the issue as stated, we will have to keep that open; the ability to substitute the underlying provider, currently I am testing import pulumi
import pulumi_aws as aws
import pulumi_awsx as awsx
from pulumi.runtime import x_register_stack_transform
def aws_provider_version_transform(args: pulumi.ResourceTransformArgs):
if args.type_.startswith("aws:"):
print("Transformed ", args.type_)
return pulumi.ResourceTransformResult(
props=args.props,
opts=pulumi.ResourceOptions.merge(args.opts, pulumi.ResourceOptions(
version="6.36.0",
))
)
x_register_stack_transform(aws_provider_version_transform) If we cannot make that work perhaps another solution can provide the desired capability. |
pulumi/pulumi-aws#4004 relevant issue in pulumi-aws to track the root cause of being unable to use AWSX with newer settings for LocalStack. |
Digging a little bit further and getting some help from @justinvp from the core team, there is now a supported way to use a different version of pulumi-aws package with your program. Example: import pulumi
import pulumi_aws as aws
import pulumi_awsx as awsx
awsp = aws.Provider("awsp", opts=pulumi.ResourceOptions(version="6.36.0"))
lb = awsx.lb.ApplicationLoadBalancer("lb", opts=pulumi.ResourceOptions(providers={"aws": awsp})) When I run this program, only the desired version of the provider ("6.36.0" in this example) will be used, even if the version of awsx is built against a different aws version ("6.37.1" in my case). Note that Pulumi currently still may install 6.37.1 version into the plugin cache (pulumi plugin ls), but it will not use it for this program. This can be verified by:
This also serves as a workaround for the localstack issue - specifying 6.36.0 or higher in this way gets past the problem. |
Documents how AWS provider version is selected and gives an example of overriding it. Fixes #1191
Documents how AWS provider version is selected and gives an example of overriding it. Fixes #1191
Dependency updates: ``` @pulumi/aws: 6.32.0 to 6.37.1 @pulumi/sdk: v3.112.0 to v3.116.1 ``` In particular AWS v6.36.0 has a change that makes it work better with LocalStack as it no longer fails opaquely when given an workspacesweb endpoint override in `aws:endpoints`. This does not solve #1191 yet but alleviates most of the underlying trouble.
What happened?
Current implementation ignores installed package version and falls back to some hardcoded pulumi-aws version.
Example
Given the below sample project:
I ran preview:
Output of
pulumi about
Additional context
pulumi-local is a thin wrapper for local development on Localstack.
Another issue will be raised regarding the endpoints in the pulumi-aws repo.
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: