Skip to content

Manage in-memory volume by scripting #1647

@jcpitre

Description

@jcpitre

Using the in-memory file system was introduced in #1320 (I think). At the time there was no way to configure the file system using terraform.

We should:

  • See if terraform now supports this OR
  • Use a script to create the manage the in-memory file system.

If we need to use a script, see if it can be integrated with the terraform config (e.g. run a script systematically after terraform finishes).

As an example, here is a tested script that creates and mounts an in-memory file system:

  info "Adding in-memory volume to Cloud Run service..."
  gcloud run services update "${FUNCTION_NAME}" \
    --project "${PROJECT}" \
    --region "${REGION}" \
    --add-volume name=in-memory,type=in-memory,size-limit=1Gi \
    --add-volume-mount volume=in-memory,mount-path=/tmp/in-memory \
    --quiet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions