This topic describes how to apply Terraform Plan.
Run
terraform apply
to apply the configuration and create the repository and worker on your JFrog platform if you are satisfied with the configuration.jfrog ~/Desktop/WorkersTF $ terraform apply Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # artifactory_local_generic_repository.my_generic_local1 will be created + resource "artifactory_local_generic_repository" "my_generic_local1" { + archive_browsing_enabled = false + blacked_out = false + cdn_redirect = false + download_direct = false + id = (known after apply) + includes_pattern = "**/*" + key = "my-generic-local1" + priority_resolution = false + project_environments = (known after apply) + repo_layout_ref = "simple-default" + xray_index = false # (4 unchanged attributes hidden) } # platform_workers_service.my_workers_service will be created + resource "platform_workers_service" "my_workers_service" { + action = "BEFORE_DOWNLOAD" + description = "My workers service" + enabled = true + filter_criteria = { + artifact_filter_criteria = { + repo_keys = [ + "my-generic-local1", ] } } + key = "my-workers-service" + secrets = [ + { + key = "my-secret-key-1" + value = "my-secret-value-1" }, + { + key = "my-secret-key-2" + value = "my-secret-value-2" }, ] + source_code = <<-EOT export default async (context: PlatformContext, data: BeforeDownloadRequest): Promise<BeforeDownloadResponse> => { console.log(await context.clients.platformHttp.get('/artifactory/api/system/ping')); return { status: 'DOWNLOAD_PROCEED', message: 'proceed' }; } EOT } Plan: 2 to add, 0 to change, 0 to destroy. Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes artifactory_local_generic_repository.my_generic_local1: Creating... artifactory_local_generic_repository.my_generic_local1: Creation complete after 0s [id=my-generic-local1] platform_workers_service.my_workers_service: Creating... platform_workers_service.my_workers_service: Creation complete after 1s Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
Enter
Yes
to apply the changes.
The worker should now be created on your JFrog Platform.