Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add api commands to get information about hosting domains #3708

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kmcnellis
Copy link
Member

@kmcnellis kmcnellis commented Aug 26, 2021

Description

Add commands to get the status of Hosting domains, delete them, and re-add to a different site on your project.

Scenarios Tested

Tested each command.

Note: create only works with domains previously added to & removed from a project
Creating new redirects not currently supported.

▶ firebase hosting:domains:list kiana-auth-quickstart
Domains for project kiana-auth-quickstart and site kiana-auth-quickstart

┌───────────────────────┬─────────────────────────┬───────────────┬────────────┐
│ Site ID               │ Domain Name             │ Status        │ Redirect   │
├───────────────────────┼─────────────────────────┼───────────────┼────────────┤
│ kiana-auth-quickstart │ a.kmcnellis.com         │ DOMAIN_ACTIVE │            │
├───────────────────────┼─────────────────────────┼───────────────┼────────────┤
│ kiana-auth-quickstart │ aproxy.kmcnellis.com    │ DOMAIN_ACTIVE │            │
├───────────────────────┼─────────────────────────┼───────────────┼────────────┤
│ kiana-auth-quickstart │ name.kmcnellis.com      │ DOMAIN_ACTIVE │            │
├───────────────────────┼─────────────────────────┼───────────────┼────────────┤
│ kiana-auth-quickstart │ nameproxy.kmcnellis.com │ DOMAIN_ACTIVE │            │
├───────────────────────┼─────────────────────────┼───────────────┼────────────┤
│ kiana-auth-quickstart │ sparky.dev              │ DOMAIN_ACTIVE │            │
├───────────────────────┼─────────────────────────┼───────────────┼────────────┤
│ kiana-auth-quickstart │ www.sparky.dev          │ DOMAIN_ACTIVE │ sparky.dev │
└───────────────────────┴─────────────────────────┴───────────────┴────────────┘

▶ firebase hosting:domains:get kiana-auth-quickstart www.sparky.dev
┌──────────────────┬─────────────────────────────┐
│ Site ID:         │ kiana-auth-quickstart       │
├──────────────────┼─────────────────────────────┤
│ Domain Name:     │ www.sparky.dev              │
├──────────────────┼─────────────────────────────┤
│ Status:          │ DOMAIN_ACTIVE               │
├──────────────────┼─────────────────────────────┤
│ Redirect:        │ sparky.dev                  │
├──────────────────┼─────────────────────────────┤
│ SSL Status:      │ CERT_ACTIVE                 │
├──────────────────┼─────────────────────────────┤
│ DNS Status:      │ DNS_MATCH                   │
├──────────────────┼─────────────────────────────┤
│ Expected IPs:    │ 199.36.158.100              │
├──────────────────┼─────────────────────────────┤
│ Discovered IPs:  │ 199.36.158.100              │
├──────────────────┼─────────────────────────────┤
│ Last Check Time: │ 2021-08-26T03:51:57.752312Z │
└──────────────────┴─────────────────────────────┘

▶ firebase hosting:domains:delete kiana-auth-quickstart www.sparky.dev
Deleting a site is a permanent action. If you delete a site, Firebase doesn't maintain records of deployed files or deployment history, and the site kiana-auth-quickstart cannot be reactivated by you or anyone else.

? Are you sure you want to delete the Hosting domain www.sparky.dev on site kiana-auth-quickstart, project kiana-auth-quickstart?  Yes
✔  hosting:sites: Successfully deleted domain www.sparky.dev from site kiana-auth-quickstart, project kiana-auth-quickstart

▶ firebase hosting:domains:delete kiana-auth-quickstart www.sparky.dev
Deleting a site is a permanent action. If you delete a site, Firebase doesn't maintain records of deployed files or deployment history, and the site kiana-auth-quickstart cannot be reactivated by you or anyone else.

? Are you sure you want to delete the Hosting domain www.sparky.dev on site kiana-auth-quickstart, project kiana-auth-quickstart?  Yes

Error: could not find domain "www.sparky.dev" for site "kiana-auth-quickstart and project "kiana-auth-quickstart"

▶  firebase hosting:domains:create pod-ov-kianam-test  www.sparky.dev

✔  hosting:domains: Domain www.sparky.dev has been added to site pod-ov-kianam-test in project kiana-auth-quickstart.
✔  hosting:domains: Domain URL: www.sparky.dev

▶ firebase hosting:domains:create pod-ov-kianam-test  new.sparky.dev

Error: Domain new.sparky.dev must be added to kiana-auth-quickstart using the Firebase Console.

Having trouble? Try firebase [command] --help

▶ firebase hosting:domains:get pod-ov-kianam-test  www.sparky.dev

┌──────────────────┬─────────────────────────────┐
│ Site ID:         │ pod-ov-kianam-test          │
├──────────────────┼─────────────────────────────┤
│ Domain Name:     │ www.sparky.dev              │
├──────────────────┼─────────────────────────────┤
│ Status:          │ DOMAIN_ACTIVE               │
├──────────────────┼─────────────────────────────┤
│ Redirect:        │                             │
├──────────────────┼─────────────────────────────┤
│ SSL Status:      │ CERT_ACTIVE                 │
├──────────────────┼─────────────────────────────┤
│ DNS Status:      │ DNS_MATCH                   │
├──────────────────┼─────────────────────────────┤
│ Expected IPs:    │ 199.36.158.100              │
├──────────────────┼─────────────────────────────┤
│ Discovered IPs:  │ 199.36.158.100              │
├──────────────────┼─────────────────────────────┤
│ Last Check Time: │ 2021-08-26T04:06:57.899113Z │
└──────────────────┴─────────────────────────────┘

Sample Commands

hosting:domains:create
hosting:domains:delete
hosting:domains:get
hosting:domains:list

@google-cla google-cla bot added the cla: yes Manual indication that this has passed CLA. label Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Manual indication that this has passed CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant