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

Support environment variables for AppSync #3877

Open
stooj opened this issue Apr 29, 2024 · 8 comments
Open

Support environment variables for AppSync #3877

stooj opened this issue Apr 29, 2024 · 8 comments
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/enhancement Improvements or new features service/appsync Issues with appsync module (and AWS service)

Comments

@stooj
Copy link
Contributor

stooj commented Apr 29, 2024

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

AWS AppSync supports environment variables in GraphQL resolvers and functions.

We were hoping we could use an environment variable so that the datasource code can be used on any branch.

When managing graphQL resources, could we have an option to manage the environment variables as well?

Docs to configure env vars using the cli

Affected area/feature

@stooj stooj added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Apr 29, 2024
@t0yv0
Copy link
Member

t0yv0 commented Apr 30, 2024

Thanks for the feature request @stooj !

At a glance it appears that https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/appsync_graphql_api could have supported environment variables, in which case this Pulumi projected provider would land the functionality as well, does that look right? I'm not yet very familiar with AppSync so double-checking. It appears there are no issues tracking this upstream yet, but if this is what's needed I can open one.

@t0yv0 t0yv0 added service/appsync Issues with appsync module (and AWS service) awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). and removed needs-triage Needs attention from the triage team labels Apr 30, 2024
@stooj
Copy link
Contributor Author

stooj commented May 3, 2024

Thanks @t0yv0 - I agree that it needs an upstream issue. I'll open one up.

@stooj
Copy link
Contributor Author

stooj commented May 16, 2024

Appsync env vars are supported in the terraform aws-sdk-go-v2 sdk, but the AppSync service in the terraform provider has not been ported to v2 yet: https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/appsync/graphql_api.go

There is an open issue and an unmerged PR that will close this issue once it gets merged and released.

@SethThomas
Copy link

I stumbled across this issue trying to track down the same feature. The aforementioned unmerged PR is now merged. 🙂

@stooj
Copy link
Contributor Author

stooj commented Aug 12, 2024

The aforementioned unmerged PR is now merged

Which was included in v6.42.0 of pulumi-aws. 🎊

@SethThomas - are they still not working or are you using an older version?

@mikhailshilkov mikhailshilkov self-assigned this Sep 20, 2024
@mikhailshilkov mikhailshilkov added resolution/fixed This issue was fixed and removed awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). labels Sep 20, 2024
@mikhailshilkov
Copy link
Member

The upstream issue got closed, and we received confirmation that it works on our side, closing

@flostadler flostadler reopened this Dec 2, 2024
@flostadler flostadler removed the resolution/fixed This issue was fixed label Dec 2, 2024
@flostadler
Copy link
Contributor

This issue is not resolved yet. The upstream provider did upgraded the appsync SDK to use aws-sdk-go-v2, which supports configuring environment variables for AppSync.

But upstream did not implement this feature yet, so this is not exposed in any way. Support for it is tracked here: hashicorp/terraform-provider-aws#38051

@flostadler flostadler added the awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). label Dec 2, 2024
@flostadler
Copy link
Contributor

In the meantime you could give the GraphQlApi from aws-native a try.
I see that that one supports configuring environment variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/enhancement Improvements or new features service/appsync Issues with appsync module (and AWS service)
Projects
None yet
Development

No branches or pull requests

5 participants