Skip to content

Instantly share code, notes, and snippets.

@apr-1985
Created October 10, 2022 13:38
Show Gist options
  • Save apr-1985/f67ca9abd2dc4ed95fe3711efdf417fe to your computer and use it in GitHub Desktop.
Save apr-1985/f67ca9abd2dc4ed95fe3711efdf417fe to your computer and use it in GitHub Desktop.
medium-3-ways-to-bootstrap-artifactory
resource "artifactory_remote_docker_repository" "docker-remote" {
key = "docker-remote"
url = "https://registry-1.docker.io/"
repo_layout_ref = "simple-default"
block_pushing_schema1 = false
enable_token_authentication = true
retrieval_cache_period_seconds = 7200
username = "DOCKER_USER"
password = "PASSWORD"
unused_artifacts_cleanup_period_hours = 36
}
resource "artifactory_remote_docker_repository" "docker-elastic-remote" {
key = "docker-elastic-remote"
url = "https://docker.elastic.co/"
repo_layout_ref = "simple-default"
block_pushing_schema1 = false
enable_token_authentication = true
unused_artifacts_cleanup_period_hours = 48
}
resource "artifactory_virtual_docker_repository" "docker-default-virtual" {
key = "docker-default-virtual"
repositories = [artifactory_remote_docker_repository.docker-remote.key, artifactory_remote_docker_repository.docker-elastic-remote.key]
description = "Default Repositories for Docker Virtuals"
}
resource "artifactory_general_security" "security" {
enable_anonymous_access = true
}
resource "artifactory_backup" "backup_config_name" {
key = "backup"
enabled = false
cron_exp = "0 0 2 ? * MON-FRI"
retention_period_hours = 24
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment