Skip to content

Conversation

@AronllStone
Copy link

@AronllStone AronllStone commented Mar 18, 2022

Hello All,
I would like to add support for using secret manager environment variables to this module.

New variable: secret_environment_variables

Supported by Google provider since version 4.11.0
Available for Terraform >= v0.13.0

Example of usage:

module "http_function" {
  source  = "terraform-google-modules/event-function/google"
  ...
  secret_environment_variables = [
    {
      key        = "ACCESS_TOKEN"
      project_id = "111111"
      secret     = "SECRET_ACCESS_TOKEN"
    },
    {
      key     = "CLIENT_ID"
      secret  = "SECRET_CLIENT_ID"
      version = "1"
    }
  ]
  ...
}

@AronllStone AronllStone requested a review from morgante as a code owner March 18, 2022 08:18
@google-cla
Copy link

google-cla bot commented Mar 18, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

Copy link
Member

@bharathkkb bharathkkb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @AronllStone
Could we also showcase this in one of the examples?

@AronllStone AronllStone force-pushed the add-secrets-vars branch 3 times, most recently from 1ec5908 to b1e17d0 Compare March 21, 2022 19:04
@AronllStone AronllStone requested a review from bharathkkb March 21, 2022 19:17
@AronllStone
Copy link
Author

@bharathkkb, could you please help with logs from event-function-int-trigger check?
I can't understand why this check fell down

@bharathkkb
Copy link
Member

@AronllStone The function seems to be failing to become ready

        	Error:      	Received unexpected error:
        	            	FatalError{Underlying: error while running command: exit status 1; ╷
        	            	│ Error: Error waiting for Creating CloudFunctions Function: timeout while waiting for state to become 'done: true' (last state: 'done: false', timeout: 5m0s)
        	            	│ 
        	            	│   with module.localhost_function.google_cloudfunctions_function.main,
        	            	│   on ../../main.tf line 91, in resource "google_cloudfunctions_function" "main":
        	            	│   91: resource "google_cloudfunctions_function" "main" {
        	            	│ 
        	            	╵}

I have kicked off another build and will try to see if anything shows up in the logs

@comment-bot-dev
Copy link

@AronllStone
Thanks for the PR! 🚀
✅ Lint checks have passed.

@AronllStone
Copy link
Author

Hey, @bharathkkb & @morgante!
Is there any chance to approve/merge this PR? 😄

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 this pull request may close these issues.

4 participants