gcp.firebase.ProjectLocation
Sets the default Google Cloud Platform (GCP) resource location for the specified FirebaseProject. This method creates an App Engine application with a default Cloud Storage bucket, located in the specified locationId. This location must be one of the available GCP resource locations. After the default GCP resource location is finalized, or if it was already set, it cannot be changed. The default GCP resource location for the specified FirebaseProject might already be set because either the GCP Project already has an App Engine application or defaultLocation.finalize was previously called with a specified locationId. Any new calls to defaultLocation.finalize with a different specified locationId will return a 409 error.
To get more information about ProjectLocation, see:
- API documentation
- How-to Guides
Example Usage
Firebase Project Location Basic
using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var defaultProject = new Gcp.Organizations.Project("defaultProject", new()
{
ProjectId = "tf-test",
OrgId = "123456789",
Labels =
{
{ "firebase", "enabled" },
},
}, new CustomResourceOptions
{
Provider = google_beta,
});
var defaultFirebase_projectProject = new Gcp.Firebase.Project("defaultFirebase/projectProject", new()
{
ProjectID = defaultProject.ProjectId,
}, new CustomResourceOptions
{
Provider = google_beta,
});
var basic = new Gcp.Firebase.ProjectLocation("basic", new()
{
Project = defaultFirebase / projectProject.Project,
LocationId = "us-central",
}, new CustomResourceOptions
{
Provider = google_beta,
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/firebase"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/organizations"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
defaultProject, err := organizations.NewProject(ctx, "defaultProject", &organizations.ProjectArgs{
ProjectId: pulumi.String("tf-test"),
OrgId: pulumi.String("123456789"),
Labels: pulumi.StringMap{
"firebase": pulumi.String("enabled"),
},
}, pulumi.Provider(google_beta))
if err != nil {
return err
}
_, err = firebase.NewProject(ctx, "defaultFirebase/projectProject", &firebase.ProjectArgs{
Project: defaultProject.ProjectId,
}, pulumi.Provider(google_beta))
if err != nil {
return err
}
_, err = firebase.NewProjectLocation(ctx, "basic", &firebase.ProjectLocationArgs{
Project: defaultFirebase / projectProject.Project,
LocationId: pulumi.String("us-central"),
}, pulumi.Provider(google_beta))
if err != nil {
return err
}
return nil
})
}
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 com.pulumi.gcp.firebase.ProjectLocation;
import com.pulumi.gcp.firebase.ProjectLocationArgs;
import com.pulumi.resources.CustomResourceOptions;
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 defaultProject = new Project("defaultProject", ProjectArgs.builder()
.projectId("tf-test")
.orgId("123456789")
.labels(Map.of("firebase", "enabled"))
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var defaultFirebase_projectProject = new Project("defaultFirebase/projectProject", ProjectArgs.builder()
.project(defaultProject.projectId())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var basic = new ProjectLocation("basic", ProjectLocationArgs.builder()
.project(defaultFirebase / projectProject.project())
.locationId("us-central")
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
}
}
import pulumi
import pulumi_gcp as gcp
default_project = gcp.organizations.Project("defaultProject",
project_id="tf-test",
org_id="123456789",
labels={
"firebase": "enabled",
},
opts=pulumi.ResourceOptions(provider=google_beta))
default_firebase_project_project = gcp.firebase.Project("defaultFirebase/projectProject", project=default_project.project_id,
opts=pulumi.ResourceOptions(provider=google_beta))
basic = gcp.firebase.ProjectLocation("basic",
project=default_firebase / project_project["project"],
location_id="us-central",
opts=pulumi.ResourceOptions(provider=google_beta))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const defaultProject = new gcp.organizations.Project("defaultProject", {
projectId: "tf-test",
orgId: "123456789",
labels: {
firebase: "enabled",
},
}, {
provider: google_beta,
});
const defaultFirebase_projectProject = new gcp.firebase.Project("defaultFirebase/projectProject", {project: defaultProject.projectId}, {
provider: google_beta,
});
const basic = new gcp.firebase.ProjectLocation("basic", {
project: defaultFirebase / projectProject.project,
locationId: "us-central",
}, {
provider: google_beta,
});
Coming soon!
Create ProjectLocation Resource
new ProjectLocation(name: string, args: ProjectLocationArgs, opts?: CustomResourceOptions);
@overload
def ProjectLocation(resource_name: str,
opts: Optional[ResourceOptions] = None,
location_id: Optional[str] = None,
project: Optional[str] = None)
@overload
def ProjectLocation(resource_name: str,
args: ProjectLocationArgs,
opts: Optional[ResourceOptions] = None)
func NewProjectLocation(ctx *Context, name string, args ProjectLocationArgs, opts ...ResourceOption) (*ProjectLocation, error)
public ProjectLocation(string name, ProjectLocationArgs args, CustomResourceOptions? opts = null)
public ProjectLocation(String name, ProjectLocationArgs args)
public ProjectLocation(String name, ProjectLocationArgs args, CustomResourceOptions options)
type: gcp:firebase:ProjectLocation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectLocationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ProjectLocationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ProjectLocationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectLocationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectLocationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ProjectLocation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ProjectLocation resource accepts the following input properties:
- Location
Id string The ID of the default GCP resource location for the Project. The location must be one of the available GCP resource locations.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Location
Id string The ID of the default GCP resource location for the Project. The location must be one of the available GCP resource locations.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location
Id String The ID of the default GCP resource location for the Project. The location must be one of the available GCP resource locations.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location
Id string The ID of the default GCP resource location for the Project. The location must be one of the available GCP resource locations.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location_
id str The ID of the default GCP resource location for the Project. The location must be one of the available GCP resource locations.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location
Id String The ID of the default GCP resource location for the Project. The location must be one of the available GCP resource locations.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectLocation resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing ProjectLocation Resource
Get an existing ProjectLocation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ProjectLocationState, opts?: CustomResourceOptions): ProjectLocation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
location_id: Optional[str] = None,
project: Optional[str] = None) -> ProjectLocation
func GetProjectLocation(ctx *Context, name string, id IDInput, state *ProjectLocationState, opts ...ResourceOption) (*ProjectLocation, error)
public static ProjectLocation Get(string name, Input<string> id, ProjectLocationState? state, CustomResourceOptions? opts = null)
public static ProjectLocation get(String name, Output<String> id, ProjectLocationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Location
Id string The ID of the default GCP resource location for the Project. The location must be one of the available GCP resource locations.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Location
Id string The ID of the default GCP resource location for the Project. The location must be one of the available GCP resource locations.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location
Id String The ID of the default GCP resource location for the Project. The location must be one of the available GCP resource locations.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location
Id string The ID of the default GCP resource location for the Project. The location must be one of the available GCP resource locations.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location_
id str The ID of the default GCP resource location for the Project. The location must be one of the available GCP resource locations.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location
Id String The ID of the default GCP resource location for the Project. The location must be one of the available GCP resource locations.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Import
ProjectLocation can be imported using any of these accepted formats
$ pulumi import gcp:firebase/projectLocation:ProjectLocation default projects/{{project}}
$ pulumi import gcp:firebase/projectLocation:ProjectLocation default {{project}}
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
google-beta
Terraform Provider.