Skip to content

googleDataformRepository

A resource represents a Dataform Git repository

\~> Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.

To get more information about Repository, see:

Example Usage - Dataform Repository

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleSecretManagerSecretSecret =
  new google.secretManagerSecret.SecretManagerSecret(this, "secret", {
    provider: "${google-beta}",
    replication: [
      {
        automatic: true,
      },
    ],
    secret_id: "secret",
  });
const googleSecretManagerSecretVersionSecretVersion =
  new google.secretManagerSecretVersion.SecretManagerSecretVersion(
    this,
    "secret_version",
    {
      provider: "${google-beta}",
      secret: googleSecretManagerSecretSecret.id,
      secret_data: "secret-data",
    }
  );
const googleSourcerepoRepositoryGitRepository =
  new google.sourcerepoRepository.SourcerepoRepository(this, "git_repository", {
    name: "my/repository",
    provider: "${google-beta}",
  });
new google.dataformRepository.DataformRepository(this, "dataform_respository", {
  git_remote_settings: [
    {
      authentication_token_secret_version:
        googleSecretManagerSecretVersionSecretVersion.id,
      default_branch: "main",
      url: googleSourcerepoRepositoryGitRepository.url,
    },
  ],
  name: "dataform_repository",
  provider: "${google-beta}",
});

Argument Reference

The following arguments are supported:

  • name - (Required) The repository's name.

  • gitRemoteSettings - (Optional) Optional. If set, configures this repository to be linked to a Git remote. Structure is documented below.

  • region - (Optional) A reference to the region

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

The gitRemoteSettings block supports:

  • url - (Required) The Git remote's URL.

  • defaultBranch - (Required) The Git remote's default branch name.

  • authenticationTokenSecretVersion - (Required) The name of the Secret Manager secret version to use as an authentication token for Git operations. Must be in the format projects//secrets//versions/*.

  • tokenStatus - (Output) Indicates the status of the Git access token. https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories#TokenStatus

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format projects/{{project}}/locations/{{region}}/repositories/{{name}}

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

Repository can be imported using any of these accepted formats:

$ terraform import google_dataform_repository.default projects/{{project}}/locations/{{region}}/repositories/{{name}}
$ terraform import google_dataform_repository.default {{project}}/{{region}}/{{name}}
$ terraform import google_dataform_repository.default {{region}}/{{name}}
$ terraform import google_dataform_repository.default {{name}}

User Project Overrides

This resource supports User Project Overrides.