Open ezmiller opened 2 years ago
Fn::GetAtt
doesn't fully work, unfortunately. As a workaround, you can define getAttMap
in your serverless.yaml as described here: https://github.com/arabold/serverless-export-env#custom-resource-resolution
But I admit this should be made clearer.
Do I necessarily have to mock the value with getAttMap? I'm having issues to export my AppSync GraphQLUrl with !GetAtt.
I can't just mock the URL because I use this value in my end-to-end tests. So basically my test suite deploys a stack, generates the .env file with this plugin (including the GraphQLUrl of the API deployed during the CI/CD pipeline), tests run reading the .env file and then I clean up the stack.
From my understanding the getAttMap wouldn't be a solution in this case.
Edit: it worked just fine with older versions. I'm converting my service to Serverless v3 and for that I had to upgrade the plugin to v2.1.0, and that's breaking the part to export the AppSync GraphQLUrl.
Do I necessarily have to mock the value with getAttMap? I'm having issues to export my AppSync GraphQLUrl with !GetAtt.
I can't just mock the URL because I use this value in my end-to-end tests. So basically my test suite deploys a stack, generates the .env file with this plugin (including the GraphQLUrl of the API deployed during the CI/CD pipeline), tests run reading the .env file and then I clean up the stack.
From my understanding the getAttMap wouldn't be a solution in this case.
Edit: it worked just fine with older versions. I'm converting my service to Serverless v3 and for that I had to upgrade the plugin to v2.1.0, and that's breaking the part to export the AppSync GraphQLUrl.
serverless-appsync-plugin v2 exports AppSync URL
https://github.com/sid88in/serverless-appsync-plugin/blob/v2.0.0-alpha.12/README.md#variables
I am trying to export a function ARN that is defined in an environment variable on the provider environment:
The ARN is set correctly within the deployed environment, but the export
.env
reads:Is this a bug?