1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. firebase
  5. HostingVersion
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

gcp.firebase.HostingVersion

Explore with Pulumi AI

Example Usage

Firebasehosting Version Redirect

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.firebase.HostingSite("default", {
    project: "my-project-name",
    siteId: "site-id",
});
const defaultHostingVersion = new gcp.firebase.HostingVersion("default", {
    siteId: _default.siteId,
    config: {
        redirects: [{
            glob: "/google/**",
            statusCode: 302,
            location: "https://www.google.com",
        }],
    },
});
const defaultHostingRelease = new gcp.firebase.HostingRelease("default", {
    siteId: _default.siteId,
    versionName: defaultHostingVersion.name,
    message: "Redirect to Google",
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.firebase.HostingSite("default",
    project="my-project-name",
    site_id="site-id")
default_hosting_version = gcp.firebase.HostingVersion("default",
    site_id=default.site_id,
    config={
        "redirects": [{
            "glob": "/google/**",
            "status_code": 302,
            "location": "https://www.google.com",
        }],
    })
default_hosting_release = gcp.firebase.HostingRelease("default",
    site_id=default.site_id,
    version_name=default_hosting_version.name,
    message="Redirect to Google")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/firebase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := firebase.NewHostingSite(ctx, "default", &firebase.HostingSiteArgs{
			Project: pulumi.String("my-project-name"),
			SiteId:  pulumi.String("site-id"),
		})
		if err != nil {
			return err
		}
		defaultHostingVersion, err := firebase.NewHostingVersion(ctx, "default", &firebase.HostingVersionArgs{
			SiteId: _default.SiteId,
			Config: &firebase.HostingVersionConfigArgs{
				Redirects: firebase.HostingVersionConfigRedirectArray{
					&firebase.HostingVersionConfigRedirectArgs{
						Glob:       pulumi.String("/google/**"),
						StatusCode: pulumi.Int(302),
						Location:   pulumi.String("https://www.google.com"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = firebase.NewHostingRelease(ctx, "default", &firebase.HostingReleaseArgs{
			SiteId:      _default.SiteId,
			VersionName: defaultHostingVersion.Name,
			Message:     pulumi.String("Redirect to Google"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.Firebase.HostingSite("default", new()
    {
        Project = "my-project-name",
        SiteId = "site-id",
    });

    var defaultHostingVersion = new Gcp.Firebase.HostingVersion("default", new()
    {
        SiteId = @default.SiteId,
        Config = new Gcp.Firebase.Inputs.HostingVersionConfigArgs
        {
            Redirects = new[]
            {
                new Gcp.Firebase.Inputs.HostingVersionConfigRedirectArgs
                {
                    Glob = "/google/**",
                    StatusCode = 302,
                    Location = "https://www.google.com",
                },
            },
        },
    });

    var defaultHostingRelease = new Gcp.Firebase.HostingRelease("default", new()
    {
        SiteId = @default.SiteId,
        VersionName = defaultHostingVersion.Name,
        Message = "Redirect to Google",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firebase.HostingSite;
import com.pulumi.gcp.firebase.HostingSiteArgs;
import com.pulumi.gcp.firebase.HostingVersion;
import com.pulumi.gcp.firebase.HostingVersionArgs;
import com.pulumi.gcp.firebase.inputs.HostingVersionConfigArgs;
import com.pulumi.gcp.firebase.HostingRelease;
import com.pulumi.gcp.firebase.HostingReleaseArgs;
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 HostingSite("default", HostingSiteArgs.builder()
            .project("my-project-name")
            .siteId("site-id")
            .build());

        var defaultHostingVersion = new HostingVersion("defaultHostingVersion", HostingVersionArgs.builder()
            .siteId(default_.siteId())
            .config(HostingVersionConfigArgs.builder()
                .redirects(HostingVersionConfigRedirectArgs.builder()
                    .glob("/google/**")
                    .statusCode(302)
                    .location("https://www.google.com")
                    .build())
                .build())
            .build());

        var defaultHostingRelease = new HostingRelease("defaultHostingRelease", HostingReleaseArgs.builder()
            .siteId(default_.siteId())
            .versionName(defaultHostingVersion.name())
            .message("Redirect to Google")
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:firebase:HostingSite
    properties:
      project: my-project-name
      siteId: site-id
  defaultHostingVersion:
    type: gcp:firebase:HostingVersion
    name: default
    properties:
      siteId: ${default.siteId}
      config:
        redirects:
          - glob: /google/**
            statusCode: 302
            location: https://www.google.com
  defaultHostingRelease:
    type: gcp:firebase:HostingRelease
    name: default
    properties:
      siteId: ${default.siteId}
      versionName: ${defaultHostingVersion.name}
      message: Redirect to Google
Copy

Firebasehosting Version Headers

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.firebase.HostingSite("default", {
    project: "my-project-name",
    siteId: "site-id",
});
const defaultHostingVersion = new gcp.firebase.HostingVersion("default", {
    siteId: _default.siteId,
    config: {
        headers: [{
            glob: "/headers/**",
            headers: {
                "my-header": "my-value",
            },
        }],
    },
});
const defaultHostingRelease = new gcp.firebase.HostingRelease("default", {
    siteId: _default.siteId,
    versionName: defaultHostingVersion.name,
    message: "With custom headers",
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.firebase.HostingSite("default",
    project="my-project-name",
    site_id="site-id")
default_hosting_version = gcp.firebase.HostingVersion("default",
    site_id=default.site_id,
    config={
        "headers": [{
            "glob": "/headers/**",
            "headers": {
                "my-header": "my-value",
            },
        }],
    })
default_hosting_release = gcp.firebase.HostingRelease("default",
    site_id=default.site_id,
    version_name=default_hosting_version.name,
    message="With custom headers")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/firebase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := firebase.NewHostingSite(ctx, "default", &firebase.HostingSiteArgs{
			Project: pulumi.String("my-project-name"),
			SiteId:  pulumi.String("site-id"),
		})
		if err != nil {
			return err
		}
		defaultHostingVersion, err := firebase.NewHostingVersion(ctx, "default", &firebase.HostingVersionArgs{
			SiteId: _default.SiteId,
			Config: &firebase.HostingVersionConfigArgs{
				Headers: firebase.HostingVersionConfigHeaderArray{
					&firebase.HostingVersionConfigHeaderArgs{
						Glob: pulumi.String("/headers/**"),
						Headers: pulumi.StringMap{
							"my-header": pulumi.String("my-value"),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = firebase.NewHostingRelease(ctx, "default", &firebase.HostingReleaseArgs{
			SiteId:      _default.SiteId,
			VersionName: defaultHostingVersion.Name,
			Message:     pulumi.String("With custom headers"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.Firebase.HostingSite("default", new()
    {
        Project = "my-project-name",
        SiteId = "site-id",
    });

    var defaultHostingVersion = new Gcp.Firebase.HostingVersion("default", new()
    {
        SiteId = @default.SiteId,
        Config = new Gcp.Firebase.Inputs.HostingVersionConfigArgs
        {
            Headers = new[]
            {
                new Gcp.Firebase.Inputs.HostingVersionConfigHeaderArgs
                {
                    Glob = "/headers/**",
                    Headers = 
                    {
                        { "my-header", "my-value" },
                    },
                },
            },
        },
    });

    var defaultHostingRelease = new Gcp.Firebase.HostingRelease("default", new()
    {
        SiteId = @default.SiteId,
        VersionName = defaultHostingVersion.Name,
        Message = "With custom headers",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firebase.HostingSite;
import com.pulumi.gcp.firebase.HostingSiteArgs;
import com.pulumi.gcp.firebase.HostingVersion;
import com.pulumi.gcp.firebase.HostingVersionArgs;
import com.pulumi.gcp.firebase.inputs.HostingVersionConfigArgs;
import com.pulumi.gcp.firebase.HostingRelease;
import com.pulumi.gcp.firebase.HostingReleaseArgs;
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 HostingSite("default", HostingSiteArgs.builder()
            .project("my-project-name")
            .siteId("site-id")
            .build());

        var defaultHostingVersion = new HostingVersion("defaultHostingVersion", HostingVersionArgs.builder()
            .siteId(default_.siteId())
            .config(HostingVersionConfigArgs.builder()
                .headers(HostingVersionConfigHeaderArgs.builder()
                    .glob("/headers/**")
                    .headers(Map.of("my-header", "my-value"))
                    .build())
                .build())
            .build());

        var defaultHostingRelease = new HostingRelease("defaultHostingRelease", HostingReleaseArgs.builder()
            .siteId(default_.siteId())
            .versionName(defaultHostingVersion.name())
            .message("With custom headers")
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:firebase:HostingSite
    properties:
      project: my-project-name
      siteId: site-id
  defaultHostingVersion:
    type: gcp:firebase:HostingVersion
    name: default
    properties:
      siteId: ${default.siteId}
      config:
        headers:
          - glob: /headers/**
            headers:
              my-header: my-value
  defaultHostingRelease:
    type: gcp:firebase:HostingRelease
    name: default
    properties:
      siteId: ${default.siteId}
      versionName: ${defaultHostingVersion.name}
      message: With custom headers
Copy

Firebasehosting Version Headers Regex

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.firebase.HostingSite("default", {
    project: "my-project-name",
    siteId: "site-id",
});
const defaultHostingVersion = new gcp.firebase.HostingVersion("default", {
    siteId: _default.siteId,
    config: {
        headers: [{
            regex: "^~/headers$",
            headers: {
                "my-header": "my-value",
            },
        }],
    },
});
const defaultHostingRelease = new gcp.firebase.HostingRelease("default", {
    siteId: _default.siteId,
    versionName: defaultHostingVersion.name,
    message: "With custom headers",
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.firebase.HostingSite("default",
    project="my-project-name",
    site_id="site-id")
default_hosting_version = gcp.firebase.HostingVersion("default",
    site_id=default.site_id,
    config={
        "headers": [{
            "regex": "^~/headers$",
            "headers": {
                "my-header": "my-value",
            },
        }],
    })
default_hosting_release = gcp.firebase.HostingRelease("default",
    site_id=default.site_id,
    version_name=default_hosting_version.name,
    message="With custom headers")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/firebase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := firebase.NewHostingSite(ctx, "default", &firebase.HostingSiteArgs{
			Project: pulumi.String("my-project-name"),
			SiteId:  pulumi.String("site-id"),
		})
		if err != nil {
			return err
		}
		defaultHostingVersion, err := firebase.NewHostingVersion(ctx, "default", &firebase.HostingVersionArgs{
			SiteId: _default.SiteId,
			Config: &firebase.HostingVersionConfigArgs{
				Headers: firebase.HostingVersionConfigHeaderArray{
					&firebase.HostingVersionConfigHeaderArgs{
						Regex: pulumi.String("^~/headers$"),
						Headers: pulumi.StringMap{
							"my-header": pulumi.String("my-value"),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = firebase.NewHostingRelease(ctx, "default", &firebase.HostingReleaseArgs{
			SiteId:      _default.SiteId,
			VersionName: defaultHostingVersion.Name,
			Message:     pulumi.String("With custom headers"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.Firebase.HostingSite("default", new()
    {
        Project = "my-project-name",
        SiteId = "site-id",
    });

    var defaultHostingVersion = new Gcp.Firebase.HostingVersion("default", new()
    {
        SiteId = @default.SiteId,
        Config = new Gcp.Firebase.Inputs.HostingVersionConfigArgs
        {
            Headers = new[]
            {
                new Gcp.Firebase.Inputs.HostingVersionConfigHeaderArgs
                {
                    Regex = "^~/headers$",
                    Headers = 
                    {
                        { "my-header", "my-value" },
                    },
                },
            },
        },
    });

    var defaultHostingRelease = new Gcp.Firebase.HostingRelease("default", new()
    {
        SiteId = @default.SiteId,
        VersionName = defaultHostingVersion.Name,
        Message = "With custom headers",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firebase.HostingSite;
import com.pulumi.gcp.firebase.HostingSiteArgs;
import com.pulumi.gcp.firebase.HostingVersion;
import com.pulumi.gcp.firebase.HostingVersionArgs;
import com.pulumi.gcp.firebase.inputs.HostingVersionConfigArgs;
import com.pulumi.gcp.firebase.HostingRelease;
import com.pulumi.gcp.firebase.HostingReleaseArgs;
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 HostingSite("default", HostingSiteArgs.builder()
            .project("my-project-name")
            .siteId("site-id")
            .build());

        var defaultHostingVersion = new HostingVersion("defaultHostingVersion", HostingVersionArgs.builder()
            .siteId(default_.siteId())
            .config(HostingVersionConfigArgs.builder()
                .headers(HostingVersionConfigHeaderArgs.builder()
                    .regex("^~/headers$")
                    .headers(Map.of("my-header", "my-value"))
                    .build())
                .build())
            .build());

        var defaultHostingRelease = new HostingRelease("defaultHostingRelease", HostingReleaseArgs.builder()
            .siteId(default_.siteId())
            .versionName(defaultHostingVersion.name())
            .message("With custom headers")
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:firebase:HostingSite
    properties:
      project: my-project-name
      siteId: site-id
  defaultHostingVersion:
    type: gcp:firebase:HostingVersion
    name: default
    properties:
      siteId: ${default.siteId}
      config:
        headers:
          - regex: ^~/headers$
            headers:
              my-header: my-value
  defaultHostingRelease:
    type: gcp:firebase:HostingRelease
    name: default
    properties:
      siteId: ${default.siteId}
      versionName: ${defaultHostingVersion.name}
      message: With custom headers
Copy

Firebasehosting Version Path

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.firebase.HostingSite("default", {
    project: "my-project-name",
    siteId: "site-id",
});
const defaultHostingVersion = new gcp.firebase.HostingVersion("default", {
    siteId: _default.siteId,
    config: {
        rewrites: [{
            glob: "**",
            path: "/index.html",
        }],
    },
});
const defaultHostingRelease = new gcp.firebase.HostingRelease("default", {
    siteId: _default.siteId,
    versionName: defaultHostingVersion.name,
    message: "Path Rewrite",
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.firebase.HostingSite("default",
    project="my-project-name",
    site_id="site-id")
default_hosting_version = gcp.firebase.HostingVersion("default",
    site_id=default.site_id,
    config={
        "rewrites": [{
            "glob": "**",
            "path": "/index.html",
        }],
    })
default_hosting_release = gcp.firebase.HostingRelease("default",
    site_id=default.site_id,
    version_name=default_hosting_version.name,
    message="Path Rewrite")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/firebase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := firebase.NewHostingSite(ctx, "default", &firebase.HostingSiteArgs{
			Project: pulumi.String("my-project-name"),
			SiteId:  pulumi.String("site-id"),
		})
		if err != nil {
			return err
		}
		defaultHostingVersion, err := firebase.NewHostingVersion(ctx, "default", &firebase.HostingVersionArgs{
			SiteId: _default.SiteId,
			Config: &firebase.HostingVersionConfigArgs{
				Rewrites: firebase.HostingVersionConfigRewriteArray{
					&firebase.HostingVersionConfigRewriteArgs{
						Glob: pulumi.String("**"),
						Path: pulumi.String("/index.html"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = firebase.NewHostingRelease(ctx, "default", &firebase.HostingReleaseArgs{
			SiteId:      _default.SiteId,
			VersionName: defaultHostingVersion.Name,
			Message:     pulumi.String("Path Rewrite"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.Firebase.HostingSite("default", new()
    {
        Project = "my-project-name",
        SiteId = "site-id",
    });

    var defaultHostingVersion = new Gcp.Firebase.HostingVersion("default", new()
    {
        SiteId = @default.SiteId,
        Config = new Gcp.Firebase.Inputs.HostingVersionConfigArgs
        {
            Rewrites = new[]
            {
                new Gcp.Firebase.Inputs.HostingVersionConfigRewriteArgs
                {
                    Glob = "**",
                    Path = "/index.html",
                },
            },
        },
    });

    var defaultHostingRelease = new Gcp.Firebase.HostingRelease("default", new()
    {
        SiteId = @default.SiteId,
        VersionName = defaultHostingVersion.Name,
        Message = "Path Rewrite",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firebase.HostingSite;
import com.pulumi.gcp.firebase.HostingSiteArgs;
import com.pulumi.gcp.firebase.HostingVersion;
import com.pulumi.gcp.firebase.HostingVersionArgs;
import com.pulumi.gcp.firebase.inputs.HostingVersionConfigArgs;
import com.pulumi.gcp.firebase.HostingRelease;
import com.pulumi.gcp.firebase.HostingReleaseArgs;
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 HostingSite("default", HostingSiteArgs.builder()
            .project("my-project-name")
            .siteId("site-id")
            .build());

        var defaultHostingVersion = new HostingVersion("defaultHostingVersion", HostingVersionArgs.builder()
            .siteId(default_.siteId())
            .config(HostingVersionConfigArgs.builder()
                .rewrites(HostingVersionConfigRewriteArgs.builder()
                    .glob("**")
                    .path("/index.html")
                    .build())
                .build())
            .build());

        var defaultHostingRelease = new HostingRelease("defaultHostingRelease", HostingReleaseArgs.builder()
            .siteId(default_.siteId())
            .versionName(defaultHostingVersion.name())
            .message("Path Rewrite")
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:firebase:HostingSite
    properties:
      project: my-project-name
      siteId: site-id
  defaultHostingVersion:
    type: gcp:firebase:HostingVersion
    name: default
    properties:
      siteId: ${default.siteId}
      config:
        rewrites:
          - glob: '**'
            path: /index.html
  defaultHostingRelease:
    type: gcp:firebase:HostingRelease
    name: default
    properties:
      siteId: ${default.siteId}
      versionName: ${defaultHostingVersion.name}
      message: Path Rewrite
Copy

Firebasehosting Version Cloud Run

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.firebase.HostingSite("default", {
    project: "my-project-name",
    siteId: "site-id",
});
const defaultService = new gcp.cloudrunv2.Service("default", {
    project: "my-project-name",
    name: "cloud-run-service-via-hosting",
    location: "us-central1",
    ingress: "INGRESS_TRAFFIC_ALL",
    template: {
        containers: [{
            image: "us-docker.pkg.dev/cloudrun/container/hello",
        }],
    },
    deletionProtection: true,
});
const defaultHostingVersion = new gcp.firebase.HostingVersion("default", {
    siteId: _default.siteId,
    config: {
        rewrites: [{
            glob: "/hello/**",
            run: {
                serviceId: defaultService.name,
                region: defaultService.location,
            },
        }],
    },
});
const defaultHostingRelease = new gcp.firebase.HostingRelease("default", {
    siteId: _default.siteId,
    versionName: defaultHostingVersion.name,
    message: "Cloud Run Integration",
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.firebase.HostingSite("default",
    project="my-project-name",
    site_id="site-id")
default_service = gcp.cloudrunv2.Service("default",
    project="my-project-name",
    name="cloud-run-service-via-hosting",
    location="us-central1",
    ingress="INGRESS_TRAFFIC_ALL",
    template={
        "containers": [{
            "image": "us-docker.pkg.dev/cloudrun/container/hello",
        }],
    },
    deletion_protection=True)
default_hosting_version = gcp.firebase.HostingVersion("default",
    site_id=default.site_id,
    config={
        "rewrites": [{
            "glob": "/hello/**",
            "run": {
                "service_id": default_service.name,
                "region": default_service.location,
            },
        }],
    })
default_hosting_release = gcp.firebase.HostingRelease("default",
    site_id=default.site_id,
    version_name=default_hosting_version.name,
    message="Cloud Run Integration")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudrunv2"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/firebase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := firebase.NewHostingSite(ctx, "default", &firebase.HostingSiteArgs{
			Project: pulumi.String("my-project-name"),
			SiteId:  pulumi.String("site-id"),
		})
		if err != nil {
			return err
		}
		defaultService, err := cloudrunv2.NewService(ctx, "default", &cloudrunv2.ServiceArgs{
			Project:  pulumi.String("my-project-name"),
			Name:     pulumi.String("cloud-run-service-via-hosting"),
			Location: pulumi.String("us-central1"),
			Ingress:  pulumi.String("INGRESS_TRAFFIC_ALL"),
			Template: &cloudrunv2.ServiceTemplateArgs{
				Containers: cloudrunv2.ServiceTemplateContainerArray{
					&cloudrunv2.ServiceTemplateContainerArgs{
						Image: pulumi.String("us-docker.pkg.dev/cloudrun/container/hello"),
					},
				},
			},
			DeletionProtection: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		defaultHostingVersion, err := firebase.NewHostingVersion(ctx, "default", &firebase.HostingVersionArgs{
			SiteId: _default.SiteId,
			Config: &firebase.HostingVersionConfigArgs{
				Rewrites: firebase.HostingVersionConfigRewriteArray{
					&firebase.HostingVersionConfigRewriteArgs{
						Glob: pulumi.String("/hello/**"),
						Run: &firebase.HostingVersionConfigRewriteRunArgs{
							ServiceId: defaultService.Name,
							Region:    defaultService.Location,
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = firebase.NewHostingRelease(ctx, "default", &firebase.HostingReleaseArgs{
			SiteId:      _default.SiteId,
			VersionName: defaultHostingVersion.Name,
			Message:     pulumi.String("Cloud Run Integration"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.Firebase.HostingSite("default", new()
    {
        Project = "my-project-name",
        SiteId = "site-id",
    });

    var defaultService = new Gcp.CloudRunV2.Service("default", new()
    {
        Project = "my-project-name",
        Name = "cloud-run-service-via-hosting",
        Location = "us-central1",
        Ingress = "INGRESS_TRAFFIC_ALL",
        Template = new Gcp.CloudRunV2.Inputs.ServiceTemplateArgs
        {
            Containers = new[]
            {
                new Gcp.CloudRunV2.Inputs.ServiceTemplateContainerArgs
                {
                    Image = "us-docker.pkg.dev/cloudrun/container/hello",
                },
            },
        },
        DeletionProtection = true,
    });

    var defaultHostingVersion = new Gcp.Firebase.HostingVersion("default", new()
    {
        SiteId = @default.SiteId,
        Config = new Gcp.Firebase.Inputs.HostingVersionConfigArgs
        {
            Rewrites = new[]
            {
                new Gcp.Firebase.Inputs.HostingVersionConfigRewriteArgs
                {
                    Glob = "/hello/**",
                    Run = new Gcp.Firebase.Inputs.HostingVersionConfigRewriteRunArgs
                    {
                        ServiceId = defaultService.Name,
                        Region = defaultService.Location,
                    },
                },
            },
        },
    });

    var defaultHostingRelease = new Gcp.Firebase.HostingRelease("default", new()
    {
        SiteId = @default.SiteId,
        VersionName = defaultHostingVersion.Name,
        Message = "Cloud Run Integration",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firebase.HostingSite;
import com.pulumi.gcp.firebase.HostingSiteArgs;
import com.pulumi.gcp.cloudrunv2.Service;
import com.pulumi.gcp.cloudrunv2.ServiceArgs;
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateArgs;
import com.pulumi.gcp.firebase.HostingVersion;
import com.pulumi.gcp.firebase.HostingVersionArgs;
import com.pulumi.gcp.firebase.inputs.HostingVersionConfigArgs;
import com.pulumi.gcp.firebase.HostingRelease;
import com.pulumi.gcp.firebase.HostingReleaseArgs;
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 HostingSite("default", HostingSiteArgs.builder()
            .project("my-project-name")
            .siteId("site-id")
            .build());

        var defaultService = new Service("defaultService", ServiceArgs.builder()
            .project("my-project-name")
            .name("cloud-run-service-via-hosting")
            .location("us-central1")
            .ingress("INGRESS_TRAFFIC_ALL")
            .template(ServiceTemplateArgs.builder()
                .containers(ServiceTemplateContainerArgs.builder()
                    .image("us-docker.pkg.dev/cloudrun/container/hello")
                    .build())
                .build())
            .deletionProtection(true)
            .build());

        var defaultHostingVersion = new HostingVersion("defaultHostingVersion", HostingVersionArgs.builder()
            .siteId(default_.siteId())
            .config(HostingVersionConfigArgs.builder()
                .rewrites(HostingVersionConfigRewriteArgs.builder()
                    .glob("/hello/**")
                    .run(HostingVersionConfigRewriteRunArgs.builder()
                        .serviceId(defaultService.name())
                        .region(defaultService.location())
                        .build())
                    .build())
                .build())
            .build());

        var defaultHostingRelease = new HostingRelease("defaultHostingRelease", HostingReleaseArgs.builder()
            .siteId(default_.siteId())
            .versionName(defaultHostingVersion.name())
            .message("Cloud Run Integration")
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:firebase:HostingSite
    properties:
      project: my-project-name
      siteId: site-id
  defaultService:
    type: gcp:cloudrunv2:Service
    name: default
    properties:
      project: my-project-name
      name: cloud-run-service-via-hosting
      location: us-central1
      ingress: INGRESS_TRAFFIC_ALL
      template:
        containers:
          - image: us-docker.pkg.dev/cloudrun/container/hello
      deletionProtection: true
  defaultHostingVersion:
    type: gcp:firebase:HostingVersion
    name: default
    properties:
      siteId: ${default.siteId}
      config:
        rewrites:
          - glob: /hello/**
            run:
              serviceId: ${defaultService.name}
              region: ${defaultService.location}
  defaultHostingRelease:
    type: gcp:firebase:HostingRelease
    name: default
    properties:
      siteId: ${default.siteId}
      versionName: ${defaultHostingVersion.name}
      message: Cloud Run Integration
Copy

Firebasehosting Version Cloud Functions

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.firebase.HostingSite("default", {
    project: "my-project-name",
    siteId: "site-id",
});
const bucket = new gcp.storage.Bucket("bucket", {
    project: "my-project-name",
    name: "site-id-function-source",
    location: "US",
    uniformBucketLevelAccess: true,
});
const object = new gcp.storage.BucketObject("object", {
    name: "function-source.zip",
    bucket: bucket.name,
    source: new pulumi.asset.FileAsset("function-source.zip"),
});
const _function = new gcp.cloudfunctionsv2.Function("function", {
    project: "my-project-name",
    name: "cloud-function-via-hosting",
    location: "us-central1",
    description: "A Cloud Function connected to Firebase Hosing",
    buildConfig: {
        runtime: "nodejs22",
        entryPoint: "helloHttp",
        source: {
            storageSource: {
                bucket: bucket.name,
                object: object.name,
            },
        },
    },
    serviceConfig: {
        maxInstanceCount: 1,
        availableMemory: "256M",
        timeoutSeconds: 60,
    },
});
const defaultHostingVersion = new gcp.firebase.HostingVersion("default", {
    siteId: _default.siteId,
    config: {
        rewrites: [{
            glob: "/hello/**",
            "function": _function.name,
        }],
    },
});
const defaultHostingRelease = new gcp.firebase.HostingRelease("default", {
    siteId: _default.siteId,
    versionName: defaultHostingVersion.name,
    message: "Cloud Functions Integration",
});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.firebase.HostingSite("default",
    project="my-project-name",
    site_id="site-id")
bucket = gcp.storage.Bucket("bucket",
    project="my-project-name",
    name="site-id-function-source",
    location="US",
    uniform_bucket_level_access=True)
object = gcp.storage.BucketObject("object",
    name="function-source.zip",
    bucket=bucket.name,
    source=pulumi.FileAsset("function-source.zip"))
function = gcp.cloudfunctionsv2.Function("function",
    project="my-project-name",
    name="cloud-function-via-hosting",
    location="us-central1",
    description="A Cloud Function connected to Firebase Hosing",
    build_config={
        "runtime": "nodejs22",
        "entry_point": "helloHttp",
        "source": {
            "storage_source": {
                "bucket": bucket.name,
                "object": object.name,
            },
        },
    },
    service_config={
        "max_instance_count": 1,
        "available_memory": "256M",
        "timeout_seconds": 60,
    })
default_hosting_version = gcp.firebase.HostingVersion("default",
    site_id=default.site_id,
    config={
        "rewrites": [{
            "glob": "/hello/**",
            "function": function.name,
        }],
    })
default_hosting_release = gcp.firebase.HostingRelease("default",
    site_id=default.site_id,
    version_name=default_hosting_version.name,
    message="Cloud Functions Integration")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudfunctionsv2"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/firebase"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := firebase.NewHostingSite(ctx, "default", &firebase.HostingSiteArgs{
			Project: pulumi.String("my-project-name"),
			SiteId:  pulumi.String("site-id"),
		})
		if err != nil {
			return err
		}
		bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
			Project:                  pulumi.String("my-project-name"),
			Name:                     pulumi.String("site-id-function-source"),
			Location:                 pulumi.String("US"),
			UniformBucketLevelAccess: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		object, err := storage.NewBucketObject(ctx, "object", &storage.BucketObjectArgs{
			Name:   pulumi.String("function-source.zip"),
			Bucket: bucket.Name,
			Source: pulumi.NewFileAsset("function-source.zip"),
		})
		if err != nil {
			return err
		}
		function, err := cloudfunctionsv2.NewFunction(ctx, "function", &cloudfunctionsv2.FunctionArgs{
			Project:     pulumi.String("my-project-name"),
			Name:        pulumi.String("cloud-function-via-hosting"),
			Location:    pulumi.String("us-central1"),
			Description: pulumi.String("A Cloud Function connected to Firebase Hosing"),
			BuildConfig: &cloudfunctionsv2.FunctionBuildConfigArgs{
				Runtime:    pulumi.String("nodejs22"),
				EntryPoint: pulumi.String("helloHttp"),
				Source: &cloudfunctionsv2.FunctionBuildConfigSourceArgs{
					StorageSource: &cloudfunctionsv2.FunctionBuildConfigSourceStorageSourceArgs{
						Bucket: bucket.Name,
						Object: object.Name,
					},
				},
			},
			ServiceConfig: &cloudfunctionsv2.FunctionServiceConfigArgs{
				MaxInstanceCount: pulumi.Int(1),
				AvailableMemory:  pulumi.String("256M"),
				TimeoutSeconds:   pulumi.Int(60),
			},
		})
		if err != nil {
			return err
		}
		defaultHostingVersion, err := firebase.NewHostingVersion(ctx, "default", &firebase.HostingVersionArgs{
			SiteId: _default.SiteId,
			Config: &firebase.HostingVersionConfigArgs{
				Rewrites: firebase.HostingVersionConfigRewriteArray{
					&firebase.HostingVersionConfigRewriteArgs{
						Glob:     pulumi.String("/hello/**"),
						Function: function.Name,
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = firebase.NewHostingRelease(ctx, "default", &firebase.HostingReleaseArgs{
			SiteId:      _default.SiteId,
			VersionName: defaultHostingVersion.Name,
			Message:     pulumi.String("Cloud Functions Integration"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.Firebase.HostingSite("default", new()
    {
        Project = "my-project-name",
        SiteId = "site-id",
    });

    var bucket = new Gcp.Storage.Bucket("bucket", new()
    {
        Project = "my-project-name",
        Name = "site-id-function-source",
        Location = "US",
        UniformBucketLevelAccess = true,
    });

    var @object = new Gcp.Storage.BucketObject("object", new()
    {
        Name = "function-source.zip",
        Bucket = bucket.Name,
        Source = new FileAsset("function-source.zip"),
    });

    var function = new Gcp.CloudFunctionsV2.Function("function", new()
    {
        Project = "my-project-name",
        Name = "cloud-function-via-hosting",
        Location = "us-central1",
        Description = "A Cloud Function connected to Firebase Hosing",
        BuildConfig = new Gcp.CloudFunctionsV2.Inputs.FunctionBuildConfigArgs
        {
            Runtime = "nodejs22",
            EntryPoint = "helloHttp",
            Source = new Gcp.CloudFunctionsV2.Inputs.FunctionBuildConfigSourceArgs
            {
                StorageSource = new Gcp.CloudFunctionsV2.Inputs.FunctionBuildConfigSourceStorageSourceArgs
                {
                    Bucket = bucket.Name,
                    Object = @object.Name,
                },
            },
        },
        ServiceConfig = new Gcp.CloudFunctionsV2.Inputs.FunctionServiceConfigArgs
        {
            MaxInstanceCount = 1,
            AvailableMemory = "256M",
            TimeoutSeconds = 60,
        },
    });

    var defaultHostingVersion = new Gcp.Firebase.HostingVersion("default", new()
    {
        SiteId = @default.SiteId,
        Config = new Gcp.Firebase.Inputs.HostingVersionConfigArgs
        {
            Rewrites = new[]
            {
                new Gcp.Firebase.Inputs.HostingVersionConfigRewriteArgs
                {
                    Glob = "/hello/**",
                    Function = function.Name,
                },
            },
        },
    });

    var defaultHostingRelease = new Gcp.Firebase.HostingRelease("default", new()
    {
        SiteId = @default.SiteId,
        VersionName = defaultHostingVersion.Name,
        Message = "Cloud Functions Integration",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firebase.HostingSite;
import com.pulumi.gcp.firebase.HostingSiteArgs;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketObject;
import com.pulumi.gcp.storage.BucketObjectArgs;
import com.pulumi.gcp.cloudfunctionsv2.Function;
import com.pulumi.gcp.cloudfunctionsv2.FunctionArgs;
import com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionBuildConfigArgs;
import com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionBuildConfigSourceArgs;
import com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionBuildConfigSourceStorageSourceArgs;
import com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionServiceConfigArgs;
import com.pulumi.gcp.firebase.HostingVersion;
import com.pulumi.gcp.firebase.HostingVersionArgs;
import com.pulumi.gcp.firebase.inputs.HostingVersionConfigArgs;
import com.pulumi.gcp.firebase.HostingRelease;
import com.pulumi.gcp.firebase.HostingReleaseArgs;
import com.pulumi.asset.FileAsset;
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 HostingSite("default", HostingSiteArgs.builder()
            .project("my-project-name")
            .siteId("site-id")
            .build());

        var bucket = new Bucket("bucket", BucketArgs.builder()
            .project("my-project-name")
            .name("site-id-function-source")
            .location("US")
            .uniformBucketLevelAccess(true)
            .build());

        var object = new BucketObject("object", BucketObjectArgs.builder()
            .name("function-source.zip")
            .bucket(bucket.name())
            .source(new FileAsset("function-source.zip"))
            .build());

        var function = new Function("function", FunctionArgs.builder()
            .project("my-project-name")
            .name("cloud-function-via-hosting")
            .location("us-central1")
            .description("A Cloud Function connected to Firebase Hosing")
            .buildConfig(FunctionBuildConfigArgs.builder()
                .runtime("nodejs22")
                .entryPoint("helloHttp")
                .source(FunctionBuildConfigSourceArgs.builder()
                    .storageSource(FunctionBuildConfigSourceStorageSourceArgs.builder()
                        .bucket(bucket.name())
                        .object(object.name())
                        .build())
                    .build())
                .build())
            .serviceConfig(FunctionServiceConfigArgs.builder()
                .maxInstanceCount(1)
                .availableMemory("256M")
                .timeoutSeconds(60)
                .build())
            .build());

        var defaultHostingVersion = new HostingVersion("defaultHostingVersion", HostingVersionArgs.builder()
            .siteId(default_.siteId())
            .config(HostingVersionConfigArgs.builder()
                .rewrites(HostingVersionConfigRewriteArgs.builder()
                    .glob("/hello/**")
                    .function(function.name())
                    .build())
                .build())
            .build());

        var defaultHostingRelease = new HostingRelease("defaultHostingRelease", HostingReleaseArgs.builder()
            .siteId(default_.siteId())
            .versionName(defaultHostingVersion.name())
            .message("Cloud Functions Integration")
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:firebase:HostingSite
    properties:
      project: my-project-name
      siteId: site-id
  bucket:
    type: gcp:storage:Bucket
    properties:
      project: my-project-name
      name: site-id-function-source
      location: US
      uniformBucketLevelAccess: true
  object:
    type: gcp:storage:BucketObject
    properties:
      name: function-source.zip
      bucket: ${bucket.name}
      source:
        fn::FileAsset: function-source.zip
  function:
    type: gcp:cloudfunctionsv2:Function
    properties:
      project: my-project-name
      name: cloud-function-via-hosting
      location: us-central1
      description: A Cloud Function connected to Firebase Hosing
      buildConfig:
        runtime: nodejs22
        entryPoint: helloHttp
        source:
          storageSource:
            bucket: ${bucket.name}
            object: ${object.name}
      serviceConfig:
        maxInstanceCount: 1
        availableMemory: 256M
        timeoutSeconds: 60
  defaultHostingVersion:
    type: gcp:firebase:HostingVersion
    name: default
    properties:
      siteId: ${default.siteId}
      config:
        rewrites:
          - glob: /hello/**
            function: ${function.name}
  defaultHostingRelease:
    type: gcp:firebase:HostingRelease
    name: default
    properties:
      siteId: ${default.siteId}
      versionName: ${defaultHostingVersion.name}
      message: Cloud Functions Integration
Copy

Create HostingVersion Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new HostingVersion(name: string, args: HostingVersionArgs, opts?: CustomResourceOptions);
@overload
def HostingVersion(resource_name: str,
                   args: HostingVersionArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def HostingVersion(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   site_id: Optional[str] = None,
                   config: Optional[HostingVersionConfigArgs] = None)
func NewHostingVersion(ctx *Context, name string, args HostingVersionArgs, opts ...ResourceOption) (*HostingVersion, error)
public HostingVersion(string name, HostingVersionArgs args, CustomResourceOptions? opts = null)
public HostingVersion(String name, HostingVersionArgs args)
public HostingVersion(String name, HostingVersionArgs args, CustomResourceOptions options)
type: gcp:firebase:HostingVersion
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. HostingVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. HostingVersionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. HostingVersionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. HostingVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. HostingVersionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var hostingVersionResource = new Gcp.Firebase.HostingVersion("hostingVersionResource", new()
{
    SiteId = "string",
    Config = new Gcp.Firebase.Inputs.HostingVersionConfigArgs
    {
        Headers = new[]
        {
            new Gcp.Firebase.Inputs.HostingVersionConfigHeaderArgs
            {
                Headers = 
                {
                    { "string", "string" },
                },
                Glob = "string",
                Regex = "string",
            },
        },
        Redirects = new[]
        {
            new Gcp.Firebase.Inputs.HostingVersionConfigRedirectArgs
            {
                Location = "string",
                StatusCode = 0,
                Glob = "string",
                Regex = "string",
            },
        },
        Rewrites = new[]
        {
            new Gcp.Firebase.Inputs.HostingVersionConfigRewriteArgs
            {
                Function = "string",
                Glob = "string",
                Path = "string",
                Regex = "string",
                Run = new Gcp.Firebase.Inputs.HostingVersionConfigRewriteRunArgs
                {
                    ServiceId = "string",
                    Region = "string",
                },
            },
        },
    },
});
Copy
example, err := firebase.NewHostingVersion(ctx, "hostingVersionResource", &firebase.HostingVersionArgs{
	SiteId: pulumi.String("string"),
	Config: &firebase.HostingVersionConfigArgs{
		Headers: firebase.HostingVersionConfigHeaderArray{
			&firebase.HostingVersionConfigHeaderArgs{
				Headers: pulumi.StringMap{
					"string": pulumi.String("string"),
				},
				Glob:  pulumi.String("string"),
				Regex: pulumi.String("string"),
			},
		},
		Redirects: firebase.HostingVersionConfigRedirectArray{
			&firebase.HostingVersionConfigRedirectArgs{
				Location:   pulumi.String("string"),
				StatusCode: pulumi.Int(0),
				Glob:       pulumi.String("string"),
				Regex:      pulumi.String("string"),
			},
		},
		Rewrites: firebase.HostingVersionConfigRewriteArray{
			&firebase.HostingVersionConfigRewriteArgs{
				Function: pulumi.String("string"),
				Glob:     pulumi.String("string"),
				Path:     pulumi.String("string"),
				Regex:    pulumi.String("string"),
				Run: &firebase.HostingVersionConfigRewriteRunArgs{
					ServiceId: pulumi.String("string"),
					Region:    pulumi.String("string"),
				},
			},
		},
	},
})
Copy
var hostingVersionResource = new HostingVersion("hostingVersionResource", HostingVersionArgs.builder()
    .siteId("string")
    .config(HostingVersionConfigArgs.builder()
        .headers(HostingVersionConfigHeaderArgs.builder()
            .headers(Map.of("string", "string"))
            .glob("string")
            .regex("string")
            .build())
        .redirects(HostingVersionConfigRedirectArgs.builder()
            .location("string")
            .statusCode(0)
            .glob("string")
            .regex("string")
            .build())
        .rewrites(HostingVersionConfigRewriteArgs.builder()
            .function("string")
            .glob("string")
            .path("string")
            .regex("string")
            .run(HostingVersionConfigRewriteRunArgs.builder()
                .serviceId("string")
                .region("string")
                .build())
            .build())
        .build())
    .build());
Copy
hosting_version_resource = gcp.firebase.HostingVersion("hostingVersionResource",
    site_id="string",
    config={
        "headers": [{
            "headers": {
                "string": "string",
            },
            "glob": "string",
            "regex": "string",
        }],
        "redirects": [{
            "location": "string",
            "status_code": 0,
            "glob": "string",
            "regex": "string",
        }],
        "rewrites": [{
            "function": "string",
            "glob": "string",
            "path": "string",
            "regex": "string",
            "run": {
                "service_id": "string",
                "region": "string",
            },
        }],
    })
Copy
const hostingVersionResource = new gcp.firebase.HostingVersion("hostingVersionResource", {
    siteId: "string",
    config: {
        headers: [{
            headers: {
                string: "string",
            },
            glob: "string",
            regex: "string",
        }],
        redirects: [{
            location: "string",
            statusCode: 0,
            glob: "string",
            regex: "string",
        }],
        rewrites: [{
            "function": "string",
            glob: "string",
            path: "string",
            regex: "string",
            run: {
                serviceId: "string",
                region: "string",
            },
        }],
    },
});
Copy
type: gcp:firebase:HostingVersion
properties:
    config:
        headers:
            - glob: string
              headers:
                string: string
              regex: string
        redirects:
            - glob: string
              location: string
              regex: string
              statusCode: 0
        rewrites:
            - function: string
              glob: string
              path: string
              regex: string
              run:
                region: string
                serviceId: string
    siteId: string
Copy

HostingVersion Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The HostingVersion resource accepts the following input properties:

SiteId
This property is required.
Changes to this property will trigger replacement.
string
Required. The ID of the site in which to create this Version.


Config Changes to this property will trigger replacement. HostingVersionConfig
The configuration for the behavior of the site. This configuration exists in the firebase.json file. Structure is documented below.
SiteId
This property is required.
Changes to this property will trigger replacement.
string
Required. The ID of the site in which to create this Version.


Config Changes to this property will trigger replacement. HostingVersionConfigArgs
The configuration for the behavior of the site. This configuration exists in the firebase.json file. Structure is documented below.
siteId
This property is required.
Changes to this property will trigger replacement.
String
Required. The ID of the site in which to create this Version.


config Changes to this property will trigger replacement. HostingVersionConfig
The configuration for the behavior of the site. This configuration exists in the firebase.json file. Structure is documented below.
siteId
This property is required.
Changes to this property will trigger replacement.
string
Required. The ID of the site in which to create this Version.


config Changes to this property will trigger replacement. HostingVersionConfig
The configuration for the behavior of the site. This configuration exists in the firebase.json file. Structure is documented below.
site_id
This property is required.
Changes to this property will trigger replacement.
str
Required. The ID of the site in which to create this Version.


config Changes to this property will trigger replacement. HostingVersionConfigArgs
The configuration for the behavior of the site. This configuration exists in the firebase.json file. Structure is documented below.
siteId
This property is required.
Changes to this property will trigger replacement.
String
Required. The ID of the site in which to create this Version.


config Changes to this property will trigger replacement. Property Map
The configuration for the behavior of the site. This configuration exists in the firebase.json file. Structure is documented below.

Outputs

All input properties are implicitly available as output properties. Additionally, the HostingVersion resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Name string
The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
VersionId string
The ID for the version as in sites/SITE_ID/versions/VERSION_ID
Id string
The provider-assigned unique ID for this managed resource.
Name string
The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
VersionId string
The ID for the version as in sites/SITE_ID/versions/VERSION_ID
id String
The provider-assigned unique ID for this managed resource.
name String
The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
versionId String
The ID for the version as in sites/SITE_ID/versions/VERSION_ID
id string
The provider-assigned unique ID for this managed resource.
name string
The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
versionId string
The ID for the version as in sites/SITE_ID/versions/VERSION_ID
id str
The provider-assigned unique ID for this managed resource.
name str
The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
version_id str
The ID for the version as in sites/SITE_ID/versions/VERSION_ID
id String
The provider-assigned unique ID for this managed resource.
name String
The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
versionId String
The ID for the version as in sites/SITE_ID/versions/VERSION_ID

Look up Existing HostingVersion Resource

Get an existing HostingVersion 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?: HostingVersionState, opts?: CustomResourceOptions): HostingVersion
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config: Optional[HostingVersionConfigArgs] = None,
        name: Optional[str] = None,
        site_id: Optional[str] = None,
        version_id: Optional[str] = None) -> HostingVersion
func GetHostingVersion(ctx *Context, name string, id IDInput, state *HostingVersionState, opts ...ResourceOption) (*HostingVersion, error)
public static HostingVersion Get(string name, Input<string> id, HostingVersionState? state, CustomResourceOptions? opts = null)
public static HostingVersion get(String name, Output<String> id, HostingVersionState state, CustomResourceOptions options)
resources:  _:    type: gcp:firebase:HostingVersion    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
Config Changes to this property will trigger replacement. HostingVersionConfig
The configuration for the behavior of the site. This configuration exists in the firebase.json file. Structure is documented below.
Name string
The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
SiteId Changes to this property will trigger replacement. string
Required. The ID of the site in which to create this Version.


VersionId string
The ID for the version as in sites/SITE_ID/versions/VERSION_ID
Config Changes to this property will trigger replacement. HostingVersionConfigArgs
The configuration for the behavior of the site. This configuration exists in the firebase.json file. Structure is documented below.
Name string
The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
SiteId Changes to this property will trigger replacement. string
Required. The ID of the site in which to create this Version.


VersionId string
The ID for the version as in sites/SITE_ID/versions/VERSION_ID
config Changes to this property will trigger replacement. HostingVersionConfig
The configuration for the behavior of the site. This configuration exists in the firebase.json file. Structure is documented below.
name String
The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
siteId Changes to this property will trigger replacement. String
Required. The ID of the site in which to create this Version.


versionId String
The ID for the version as in sites/SITE_ID/versions/VERSION_ID
config Changes to this property will trigger replacement. HostingVersionConfig
The configuration for the behavior of the site. This configuration exists in the firebase.json file. Structure is documented below.
name string
The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
siteId Changes to this property will trigger replacement. string
Required. The ID of the site in which to create this Version.


versionId string
The ID for the version as in sites/SITE_ID/versions/VERSION_ID
config Changes to this property will trigger replacement. HostingVersionConfigArgs
The configuration for the behavior of the site. This configuration exists in the firebase.json file. Structure is documented below.
name str
The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
site_id Changes to this property will trigger replacement. str
Required. The ID of the site in which to create this Version.


version_id str
The ID for the version as in sites/SITE_ID/versions/VERSION_ID
config Changes to this property will trigger replacement. Property Map
The configuration for the behavior of the site. This configuration exists in the firebase.json file. Structure is documented below.
name String
The fully-qualified resource name for the version, in the format: sites/SITE_ID/versions/VERSION_ID
siteId Changes to this property will trigger replacement. String
Required. The ID of the site in which to create this Version.


versionId String
The ID for the version as in sites/SITE_ID/versions/VERSION_ID

Supporting Types

HostingVersionConfig
, HostingVersionConfigArgs

Headers Changes to this property will trigger replacement. List<HostingVersionConfigHeader>
An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. Structure is documented below.
Redirects Changes to this property will trigger replacement. List<HostingVersionConfigRedirect>
An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. Structure is documented below.
Rewrites Changes to this property will trigger replacement. List<HostingVersionConfigRewrite>
An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. Structure is documented below.
Headers Changes to this property will trigger replacement. []HostingVersionConfigHeader
An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. Structure is documented below.
Redirects Changes to this property will trigger replacement. []HostingVersionConfigRedirect
An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. Structure is documented below.
Rewrites Changes to this property will trigger replacement. []HostingVersionConfigRewrite
An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. Structure is documented below.
headers Changes to this property will trigger replacement. List<HostingVersionConfigHeader>
An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. Structure is documented below.
redirects Changes to this property will trigger replacement. List<HostingVersionConfigRedirect>
An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. Structure is documented below.
rewrites Changes to this property will trigger replacement. List<HostingVersionConfigRewrite>
An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. Structure is documented below.
headers Changes to this property will trigger replacement. HostingVersionConfigHeader[]
An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. Structure is documented below.
redirects Changes to this property will trigger replacement. HostingVersionConfigRedirect[]
An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. Structure is documented below.
rewrites Changes to this property will trigger replacement. HostingVersionConfigRewrite[]
An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. Structure is documented below.
headers Changes to this property will trigger replacement. Sequence[HostingVersionConfigHeader]
An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. Structure is documented below.
redirects Changes to this property will trigger replacement. Sequence[HostingVersionConfigRedirect]
An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. Structure is documented below.
rewrites Changes to this property will trigger replacement. Sequence[HostingVersionConfigRewrite]
An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. Structure is documented below.
headers Changes to this property will trigger replacement. List<Property Map>
An array of objects, where each object specifies a URL pattern that, if matched to the request URL path, triggers Hosting to apply the specified custom response headers. Structure is documented below.
redirects Changes to this property will trigger replacement. List<Property Map>
An array of objects (called redirect rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond with a redirect to the specified destination path. Structure is documented below.
rewrites Changes to this property will trigger replacement. List<Property Map>
An array of objects (called rewrite rules), where each rule specifies a URL pattern that, if matched to the request URL path, triggers Hosting to respond as if the service were given the specified destination URL. Structure is documented below.

HostingVersionConfigHeader
, HostingVersionConfigHeaderArgs

Headers
This property is required.
Changes to this property will trigger replacement.
Dictionary<string, string>
The additional headers to add to the response. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
Glob Changes to this property will trigger replacement. string
The user-supplied glob to match against the request URL path.
Regex Changes to this property will trigger replacement. string
The user-supplied RE2 regular expression to match against the request URL path.
Headers
This property is required.
Changes to this property will trigger replacement.
map[string]string
The additional headers to add to the response. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
Glob Changes to this property will trigger replacement. string
The user-supplied glob to match against the request URL path.
Regex Changes to this property will trigger replacement. string
The user-supplied RE2 regular expression to match against the request URL path.
headers
This property is required.
Changes to this property will trigger replacement.
Map<String,String>
The additional headers to add to the response. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
glob Changes to this property will trigger replacement. String
The user-supplied glob to match against the request URL path.
regex Changes to this property will trigger replacement. String
The user-supplied RE2 regular expression to match against the request URL path.
headers
This property is required.
Changes to this property will trigger replacement.
{[key: string]: string}
The additional headers to add to the response. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
glob Changes to this property will trigger replacement. string
The user-supplied glob to match against the request URL path.
regex Changes to this property will trigger replacement. string
The user-supplied RE2 regular expression to match against the request URL path.
headers
This property is required.
Changes to this property will trigger replacement.
Mapping[str, str]
The additional headers to add to the response. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
glob Changes to this property will trigger replacement. str
The user-supplied glob to match against the request URL path.
regex Changes to this property will trigger replacement. str
The user-supplied RE2 regular expression to match against the request URL path.
headers
This property is required.
Changes to this property will trigger replacement.
Map<String>
The additional headers to add to the response. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
glob Changes to this property will trigger replacement. String
The user-supplied glob to match against the request URL path.
regex Changes to this property will trigger replacement. String
The user-supplied RE2 regular expression to match against the request URL path.

HostingVersionConfigRedirect
, HostingVersionConfigRedirectArgs

Location
This property is required.
Changes to this property will trigger replacement.
string
The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a : prefix to identify the segment and an optional * to capture the rest of the URL. For example:
StatusCode
This property is required.
Changes to this property will trigger replacement.
int
The status HTTP code to return in the response. It must be a valid 3xx status code.
Glob Changes to this property will trigger replacement. string
The user-supplied glob to match against the request URL path.
Regex Changes to this property will trigger replacement. string
The user-supplied RE2 regular expression to match against the request URL path.
Location
This property is required.
Changes to this property will trigger replacement.
string
The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a : prefix to identify the segment and an optional * to capture the rest of the URL. For example:
StatusCode
This property is required.
Changes to this property will trigger replacement.
int
The status HTTP code to return in the response. It must be a valid 3xx status code.
Glob Changes to this property will trigger replacement. string
The user-supplied glob to match against the request URL path.
Regex Changes to this property will trigger replacement. string
The user-supplied RE2 regular expression to match against the request URL path.
location
This property is required.
Changes to this property will trigger replacement.
String
The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a : prefix to identify the segment and an optional * to capture the rest of the URL. For example:
statusCode
This property is required.
Changes to this property will trigger replacement.
Integer
The status HTTP code to return in the response. It must be a valid 3xx status code.
glob Changes to this property will trigger replacement. String
The user-supplied glob to match against the request URL path.
regex Changes to this property will trigger replacement. String
The user-supplied RE2 regular expression to match against the request URL path.
location
This property is required.
Changes to this property will trigger replacement.
string
The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a : prefix to identify the segment and an optional * to capture the rest of the URL. For example:
statusCode
This property is required.
Changes to this property will trigger replacement.
number
The status HTTP code to return in the response. It must be a valid 3xx status code.
glob Changes to this property will trigger replacement. string
The user-supplied glob to match against the request URL path.
regex Changes to this property will trigger replacement. string
The user-supplied RE2 regular expression to match against the request URL path.
location
This property is required.
Changes to this property will trigger replacement.
str
The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a : prefix to identify the segment and an optional * to capture the rest of the URL. For example:
status_code
This property is required.
Changes to this property will trigger replacement.
int
The status HTTP code to return in the response. It must be a valid 3xx status code.
glob Changes to this property will trigger replacement. str
The user-supplied glob to match against the request URL path.
regex Changes to this property will trigger replacement. str
The user-supplied RE2 regular expression to match against the request URL path.
location
This property is required.
Changes to this property will trigger replacement.
String
The value to put in the HTTP location header of the response. The location can contain capture group values from the pattern using a : prefix to identify the segment and an optional * to capture the rest of the URL. For example:
statusCode
This property is required.
Changes to this property will trigger replacement.
Number
The status HTTP code to return in the response. It must be a valid 3xx status code.
glob Changes to this property will trigger replacement. String
The user-supplied glob to match against the request URL path.
regex Changes to this property will trigger replacement. String
The user-supplied RE2 regular expression to match against the request URL path.

HostingVersionConfigRewrite
, HostingVersionConfigRewriteArgs

Function Changes to this property will trigger replacement. string
The function to proxy requests to. Must match the exported function name exactly.
Glob Changes to this property will trigger replacement. string
The user-supplied glob to match against the request URL path.
Path Changes to this property will trigger replacement. string
The URL path to rewrite the request to.
Regex Changes to this property will trigger replacement. string
The user-supplied RE2 regular expression to match against the request URL path.
Run Changes to this property will trigger replacement. HostingVersionConfigRewriteRun
The request will be forwarded to Cloud Run. Structure is documented below.
Function Changes to this property will trigger replacement. string
The function to proxy requests to. Must match the exported function name exactly.
Glob Changes to this property will trigger replacement. string
The user-supplied glob to match against the request URL path.
Path Changes to this property will trigger replacement. string
The URL path to rewrite the request to.
Regex Changes to this property will trigger replacement. string
The user-supplied RE2 regular expression to match against the request URL path.
Run Changes to this property will trigger replacement. HostingVersionConfigRewriteRun
The request will be forwarded to Cloud Run. Structure is documented below.
function Changes to this property will trigger replacement. String
The function to proxy requests to. Must match the exported function name exactly.
glob Changes to this property will trigger replacement. String
The user-supplied glob to match against the request URL path.
path Changes to this property will trigger replacement. String
The URL path to rewrite the request to.
regex Changes to this property will trigger replacement. String
The user-supplied RE2 regular expression to match against the request URL path.
run Changes to this property will trigger replacement. HostingVersionConfigRewriteRun
The request will be forwarded to Cloud Run. Structure is documented below.
function Changes to this property will trigger replacement. string
The function to proxy requests to. Must match the exported function name exactly.
glob Changes to this property will trigger replacement. string
The user-supplied glob to match against the request URL path.
path Changes to this property will trigger replacement. string
The URL path to rewrite the request to.
regex Changes to this property will trigger replacement. string
The user-supplied RE2 regular expression to match against the request URL path.
run Changes to this property will trigger replacement. HostingVersionConfigRewriteRun
The request will be forwarded to Cloud Run. Structure is documented below.
function Changes to this property will trigger replacement. str
The function to proxy requests to. Must match the exported function name exactly.
glob Changes to this property will trigger replacement. str
The user-supplied glob to match against the request URL path.
path Changes to this property will trigger replacement. str
The URL path to rewrite the request to.
regex Changes to this property will trigger replacement. str
The user-supplied RE2 regular expression to match against the request URL path.
run Changes to this property will trigger replacement. HostingVersionConfigRewriteRun
The request will be forwarded to Cloud Run. Structure is documented below.
function Changes to this property will trigger replacement. String
The function to proxy requests to. Must match the exported function name exactly.
glob Changes to this property will trigger replacement. String
The user-supplied glob to match against the request URL path.
path Changes to this property will trigger replacement. String
The URL path to rewrite the request to.
regex Changes to this property will trigger replacement. String
The user-supplied RE2 regular expression to match against the request URL path.
run Changes to this property will trigger replacement. Property Map
The request will be forwarded to Cloud Run. Structure is documented below.

HostingVersionConfigRewriteRun
, HostingVersionConfigRewriteRunArgs

ServiceId
This property is required.
Changes to this property will trigger replacement.
string
User-defined ID of the Cloud Run service.
Region Changes to this property will trigger replacement. string
Optional. User-provided region where the Cloud Run service is hosted. Defaults to us-central1 if not supplied.
ServiceId
This property is required.
Changes to this property will trigger replacement.
string
User-defined ID of the Cloud Run service.
Region Changes to this property will trigger replacement. string
Optional. User-provided region where the Cloud Run service is hosted. Defaults to us-central1 if not supplied.
serviceId
This property is required.
Changes to this property will trigger replacement.
String
User-defined ID of the Cloud Run service.
region Changes to this property will trigger replacement. String
Optional. User-provided region where the Cloud Run service is hosted. Defaults to us-central1 if not supplied.
serviceId
This property is required.
Changes to this property will trigger replacement.
string
User-defined ID of the Cloud Run service.
region Changes to this property will trigger replacement. string
Optional. User-provided region where the Cloud Run service is hosted. Defaults to us-central1 if not supplied.
service_id
This property is required.
Changes to this property will trigger replacement.
str
User-defined ID of the Cloud Run service.
region Changes to this property will trigger replacement. str
Optional. User-provided region where the Cloud Run service is hosted. Defaults to us-central1 if not supplied.
serviceId
This property is required.
Changes to this property will trigger replacement.
String
User-defined ID of the Cloud Run service.
region Changes to this property will trigger replacement. String
Optional. User-provided region where the Cloud Run service is hosted. Defaults to us-central1 if not supplied.

Import

Version can be imported using any of these accepted formats:

  • sites/{{site_id}}/versions/{{version_id}}

  • {{site_id}}/{{version_id}}

When using the pulumi import command, Version can be imported using one of the formats above. For example:

$ pulumi import gcp:firebase/hostingVersion:HostingVersion default sites/{{site_id}}/versions/{{version_id}}
Copy
$ pulumi import gcp:firebase/hostingVersion:HostingVersion default {{site_id}}/{{version_id}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

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.