目的:新しいプロジェクト(id: crack-celerity-429215-a2)で作成したapp engineアプリケーションに、awsのroute53から取得したカスタムドメイン” ngrjaku.com”を追加したい。
起きている問題:一度削除保留中にしたプロジェクト(id: quizapp-427407)に当該ドメインがマッピングされてしまっていることで、新しいプロジェクト(id:crack-celerity-429215-a2)のapp engineアプリにカスタムドメインを追加できません。コマンドラインから操作してプロジェクトをquizapp-427407に切り替え、ドメインマッピングを削除しようとしたんですが、「プロジェクトがすでに削除されている」という理由で削除操作ができない状態です。要するに、過去のプロジェクトに一度マッピングし、それを削除保留にしたことで、新しいプロジェクトへのドメインマッピングができなくなっています。
原因はおそらくquizapp-427407プロジェクトを一度削除保留中にしてしまったことでアクセスできない状態になってしまっているからではないかと考えていますがあくまで予想で実際にはなぜ削除できないのか分かりません。
今実現したいこと:過去に作成しもう使わないプロジェクトquizapp-427407に追加したドメインマッピングを削除し、まっさらな状態でもう一度、新しいプロジェクトcrack-celerity-429215-a2内のapp engineアプリにカスタムドメインngrjaku.comを追加したいです。今後しばらくはこの新しいプロジェクト以外使う予定がありません。どうすれば解決できるでしょうか?また、参考になる公式ドキュメントなどがあれば教えていただきたいです。よろしくお願いします。
EN:
Title: I want to resolve an error preventing me from adding a custom domain to a new project
Objective: I want to add a custom domain "<URL removed by staff>" (obtained from AWS Route 53) to an App Engine application created in a new project (id: crack-celerity-429215-a2).
Current Issue: I can't add the custom domain to the App Engine app in the new project (id: crack-celerity-429215-a2) because the domain is still mapped to a project that was previously set for deletion (id: quizapp-427407). When I tried to switch to the quizapp-427407 project via command line to remove the domain mapping, I couldn't perform the deletion operation because "the project has already been deleted". In essence, because I once mapped the domain to a previous project and then set that project for deletion, I'm now unable to map the domain to a new project.
I suspect this is because the quizapp-427407 project became inaccessible after being marked for deletion, but I'm not certain why I can't delete it.
What I Want to Achieve: I want to remove the domain mapping from the old project (quizapp-427407) that I no longer use, and then add the custom domain "ngrjaku.com" to the App Engine app in my new project (crack-celerity-429215-a2) with a clean slate. I don't plan to use any other projects except this new one for the foreseeable future. How can I resolve this issue? Also, if there are any relevant official documents that could help, I would appreciate if you could share them. Thank you in advance for your assistance.
・Command output showing that a new domain mapping cannot be created in the project with ID 'crack-celerity-429215-a2' where I want to add the custom domain
(venv) takahashitakuya@takahashitakuyanoMacBook-Pro history_flow_quiz % gcloud config set project crack-celerity-429215-a2 Updated property [core/project]. (venv) takahashitakuya@takahashitakuyanoMacBook-Pro history_flow_quiz % gcloud app domain-mappings create ngrjaku.com ERROR: (gcloud.app.domain-mappings.create) Apps instance [crack-celerity-429215-a2] is the subject of a conflict: Domain 'ngrjaku.com' is already mapped to another application. You must delete the existing domain mapping before you can re-map the domain, or you may specify 'DomainOverrideStrategy.OVERRIDE' on the request to force overwrite the existing mapping. Domain 'ngrjaku.com' is currently mapped to application 'quizapp-427407'.
・Command output showing that the domain mapping already exists in the project with ID 'quizapp-427407' and cannot be deleted
(venv) takahashitakuya@takahashitakuyanoMacBook-Pro history_flow_quiz % gcloud config get-value project quizapp-427407 (venv) takahashitakuya@takahashitakuyanoMacBook-Pro history_flow_quiz % gcloud app domain-mappings list ID SSL_CERTIFICATE_ID SSL_MANAGEMENT_TYPE PENDING_AUTO_CERT ngrjaku.com 34789459 AUTOMATIC www.ngrjaku.com 34788855 AUTOMATIC (venv) takahashitakuya@takahashitakuyanoMacBook-Pro history_flow_quiz % gcloud app domain-mappings delete ngrjaku.com Deleting mapping [ngrjaku.com]. This will stop your app from serving from this domain. (Y/n)? y ERROR: (gcloud.app.domain-mappings.delete) NOT_FOUND: Project not found. This command is authenticated as <PII removed by staff>.com which is the active account specified by the [core/account] property.
ssl証明書を削除しようとしても以前のプロジェクト"quizapp-427407"にマッピングされてしまっている影響で削除できない。コマンドからも同様。 “I can't delete the SSL certificate because it's still mapped to the previous project 'quizapp-427407'. The same issue occurs when trying to delete via command line.”
ssl証明書にはマッピングされたドメインがあるのにカスタムドメインの欄を見るとそれが表示されていない。これも前のプロジェクトに一度マッピングしてしまったことが原因だと思われる。 ”The SSL certificate shows mapped domains, but these don't appear in the custom domain section. This is likely due to the domain being previously mapped to the former project.”
すでにマッピングされてしまっているであろうプロジェクトが削除保留中のためコマンド操作できない。 “I can't perform command operations because the project that presumably has the mapping is pending deletion.”
ssl証明書の欄を見ると追加したいドメインがマッピング済みになっている。 ”In the SSL certificate section, the domain I want to add is shown as already mapped.”
取得したドメインを追加しようとするとマッピング済みのエラーが表示される。 “When trying to add the acquired domain, an error appears indicating it's already mapped.”
Solved! Go to Solution.
Hi @taku,
Creating and deleting a custom domain mapping to your App Engine application should be performed by an authorized user. Based on the gcloud command results, I’m assuming that you are the owner of the two projects and also the owner of the affected domain.
Please refer to these recommended steps that should fix the issue. All of these options worked on my end:
All relevant documents are listed below but there’s no official public documents that describes the recommended troubleshooting steps to this specific error:
I hope the above information is helpful.
Hi @taku,
Creating and deleting a custom domain mapping to your App Engine application should be performed by an authorized user. Based on the gcloud command results, I’m assuming that you are the owner of the two projects and also the owner of the affected domain.
Please refer to these recommended steps that should fix the issue. All of these options worked on my end:
All relevant documents are listed below but there’s no official public documents that describes the recommended troubleshooting steps to this specific error:
I hope the above information is helpful.
I have successfully completed applying the custom domain. Thank you very much for your help.
カスタムドメインの適用、無事全て完了しました。本当にありがとうございました。