JetBrains / package-search-gradle-plugins

Gradle plugins for Docker, Terraform and Liquibase.
Apache License 2.0
32 stars 7 forks source link

Repository configuration #25

Open Anon1235 opened 10 months ago

Anon1235 commented 10 months ago

As an enhancement, the Terraform plugin would greatly aid organisations that have private repositories as the default 'terraform.io' url can be blocked by firewalls and other security functions.

terraform {
    repositories {
        ivy {
            url = uri("https://private.jfrog.com/terraform")
        }
    }
}
timj11dude commented 5 months ago

Inspecting the code, it appears the terraform plugin itself already does work like you expect:

internal fun Project.setupTerraformRepository() {
    repositories {
        ivy {
            name = "Terraform Executable Repository"
            url = uri("https://releases.hashicorp.com/terraform/")
            patternLayout {
                artifact("[revision]/[artifact]_[revision]_[classifier].zip")
            }
            metadataSources {
                artifact()
            }
            content {
                includeModule("hashicorp", "terraform")
            }
        }
    }
}

Should already be possible to extend it with your own repositories as you suggest.