Skip to content

Latest commit

 

History

History
146 lines (120 loc) · 4.34 KB

File metadata and controls

146 lines (120 loc) · 4.34 KB
page_title epilot-file_file Resource - terraform-provider-epilot-file
subcategory
description File Resource

epilot-file_file (Resource)

File Resource

Example Usage

resource "epilot-file_file" "my_file" {
  access_control = "public-read"
  acl = {
    delete = [
      "org:456"
    ]
    edit = [
      "org:456"
    ]
    view = [
      "org:456"
    ]
  }
  activity_id = "01F130Q52Q6MWSNS8N2AVXV4JN"
  additional = {
    key = jsonencode("value")
  }
  async               = true
  custom_download_url = "https://some-api-url.com/download?file_id=123"
  delete_temp_file    = false
  filename            = "document.pdf"
  fill_activity       = true
  id                  = "...my_id..."
  manifest = [
    "123e4567-e89b-12d3-a456-426614174000"
  ]
  mime_type = "application/pdf"
  purge     = true
  purpose = [
    "8d396871-95a0-4c9d-bb4d-9eda9c35776c",
    "da7cdf9a-01be-40c9-a29c-9a8f9f0de6f8",
  ]
  s3ref = {
    bucket = "epilot-prod-user-content"
    key    = "123/4d689aeb-1497-4410-a9fe-b36ca9ac4389/document.pdf"
  }
  source_url = "https://productengineer-content.s3.eu-west-1.amazonaws.com/product-engineer-checklist.pdf"
  strict     = false
  tags = [
    "tag1",
    "tag2",
  ]
  title = "document.pdf"
  type  = "font"
}

Schema

Optional

  • access_control (String) Default: "private"; must be one of ["private", "public-read"]
  • acl (Attributes) Access control list (ACL) for an entity. Defines sharing access to external orgs or users. (see below for nested schema)
  • activity_id (String) Activity to include in event feed
  • additional (Map of String) Additional fields that are not part of the schema
  • async (Boolean) Don't wait for updated entity to become available in Search API. Useful for large migrations. Default: false
  • custom_download_url (String) Custom external download url used for the file
  • delete_temp_file (Boolean) Delete the temp file from S3 after copying it permanently. Default: true
  • filename (String)
  • fill_activity (Boolean) Update the diff and entity for the custom activity included in the query. Pending state on activity is automatically ended when activity is filled. Default: false
  • manifest (List of String) Manifest ID used to create/update the entity
  • mime_type (String) MIME type of the file
  • purge (Boolean) Default: false
  • purpose (List of String)
  • s3ref (Attributes) (see below for nested schema)
  • source_url (String) Source URL for the file. Included if the entity was created from source_url, or when ?source_url=true
  • strict (Boolean) When passed true, the response will contain only fields that match the schema, with non-matching fields included in __additional. Default: false
  • tags (List of String)
  • title (String)
  • type (String) must be one of ["document", "document_template", "text", "image", "video", "audio", "spreadsheet", "presentation", "font", "archive", "application", "unknown"]

Read-Only

  • created_at (String)
  • id (String) The ID of this resource.
  • org (String)
  • owners (Attributes List) (see below for nested schema)
  • public_url (String) Direct URL for file (public only if file access control is public-read)
  • readable_size (String) Human readable file size
  • schema (String) must be "file"
  • size_bytes (Number) File size in bytes
  • updated_at (String)

Nested Schema for acl

Optional:

  • delete (List of String)
  • edit (List of String)
  • view (List of String)

Nested Schema for s3ref

Optional:

  • bucket (String) Not Null
  • key (String) Not Null

Nested Schema for owners

Read-Only:

  • org_id (String)
  • user_id (String)

Import

Import is supported using the following syntax:

In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:

import {
  to = epilot-file_file.my_epilot-file_file
  id = "..."
}

The terraform import command can be used, for example:

terraform import epilot-file_file.my_epilot-file_file "..."