CustomDomainMapping

A resource for mapping a custom domain to a Cloud Run service or a compute engine service.

Like all Resources, this class configures itself across multiple Environments.

Example Usage

1
import launchflow as lf
2
3
ip_address = lf.gcp.GlobalIPAddress("my-global-ip-address")
4
ssl_certificate = lf.gcp.ManagedSSLCertificate("my-ssl-certificate", domains=["example.com"])
5
custom_domain_mapping = lf.gcp.CustomDomainMapping(
6
"my-custom-domain-mapping",
7
ip_address=ip_address,
8
ssl_certificate=ssl_certificate,
9
cloud_run=lf.gcp.CloudRunServiceContainer("my-cloud-run-service"
10
)

initialization

Create a new CustomDomainMapping resource.

Args:

  • name (str): The name of the CustomDomainMapping resource. This must be globally unique.
  • ssl_certificate (ManagedSSLCertificate): The SSL certificate to use for the domain.
  • ip_address (GlobalIPAddress): The IP address to map the domain to.
  • cloud_run (CloudRunServiceContainer): The Cloud Run service to map the domain to. One and only one of cloud_run and gce_service must be provided.
  • regional_managed_instance_group (RegionalManagedInstanceGroup): The Compute Engine service to map the domain to. One and only one of cloud_run and gce_service must be provided.
  • include_http_redirect (bool): Whether to include an HTTP redirect to the HTTPS URL. Defaults to True.