-
Notifications
You must be signed in to change notification settings - Fork 156
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
Error when trying to import aws.wafv2.WebAcl #2854
Comments
@Frassle Can you help me read this message? Why have we printed this diagnostics? |
The first message is from codegen, that it can't assign an expression of one shape to a location of another (there's a "to location of type" hidden in the middle of that long message). Now that's probably a Read bug, because I'd expect the shape of date returned from Read to match the schema shape. But it's probably an import/codegen bug as well because we should be tolerant to bad Read implementations. I think we could warn that the types don't match but we should still try and write out the best guess of the code. The warnings after:
Are that after we got the data from Read we passed it back to Check, and Check reported those failures. This is just a provider bug, either in Read or Check (or both). |
It's difficult to read such a long type printout, but it could be that it's failing to match null against the expected type as in #2534 - if the root-cause is the same, that'd be an error because in TF null may populate every type; even when bridged providers emit required signatures for output properties to emit SDKs that are not projecting as Optional to the runtime, these may and will be populated by null in certain situations. The other ticket that may be relevant here is pulumi/pulumi-terraform-bridge#1225 where we're not running validators in the same order as TF would. |
It would be a great help if we had a quick repro here I could try some possible fixes on, much appreciated. |
const wafACL = new aws.wafv2.WebAcl('waf', {
name: 'waf;,
scope: 'REGIONAL',
defaultAction: {
allow: {},
},
visibilityConfig: {
cloudwatchMetricsEnabled: true,
metricName: 'waf-acl',
sampledRequestsEnabled: true,
},
rules: [
{
name: 'AWS-AWSManagedRulesAdminProtectionRuleSet',
priority: 3,
overrideAction: {
none: {},
},
statement: {
managedRuleGroupStatement: {
name: 'AWSManagedRulesAdminProtectionRuleSet',
vendorName: 'AWS',
},
},
visibilityConfig: {
cloudwatchMetricsEnabled: true,
metricName: 'AWSManagedRulesAdminProtectionRuleSet',
sampledRequestsEnabled: true,
},
},
],
tags: {
Name: 'waf',
},
});
export const id = pulumi.interpolate`${wafACL.id}/${wafACL.name}/${wafACL.scope}`; I'm using the above program to try and reproduce the issue, but I am able to import and generate a program successfully. I've tried generating in both python and typescript.
|
@sandervb2 I'm going to go ahead and close this since it's been open for over 1 year and we still don't have a program that can reproduce the issue. If you are still seeing the issue and can provide a reproduction let us know and we can reopen this. |
What happened?
Normally after successfully importing a resource i get the python code to add to my program but when I tried to import a aws.wafv2.WebAcl resource, I got the following error:
Example
I used the following command to import the WebAcl resource:
Output of
pulumi about
Additional context
I noticed that the import function in the api docs for the wafv2.WebAcl is not there (anymore?) After selecting yes at the prompt to confirm the WebAcl import, I received the following warnings:
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: