Skip to content

rosmo/terraform-provider-gcrane

Repository files navigation

Terraform Provider for gcrane

Terraform provider for gcrane.

Allows copying images between Docker registries and also fetching some details (like images, tags, etc). Does not require gcrane or Docker installed.

This is a community maintained provider and not an official Google or Hashicorp product.

# The provider creates a temporary Docker config
provider "gcrane" {
  docker_config = <<-EOT
    {
      "auths": {
        "https://index.docker.io/v1/": {
          "auth": "12345678...abc..."
        },
      }
      "credHelpers": {
        "europe-west4-docker.pkg.dev": "gcloud"
      }
    }
  EOT
}

resource "gcrane_copy" "copied_image" {
  recursive = false

  source = "google/cloud-sdk:slim"
  destination = "europe-west4-docker.pkg.dev/my-project/my-repo/my-image:latest"
}

data "gcrane_list" "images" {
  repository = "google/cloud-sdk"
}

Requirements

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the Go install command:
go install

Adding Dependencies

This provider uses Go modules. Please see the Go documentation for the most up to date information about using Go modules.

To add a new dependency github.com/author/dependency to your Terraform provider:

go get github.com/author/dependency
go mod tidy

Then commit the changes to go.mod and go.sum.

About

Gcrane provider for Terraform

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •