-
Notifications
You must be signed in to change notification settings - Fork 155
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
Import Quicksight Analysis is missing definition part #2852
Comments
@Leon-Vojtech Thank you for opening this issue. Do you happen to have a code snippet for me to provision |
Hello @mikhailshilkov, I created it all manually in Quicksight, so I don't have any code that I can share, but if you have access to any instance of Quicksight, you can use even examples. But it is easy to reproduce it: Create dataset from test datasource (I tried it now with People Overview), create analysis from this dataset and create simple table with few columns. Then if you try to import it using: pulumi import aws:quicksight/analysis:Analysis example "account-id",analysis-id -o GeneratedAnalysis.java -y you will get this:
And in the stack, you can see, that there is not any definitions part, so it is missing the most important part of Analysis. |
What happened?
Hello,
I am trying to import existing Analysis (and Dashboard) from our Quicksight into code, because I don't want to specify everything manually. Problem is, that after import, generated code does not have definition part, only ids, name and permissions sections.
Example
pulumi import aws:quicksight/analysis:Analysis example "094764632126",9cbfe808-bf19-4c2b-bd01-146a897b8065 -o GeneratedAnalysis.java -y
this will generate file with stack part:
var example = new Analysis("example", AnalysisArgs.builder()
.analysisId("9cbfe808-bf19-4c2b-bd01-146a897b8065")
.awsAccountId("094764632126")
.name("Sales analysis 2")
.permissions(AnalysisPermissionArgs.builder()
.actions(
"quicksight:RestoreAnalysis",
"quicksight:UpdateAnalysisPermissions",
"quicksight:QueryAnalysis",
"quicksight:DescribeAnalysisPermissions",
"quicksight:UpdateAnalysis",
"quicksight:DeleteAnalysis",
"quicksight:DescribeAnalysis")
.principal("arn:aws:quicksight:us-east-1:094764632126:my-user")
.build())
.build(), CustomResourceOptions.builder()
.protect(true)
.build());
Output of
pulumi about
CLI
Version 3.86.0
Go Version go1.21.1
Go Compiler gc
Plugins
NAME VERSION
aws 6.4.0-alpha.1696355176+634136cd
java unknown
Host
OS Microsoft Windows 11 Pro
Version 10.0.22621 Build 22621
Arch x86_64
This project is written in java: executable='C:\Program Files\Amazon Corretto\jdk17.0.7_7\bin\java.exe' version='openjdk 17.0.7 2023-04-18 LTS
OpenJDK Runtime Environment Corretto-17.0.7.7.1 (build 17.0.7+7-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.7.7.1 (build 17.0.7+7-LTS, mixed mode, sharing)' java='C:\Program Files\Amazon Corretto\jdk17.0.7_7\bin\java.exe' javac='17.0.7'
Current Stack: leonvojtech/quicksight-pulumi/dev
TYPE URN
pulumi:pulumi:Stack urn:pulumi:dev::quicksight-pulumi::pulumi:pulumi:Stack::quicksight-pulumi-dev
pulumi:providers:aws urn:pulumi:dev::quicksight-pulumi::pulumi:providers:aws::default_6_4_0_alpha_1696270400_fe2ae0f3
aws:quicksight/analysis:Analysis urn:pulumi:dev::quicksight-pulumi::aws:quicksight/analysis:Analysis::existingAnalysis
Found no pending operations associated with dev
Backend
Name pulumi.com
URL https://app.pulumi.com/leonvojtech
User leonvojtech
Organizations leonvojtech
Token type personal
No dependencies found
Additional context
I also tried this using Terraform, it imports also definition part, but it imports also parts, that does not make sense, like empty arrays, that throw errors (you need to manually remove them), some logical errors etc. That is why my colleague recommends me to try Pulumi.
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: