Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.gcp.dataform.kotlin.RepositoryReleaseConfigArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.dataform.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.dataform.RepositoryReleaseConfigArgs.builder
import com.pulumi.gcp.dataform.kotlin.inputs.RepositoryReleaseConfigCodeCompilationConfigArgs
import com.pulumi.gcp.dataform.kotlin.inputs.RepositoryReleaseConfigCodeCompilationConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* ## Example Usage
* ### Dataform Repository Release Config
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const gitRepository = new gcp.sourcerepo.Repository("git_repository", {name: "my/repository"});
* const secret = new gcp.secretmanager.Secret("secret", {
* secretId: "my_secret",
* replication: {
* auto: {},
* },
* });
* const secretVersion = new gcp.secretmanager.SecretVersion("secret_version", {
* secret: secret.id,
* secretData: "secret-data",
* });
* const repository = new gcp.dataform.Repository("repository", {
* name: "dataform_repository",
* region: "us-central1",
* gitRemoteSettings: {
* url: gitRepository.url,
* defaultBranch: "main",
* authenticationTokenSecretVersion: secretVersion.id,
* },
* workspaceCompilationOverrides: {
* defaultDatabase: "database",
* schemaSuffix: "_suffix",
* tablePrefix: "prefix_",
* },
* });
* const release = new gcp.dataform.RepositoryReleaseConfig("release", {
* project: repository.project,
* region: repository.region,
* repository: repository.name,
* name: "my_release",
* gitCommitish: "main",
* cronSchedule: "0 7 * * *",
* timeZone: "America/New_York",
* codeCompilationConfig: {
* defaultDatabase: "gcp-example-project",
* defaultSchema: "example-dataset",
* defaultLocation: "us-central1",
* assertionSchema: "example-assertion-dataset",
* databaseSuffix: "",
* schemaSuffix: "",
* tablePrefix: "",
* vars: {
* var1: "value",
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* git_repository = gcp.sourcerepo.Repository("git_repository", name="my/repository")
* secret = gcp.secretmanager.Secret("secret",
* secret_id="my_secret",
* replication={
* "auto": {},
* })
* secret_version = gcp.secretmanager.SecretVersion("secret_version",
* secret=secret.id,
* secret_data="secret-data")
* repository = gcp.dataform.Repository("repository",
* name="dataform_repository",
* region="us-central1",
* git_remote_settings={
* "url": git_repository.url,
* "default_branch": "main",
* "authentication_token_secret_version": secret_version.id,
* },
* workspace_compilation_overrides={
* "default_database": "database",
* "schema_suffix": "_suffix",
* "table_prefix": "prefix_",
* })
* release = gcp.dataform.RepositoryReleaseConfig("release",
* project=repository.project,
* region=repository.region,
* repository=repository.name,
* name="my_release",
* git_commitish="main",
* cron_schedule="0 7 * * *",
* time_zone="America/New_York",
* code_compilation_config={
* "default_database": "gcp-example-project",
* "default_schema": "example-dataset",
* "default_location": "us-central1",
* "assertion_schema": "example-assertion-dataset",
* "database_suffix": "",
* "schema_suffix": "",
* "table_prefix": "",
* "vars": {
* "var1": "value",
* },
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var gitRepository = new Gcp.SourceRepo.Repository("git_repository", new()
* {
* Name = "my/repository",
* });
* var secret = new Gcp.SecretManager.Secret("secret", new()
* {
* SecretId = "my_secret",
* Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
* {
* Auto = null,
* },
* });
* var secretVersion = new Gcp.SecretManager.SecretVersion("secret_version", new()
* {
* Secret = secret.Id,
* SecretData = "secret-data",
* });
* var repository = new Gcp.Dataform.Repository("repository", new()
* {
* Name = "dataform_repository",
* Region = "us-central1",
* GitRemoteSettings = new Gcp.Dataform.Inputs.RepositoryGitRemoteSettingsArgs
* {
* Url = gitRepository.Url,
* DefaultBranch = "main",
* AuthenticationTokenSecretVersion = secretVersion.Id,
* },
* WorkspaceCompilationOverrides = new Gcp.Dataform.Inputs.RepositoryWorkspaceCompilationOverridesArgs
* {
* DefaultDatabase = "database",
* SchemaSuffix = "_suffix",
* TablePrefix = "prefix_",
* },
* });
* var release = new Gcp.Dataform.RepositoryReleaseConfig("release", new()
* {
* Project = repository.Project,
* Region = repository.Region,
* Repository = repository.Name,
* Name = "my_release",
* GitCommitish = "main",
* CronSchedule = "0 7 * * *",
* TimeZone = "America/New_York",
* CodeCompilationConfig = new Gcp.Dataform.Inputs.RepositoryReleaseConfigCodeCompilationConfigArgs
* {
* DefaultDatabase = "gcp-example-project",
* DefaultSchema = "example-dataset",
* DefaultLocation = "us-central1",
* AssertionSchema = "example-assertion-dataset",
* DatabaseSuffix = "",
* SchemaSuffix = "",
* TablePrefix = "",
* Vars =
* {
* { "var1", "value" },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dataform"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/secretmanager"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/sourcerepo"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* gitRepository, err := sourcerepo.NewRepository(ctx, "git_repository", &sourcerepo.RepositoryArgs{
* Name: pulumi.String("my/repository"),
* })
* if err != nil {
* return err
* }
* secret, err := secretmanager.NewSecret(ctx, "secret", &secretmanager.SecretArgs{
* SecretId: pulumi.String("my_secret"),
* Replication: &secretmanager.SecretReplicationArgs{
* Auto: nil,
* },
* })
* if err != nil {
* return err
* }
* secretVersion, err := secretmanager.NewSecretVersion(ctx, "secret_version", &secretmanager.SecretVersionArgs{
* Secret: secret.ID(),
* SecretData: pulumi.String("secret-data"),
* })
* if err != nil {
* return err
* }
* repository, err := dataform.NewRepository(ctx, "repository", &dataform.RepositoryArgs{
* Name: pulumi.String("dataform_repository"),
* Region: pulumi.String("us-central1"),
* GitRemoteSettings: &dataform.RepositoryGitRemoteSettingsArgs{
* Url: gitRepository.Url,
* DefaultBranch: pulumi.String("main"),
* AuthenticationTokenSecretVersion: secretVersion.ID(),
* },
* WorkspaceCompilationOverrides: &dataform.RepositoryWorkspaceCompilationOverridesArgs{
* DefaultDatabase: pulumi.String("database"),
* SchemaSuffix: pulumi.String("_suffix"),
* TablePrefix: pulumi.String("prefix_"),
* },
* })
* if err != nil {
* return err
* }
* _, err = dataform.NewRepositoryReleaseConfig(ctx, "release", &dataform.RepositoryReleaseConfigArgs{
* Project: repository.Project,
* Region: repository.Region,
* Repository: repository.Name,
* Name: pulumi.String("my_release"),
* GitCommitish: pulumi.String("main"),
* CronSchedule: pulumi.String("0 7 * * *"),
* TimeZone: pulumi.String("America/New_York"),
* CodeCompilationConfig: &dataform.RepositoryReleaseConfigCodeCompilationConfigArgs{
* DefaultDatabase: pulumi.String("gcp-example-project"),
* DefaultSchema: pulumi.String("example-dataset"),
* DefaultLocation: pulumi.String("us-central1"),
* AssertionSchema: pulumi.String("example-assertion-dataset"),
* DatabaseSuffix: pulumi.String(""),
* SchemaSuffix: pulumi.String(""),
* TablePrefix: pulumi.String(""),
* Vars: pulumi.StringMap{
* "var1": pulumi.String("value"),
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.sourcerepo.Repository;
* import com.pulumi.gcp.sourcerepo.RepositoryArgs;
* import com.pulumi.gcp.secretmanager.Secret;
* import com.pulumi.gcp.secretmanager.SecretArgs;
* import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
* import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
* import com.pulumi.gcp.secretmanager.SecretVersion;
* import com.pulumi.gcp.secretmanager.SecretVersionArgs;
* import com.pulumi.gcp.dataform.Repository;
* import com.pulumi.gcp.dataform.RepositoryArgs;
* import com.pulumi.gcp.dataform.inputs.RepositoryGitRemoteSettingsArgs;
* import com.pulumi.gcp.dataform.inputs.RepositoryWorkspaceCompilationOverridesArgs;
* import com.pulumi.gcp.dataform.RepositoryReleaseConfig;
* import com.pulumi.gcp.dataform.RepositoryReleaseConfigArgs;
* import com.pulumi.gcp.dataform.inputs.RepositoryReleaseConfigCodeCompilationConfigArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var gitRepository = new Repository("gitRepository", RepositoryArgs.builder()
* .name("my/repository")
* .build());
* var secret = new Secret("secret", SecretArgs.builder()
* .secretId("my_secret")
* .replication(SecretReplicationArgs.builder()
* .auto()
* .build())
* .build());
* var secretVersion = new SecretVersion("secretVersion", SecretVersionArgs.builder()
* .secret(secret.id())
* .secretData("secret-data")
* .build());
* var repository = new Repository("repository", RepositoryArgs.builder()
* .name("dataform_repository")
* .region("us-central1")
* .gitRemoteSettings(RepositoryGitRemoteSettingsArgs.builder()
* .url(gitRepository.url())
* .defaultBranch("main")
* .authenticationTokenSecretVersion(secretVersion.id())
* .build())
* .workspaceCompilationOverrides(RepositoryWorkspaceCompilationOverridesArgs.builder()
* .defaultDatabase("database")
* .schemaSuffix("_suffix")
* .tablePrefix("prefix_")
* .build())
* .build());
* var release = new RepositoryReleaseConfig("release", RepositoryReleaseConfigArgs.builder()
* .project(repository.project())
* .region(repository.region())
* .repository(repository.name())
* .name("my_release")
* .gitCommitish("main")
* .cronSchedule("0 7 * * *")
* .timeZone("America/New_York")
* .codeCompilationConfig(RepositoryReleaseConfigCodeCompilationConfigArgs.builder()
* .defaultDatabase("gcp-example-project")
* .defaultSchema("example-dataset")
* .defaultLocation("us-central1")
* .assertionSchema("example-assertion-dataset")
* .databaseSuffix("")
* .schemaSuffix("")
* .tablePrefix("")
* .vars(Map.of("var1", "value"))
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* gitRepository:
* type: gcp:sourcerepo:Repository
* name: git_repository
* properties:
* name: my/repository
* secret:
* type: gcp:secretmanager:Secret
* properties:
* secretId: my_secret
* replication:
* auto: {}
* secretVersion:
* type: gcp:secretmanager:SecretVersion
* name: secret_version
* properties:
* secret: ${secret.id}
* secretData: secret-data
* repository:
* type: gcp:dataform:Repository
* properties:
* name: dataform_repository
* region: us-central1
* gitRemoteSettings:
* url: ${gitRepository.url}
* defaultBranch: main
* authenticationTokenSecretVersion: ${secretVersion.id}
* workspaceCompilationOverrides:
* defaultDatabase: database
* schemaSuffix: _suffix
* tablePrefix: prefix_
* release:
* type: gcp:dataform:RepositoryReleaseConfig
* properties:
* project: ${repository.project}
* region: ${repository.region}
* repository: ${repository.name}
* name: my_release
* gitCommitish: main
* cronSchedule: 0 7 * * *
* timeZone: America/New_York
* codeCompilationConfig:
* defaultDatabase: gcp-example-project
* defaultSchema: example-dataset
* defaultLocation: us-central1
* assertionSchema: example-assertion-dataset
* databaseSuffix:
* schemaSuffix:
* tablePrefix:
* vars:
* var1: value
* ```
*
* ## Import
* RepositoryReleaseConfig can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{region}}/repositories/{{repository}}/releaseConfigs/{{name}}`
* * `{{project}}/{{region}}/{{repository}}/{{name}}`
* * `{{region}}/{{repository}}/{{name}}`
* * `{{repository}}/{{name}}`
* When using the `pulumi import` command, RepositoryReleaseConfig can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:dataform/repositoryReleaseConfig:RepositoryReleaseConfig default projects/{{project}}/locations/{{region}}/repositories/{{repository}}/releaseConfigs/{{name}}
* ```
* ```sh
* $ pulumi import gcp:dataform/repositoryReleaseConfig:RepositoryReleaseConfig default {{project}}/{{region}}/{{repository}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:dataform/repositoryReleaseConfig:RepositoryReleaseConfig default {{region}}/{{repository}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:dataform/repositoryReleaseConfig:RepositoryReleaseConfig default {{repository}}/{{name}}
* ```
* @property codeCompilationConfig Optional. If set, fields of codeCompilationConfig override the default compilation settings that are specified in dataform.json.
* Structure is documented below.
* @property cronSchedule Optional. Optional schedule (in cron format) for automatic creation of compilation results.
* @property gitCommitish Git commit/tag/branch name at which the repository should be compiled. Must exist in the remote repository.
* - - -
* @property name The release's name.
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
* @property region A reference to the region
* @property repository A reference to the Dataform repository
* @property timeZone Optional. Specifies the time zone to be used when interpreting cronSchedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If left unspecified, the default is UTC.
*/
public data class RepositoryReleaseConfigArgs(
public val codeCompilationConfig: Output? =
null,
public val cronSchedule: Output? = null,
public val gitCommitish: Output? = null,
public val name: Output? = null,
public val project: Output? = null,
public val region: Output? = null,
public val repository: Output? = null,
public val timeZone: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.dataform.RepositoryReleaseConfigArgs =
com.pulumi.gcp.dataform.RepositoryReleaseConfigArgs.builder()
.codeCompilationConfig(
codeCompilationConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.cronSchedule(cronSchedule?.applyValue({ args0 -> args0 }))
.gitCommitish(gitCommitish?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.region(region?.applyValue({ args0 -> args0 }))
.repository(repository?.applyValue({ args0 -> args0 }))
.timeZone(timeZone?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RepositoryReleaseConfigArgs].
*/
@PulumiTagMarker
public class RepositoryReleaseConfigArgsBuilder internal constructor() {
private var codeCompilationConfig: Output? =
null
private var cronSchedule: Output? = null
private var gitCommitish: Output? = null
private var name: Output? = null
private var project: Output? = null
private var region: Output? = null
private var repository: Output? = null
private var timeZone: Output? = null
/**
* @param value Optional. If set, fields of codeCompilationConfig override the default compilation settings that are specified in dataform.json.
* Structure is documented below.
*/
@JvmName("evrcxywpuguuewkb")
public suspend fun codeCompilationConfig(`value`: Output) {
this.codeCompilationConfig = value
}
/**
* @param value Optional. Optional schedule (in cron format) for automatic creation of compilation results.
*/
@JvmName("ptefwvbwmwuluxgk")
public suspend fun cronSchedule(`value`: Output) {
this.cronSchedule = value
}
/**
* @param value Git commit/tag/branch name at which the repository should be compiled. Must exist in the remote repository.
* - - -
*/
@JvmName("bcsibygoswmjcjyp")
public suspend fun gitCommitish(`value`: Output) {
this.gitCommitish = value
}
/**
* @param value The release's name.
*/
@JvmName("ghkvqivwucxoghnl")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("owaulqydqttfmiin")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value A reference to the region
*/
@JvmName("vfmmeinaahasmpxh")
public suspend fun region(`value`: Output) {
this.region = value
}
/**
* @param value A reference to the Dataform repository
*/
@JvmName("egqdgmfvrrbjhwde")
public suspend fun repository(`value`: Output) {
this.repository = value
}
/**
* @param value Optional. Specifies the time zone to be used when interpreting cronSchedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If left unspecified, the default is UTC.
*/
@JvmName("nealmxxbfqwkggrk")
public suspend fun timeZone(`value`: Output) {
this.timeZone = value
}
/**
* @param value Optional. If set, fields of codeCompilationConfig override the default compilation settings that are specified in dataform.json.
* Structure is documented below.
*/
@JvmName("aglrxqqekchxibhg")
public suspend fun codeCompilationConfig(`value`: RepositoryReleaseConfigCodeCompilationConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.codeCompilationConfig = mapped
}
/**
* @param argument Optional. If set, fields of codeCompilationConfig override the default compilation settings that are specified in dataform.json.
* Structure is documented below.
*/
@JvmName("knntsvgpstptwcdn")
public suspend fun codeCompilationConfig(argument: suspend RepositoryReleaseConfigCodeCompilationConfigArgsBuilder.() -> Unit) {
val toBeMapped = RepositoryReleaseConfigCodeCompilationConfigArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.codeCompilationConfig = mapped
}
/**
* @param value Optional. Optional schedule (in cron format) for automatic creation of compilation results.
*/
@JvmName("wsgtuscxrysxwyrr")
public suspend fun cronSchedule(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.cronSchedule = mapped
}
/**
* @param value Git commit/tag/branch name at which the repository should be compiled. Must exist in the remote repository.
* - - -
*/
@JvmName("wsnggcjelqdstmlb")
public suspend fun gitCommitish(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.gitCommitish = mapped
}
/**
* @param value The release's name.
*/
@JvmName("rwltjdvyrnawtrya")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("hkkurdbidxjdprsj")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
/**
* @param value A reference to the region
*/
@JvmName("orgkberuvqyehbfy")
public suspend fun region(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.region = mapped
}
/**
* @param value A reference to the Dataform repository
*/
@JvmName("euwaviqtlhvrhjol")
public suspend fun repository(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.repository = mapped
}
/**
* @param value Optional. Specifies the time zone to be used when interpreting cronSchedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If left unspecified, the default is UTC.
*/
@JvmName("sufvbqpcfuddtywh")
public suspend fun timeZone(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.timeZone = mapped
}
internal fun build(): RepositoryReleaseConfigArgs = RepositoryReleaseConfigArgs(
codeCompilationConfig = codeCompilationConfig,
cronSchedule = cronSchedule,
gitCommitish = gitCommitish,
name = name,
project = project,
region = region,
repository = repository,
timeZone = timeZone,
)
}