Ability to reference the EFS volume in Cloud Formation / addons
Hi,
I am provisioning an EFS volume using the following type of thing in manifest.yml
storage:
volumes:
wp-content:
path: /test/efs
read_only: false
efs: true
I'd like to be able to reference this in the addons functionality. As an example, we have a system that uses lambda to scale the IOPS of the EFS volume up and down, and so we'd like to write Cloud Formation templates in the addons directory to create CloudWatch alarms that reference the ID of the volume that CoPilot creates.
Is this possible? At the moment, we're struggling how we can reference those EFS volumes.
Hi @tomkerswill !
To create the CloudWatch alarm are you looking for the volume ID or the EFS FileSystem ID ? Glancing at the CloudWatch metrics for EFS https://docs.aws.amazon.com/efs/latest/ug/efs-metrics.html I saw that they are namespaced by FileSystemId so I wanted to make sure.
- If it's
FileSystemId, Copilot exports the following output in the environment stack: https://github.com/aws/copilot-cli/blob/0bea71053c1f260ad4f832d7cb550353941f5d51/internal/pkg/template/templates/environment/cf.yml#L582-L587
It's possible to import it in addons using:
Fn::ImportValue:
!Sub '${App}-${Env}-FilesystemID'
- If it's another type of resource that's created in the service stack, perhaps this section of addons can help: https://aws.github.io/copilot-cli/docs/developing/additional-aws-resources/#customizing-the-parameters-section
Thank you!
This issue is stale because it has been open 60 days with no response activity, and is tagged with pending/question. Remove the stale label, add a comment, or this will be closed in 14 days.
This issue is closed due to inactivity. Feel free to reopen the issue if you have any follow-ups!