Skip to content
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

generator-terraform: issues when generating ChaosStudio #3261

Closed
wuxu92 opened this issue Nov 1, 2023 · 3 comments
Closed

generator-terraform: issues when generating ChaosStudio #3261

wuxu92 opened this issue Nov 1, 2023 · 3 comments
Assignees
Labels
area/schema-generation Related to Schema Generation tool/generator-terraform Issues with the Terraform Generator

Comments

@wuxu92
Copy link
Collaborator

wuxu92 commented Nov 1, 2023

I am generating ChaosStudio resources by the gnerator-terraform tool, but there are two issues blocked my way:

  1. Seems the generator cannot handle the scope segment in the reosurce ID? The resource id of targets and capability resource are parsed as scopeSegment but then filtered out by this logic. So the importer tool cannot generate the Terraform part correctly.

  2. The Experiments resource can be generated but go build with errors ilke below:

./experiment_resource_gen.go:370:20: cannot use identity (variable of type *[]identity.ModelSystemAssignedUserAssigned) as []identity.ModelSystemAssignedUserAssigned value in assignment
./experiment_resource_gen.go:434:15: r.mapChaosStudioExperimentResourceFilterSchemaToSelector undefined (type ChaosStudioExperimentResource has no field or method mapChaosStudioExperimentResourceFilterSchemaToSelector)
./experiment_resource_gen.go:445:14: r.mapSelectorToChaosStudioExperimentResourceFilterSchema undefined (type ChaosStudioExperimentResource has no field or method mapSelectorToChaosStudioExperimentResourceFilterSchema)
@tombuildsstuff
Copy link
Contributor

@wuxu92 the board you've assigned this for is for tracking issues with the API Definitions - I'm going to remove it from that board because this doesn't appear to be an issue with the API Definitions?

@wuxu92
Copy link
Collaborator Author

wuxu92 commented Nov 1, 2023

@tombuildsstuff I am sorry, I misunderstood the usage of the dashboard. Please go ahead and remove it.

@stephybun stephybun self-assigned this Nov 2, 2023
@stephybun stephybun added tool/generator-terraform Issues with the Terraform Generator area/schema-generation Related to Schema Generation labels Dec 7, 2023
@stephybun
Copy link
Member

Support for all Chaos Studio resources was added in February and scoped resources can now be generated with Pandora.

Experiments being a more intricate resource with arrays and nested fields is not currently considered for generation with Pandora at this point in time.

As such I'm going to close this issue since this has been completed by the following PRs #3671 #3586 hashicorp/terraform-provider-azurerm#24779

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/schema-generation Related to Schema Generation tool/generator-terraform Issues with the Terraform Generator
Projects
None yet
Development

No branches or pull requests

3 participants