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

Relax ForceNew requirement wherever possible in huaweicloud_fgs_function #1040

Closed
siviae opened this issue Apr 5, 2021 · 1 comment · Fixed by #1132
Closed

Relax ForceNew requirement wherever possible in huaweicloud_fgs_function #1040

siviae opened this issue Apr 5, 2021 · 1 comment · Fixed by #1132
Assignees
Milestone

Comments

@siviae
Copy link

siviae commented Apr 5, 2021

Hello!

For now, all huaweicloud_fgs_function parameter are marked as ForceNew. However, according to documentation
https://support.huaweicloud.com/intl/en-us/api-functiongraph/functiongraph_06_0110.html
https://support.huaweicloud.com/intl/en-us/api-functiongraph/functiongraph_06_0111.html
this is not necessary - some function parameters could be updated without the need to recreate the function.

There are multiple problems with ForceNew for all parameters:

  • not all parameters, which are available in console, are available in Terraform provider (these include init handler, xrole aka agency (exists but does not seem to work), vpc and mount configuration). This could be workarounded, if the function was created in Terraform and enriched with necessary parameters from Console after that. But since function is recreated on each Terraform apply if something (i.e. function code) changed, these amendments made in console are cleared and have to be made again, which is very inconvenient during development.
  • IDK if this is a bug or feature, but every time I recreate the function, the dependent API Gateway API is unpublished, even though function urn is not changed.

Affected Resource(s)

Please list the resources as a list, for example:

  • huaweicloud_fgs_function

Expected Behavior

Function should not be recreated if this is not absolutely necessary.

Actual Behavior

Function is recreated on all, even smallest, changes.

Thank you in advance!

@Jason-Zhang9309
Copy link
Collaborator

Hi there,
Sorry for late response. And thank you for these helpful suggestions.
Support for update in huaweicloud_fgs_function is under consideration and should be available soon.

As for the API unpublished problem, I tested calling func according to https://support.huaweicloud.com/intl/en-us/api-functiongraph/functiongraph_06_0125.html, but did not encounter any problems.
Could you provide more information?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants