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

Stateful Instance Group policy external/internal ips accepts Mapping[str, str] and not str #401

Open
Tahvok opened this issue Mar 20, 2022 · 1 comment · May be fixed by #963
Open

Stateful Instance Group policy external/internal ips accepts Mapping[str, str] and not str #401

Tahvok opened this issue Mar 20, 2022 · 1 comment · May be fixed by #963
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@Tahvok
Copy link

Tahvok commented Mar 20, 2022

This affects compute instance groups beta and alpha.

There is an input class StatefulPolicyPreservedStateArgs and an output class StatefulPolicyPreservedStateResponse
They have two optional parameters external_ips and internal_ips. Currently they wrongly assume that they accept a Mapping[str, str].
However, that is wrong. It should be Mapping[str, Mapping[str, str]] (the second value is a map of str ,str).
Or even better, the second value should be a class of its own that accepts an auto_delete parameter.
See here on how to set it properly:
https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-ip-addresses-in-migs#configuring_stateful_ip_addresses_on_mig_creation

From what I understand, both of this files (outputs.py and _inputs.py) are generated somehow - but I couldn't figure out how, so didn't submit a pr with my fix.
I applied the fix manually to make it work, and it works as intended.

@Tahvok Tahvok added the kind/bug Some behavior is incorrect or out of spec label Mar 20, 2022
@guineveresaenger
Copy link

Hi @Tahvok - thank you for filing this issue!

I believe (and @danielrbradley can correct me if I'm wrong) that all code gen lives in https://github.com/pulumi/pulumi-google-native/blob/master/provider/pkg/gen/schema.go. We're still finalizing this provider, so I apologize for the lack of information on how to get started contributing.

I'd love it if you wanted to open a fix for this and we're happy to help.

@praneetloke praneetloke linked a pull request Feb 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants