com.pulumi.gcp.firebase.kotlin.ProjectArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.firebase.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.firebase.ProjectArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* A Google Cloud Firebase instance. This enables Firebase resources on a given google project.
* Since a FirebaseProject is actually also a GCP Project, a FirebaseProject uses underlying GCP
* identifiers (most importantly, the projectId) as its own for easy interop with GCP APIs.
* Once Firebase has been added to a Google Project it cannot be removed.
* To get more information about Project, see:
* * [API documentation](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects)
* * How-to Guides
* * [Official Documentation](https://firebase.google.com/)
* ## Example Usage
* ### Firebase Project Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const _default = new gcp.organizations.Project("default", {
* projectId: "my-project",
* name: "my-project",
* orgId: "123456789",
* labels: {
* firebase: "enabled",
* },
* });
* const defaultProject = new gcp.firebase.Project("default", {project: _default.projectId});
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.organizations.Project("default",
* project_id="my-project",
* name="my-project",
* org_id="123456789",
* labels={
* "firebase": "enabled",
* })
* default_project = gcp.firebase.Project("default", project=default.project_id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var @default = new Gcp.Organizations.Project("default", new()
* {
* ProjectId = "my-project",
* Name = "my-project",
* OrgId = "123456789",
* Labels =
* {
* { "firebase", "enabled" },
* },
* });
* var defaultProject = new Gcp.Firebase.Project("default", new()
* {
* ProjectID = @default.ProjectId,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firebase"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := organizations.NewProject(ctx, "default", &organizations.ProjectArgs{
* ProjectId: pulumi.String("my-project"),
* Name: pulumi.String("my-project"),
* OrgId: pulumi.String("123456789"),
* Labels: pulumi.StringMap{
* "firebase": pulumi.String("enabled"),
* },
* })
* if err != nil {
* return err
* }
* _, err = firebase.NewProject(ctx, "default", &firebase.ProjectArgs{
* Project: _default.ProjectId,
* })
* 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.organizations.Project;
* import com.pulumi.gcp.organizations.ProjectArgs;
* import com.pulumi.gcp.firebase.Project;
* import com.pulumi.gcp.firebase.ProjectArgs;
* 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 default_ = new Project("default", ProjectArgs.builder()
* .projectId("my-project")
* .name("my-project")
* .orgId("123456789")
* .labels(Map.of("firebase", "enabled"))
* .build());
* var defaultProject = new Project("defaultProject", ProjectArgs.builder()
* .project(default_.projectId())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* default:
* type: gcp:organizations:Project
* properties:
* projectId: my-project
* name: my-project
* orgId: '123456789'
* labels:
* firebase: enabled
* defaultProject:
* type: gcp:firebase:Project
* name: default
* properties:
* project: ${default.projectId}
* ```
*
* ## Import
* Project can be imported using any of these accepted formats:
* * `projects/{{project}}`
* * `{{project}}`
* When using the `pulumi import` command, Project can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:firebase/project:Project default projects/{{project}}
* ```
* ```sh
* $ pulumi import gcp:firebase/project:Project default {{project}}
* ```
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
public data class ProjectArgs(
public val project: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.firebase.ProjectArgs =
com.pulumi.gcp.firebase.ProjectArgs.builder()
.project(project?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ProjectArgs].
*/
@PulumiTagMarker
public class ProjectArgsBuilder internal constructor() {
private var project: Output? = null
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("rscvrlrwpstkqqqf")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("rnncbfumlcuhjusn")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
internal fun build(): ProjectArgs = ProjectArgs(
project = project,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy