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

[feature request] support the --allow-unauthenticated flag #6

Closed
RayBB opened this issue Jun 30, 2020 · 1 comment · Fixed by #9
Closed

[feature request] support the --allow-unauthenticated flag #6

RayBB opened this issue Jun 30, 2020 · 1 comment · Fixed by #9

Comments

@RayBB
Copy link
Contributor

RayBB commented Jun 30, 2020

Hello,

I would like to use the --allow-unauthenticated flag that is available in the CLI (docs here).

If it were like the other flags currently support, which require a key and value, I would know what needs to change.

However, this flag doesn't take in any value. As such, I'm not sure what the best way to approach this is (I'm not terribly well versed in go).

From what I gather, there are 2 options:

  1. Add support forallow-unauthenticated as a setting
  2. Add support for arbitrary key/value pair to be used as a setting (perhaps a bit more future-proof?)
  • Note: there are other unsupported flags such as --clear-max-instances and --clear-vpc-connector

In either case, that comes to the question of how to support flags that don't accept any value.

These two options are relatively frictionless:

  1. only accept the input of "true"
  2. have a setting called inputless_args (or preferably something better) that takes in an array of strings that will be added as flags.
1     functions:
        - myAwesomeFunction:
            - trigger: http
              allow-unauthenticated: true
              clear-max-instances: true
2     functions:
        - myAwesomeFunction:
            - trigger: http
              inputless_args:
                - [allow-unauthenticated, clear-max-instances]

Let me know your thoughts!

Thanks so much for sharing project with the world!

@oliver006
Copy link
Owner

Glad you find this little project useful :-)

I'd say version one makes more sense, it's cleaner and more explicit which helps IMO.
I could see how version two could work by allowing to pass arbitrary parameters to the gcloud function:

      functions:
        - myAwesomeFunction:
            - trigger: http
              addtl_args:
                - ["--allow-unauthenticated", "--clear-max-instances", "--another-arg=123"]

But I think I prefer version one for essential flags like "allow-unauthenticated" but if you also want to add "addtl_args" on top of that I'd be fine with that.

oliver006 pushed a commit that referenced this issue Jul 10, 2020
* added allow-unauthenticated flag support

* add option for false and updated readme
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.

2 participants