Skip to content

Local config file is deleted when using tar_resources_aws()? #1327

Closed Answered by philiporlando
philiporlando asked this question in Help
Discussion options

You must be logged in to vote

Thanks for clarifying this! I wasn’t entirely sure how to implement the temporary local copy of the config.yml approach you suggested, but I believe I've found a workable solution by overwriting the default repository for this target.

library(targets)

resources <- tar_resources(
  tar_resources_aws(
    bucket = "my-bucket",
    prefix = "my-project"
    )
  )
)

tar_option_set(
  repository = "aws",
  resources = resources
)

list(
  tar_target(
    config_file,
    command = "config.yml",
    format = "file",
    repository = "local" # overwrite default repository to prevent the local file from being deleted
  ),
  tar_target(
    config_value,
    config::get(value = "config_value", file

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@wlandau
Comment options

@philiporlando
Comment options

Answer selected by philiporlando
@wlandau
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants