-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
WAFV2 with Go Fails to generate code for imported resource #11552
Labels
area/codegen
SDK-gen, program-gen, convert
kind/bug
Some behavior is incorrect or out of spec
language/go
Comments
alexandr-x-ursul
added
kind/bug
Some behavior is incorrect or out of spec
needs-triage
Needs attention from the triage team
labels
Dec 6, 2022
alexandr-x-ursul
changed the title
WAFV2 Fails to generate code for imported resource
WAFV2 with Go Fails to generate code for imported resource
Dec 6, 2022
Just pulling the error message apart, we're getting a failure when trying to generate the code to add to the program Error: cannot assign expression of type
to location of type
|
Transferring as this appears to be a Go program generation bug. @alexandr-x-ursul if you inspect the code at the end of the error message, this might give you enough information to construct the code by hand as a workaround. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/codegen
SDK-gen, program-gen, convert
kind/bug
Some behavior is incorrect or out of spec
language/go
What happened?
My goal was to import and codify an AWS WAF resource. The resource was successfully imported, however the code generation for it failed with a lengthy error, which I'm going to attach as a file for brevity.
Steps to reproduce
$ pulumi import aws-native:wafv2:WebACL main-web-acl-prod 'xxx|xxx|REGIONAL' --parent main='urn:xxx...'
Previewing import (xxx/prod)
Resources:
= 1 to import
51 unchanged
Do you want to perform this import? yes
Importing (xxx/prod)
Resources:
= 1 imported
51 unchanged
Duration: 6s
error: internal error: Warning: undefined variable main
Expected Behavior
After the successful import, code representing the imported resource should have been generated.
Actual Behavior
Pulumi crashed.
Output of
pulumi about
CLI
Version 3.48.0
Go Version go1.19.2
Go Compiler gc
Plugins
NAME VERSION
aws 5.21.1
aws-native 0.43.0
go unknown
Host
OS ubuntu
Version 20.04
Arch x86_64
This project is written in go: executable='/usr/local/go/bin/go' version='go version go1.19.2 linux/amd64'
Found no pending operations associated with xxx/prod
Backend
Name pulumi.com
URL https://app.pulumi.com/xxx
User xxx
Organizations xxx, xxx
Dependencies:
NAME VERSION
github.com/pulumi/pulumi-aws-native/sdk 0.43.0
github.com/pulumi/pulumi-aws/sdk/v5 5.21.1
github.com/pulumi/pulumi/sdk/v3 3.48.0
pkg/database 0.0.0-00010101000000-000000000000
pkg/environment 0.0.0-00010101000000-000000000000
pkg/nfs 0.0.0-00010101000000-000000000000
Additional context
I first attempted to use AWS Classic provider for this, but I unfortunately reached a dead end as reported here: pulumi/pulumi-aws#2250
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: