Skip to content

Commit

Permalink
Allow domain mapping to succeed if DNS is pending (#5324)
Browse files Browse the repository at this point in the history
* Allow domain mapping to succeed if DNS is pending

Signed-off-by: Modular Magician <[email protected]>

* Updated google_folder.html (#4149)

* Updated google_folder.html

The page in the first example shows that you should use organization_id with value of 1234567. In the Import example, it's not clear whether organization_id is user, or folder_id is used. API call behind this import command is only accepting folder_id (can be checked when setting TF_LOG to trace and viewing the API call)

* Update website/docs/r/google_folder.html.markdown

Co-Authored-By: Dana Hoffman <[email protected]>

Co-authored-by: Dana Hoffman <[email protected]>

* Allow domain mapping to succeed if DNS is pending (#2917)

Merged PR #2917.

Co-authored-by: Chris Stephens <[email protected]>
Co-authored-by: Petar Marinkovic <[email protected]>
Co-authored-by: Dana Hoffman <[email protected]>
  • Loading branch information
4 people authored Jan 7, 2020
1 parent e2d493d commit fb98676
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/2917.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
`cloudrun`: Stopped returning an error when a `cloud_run_domain_mapping` was waiting on DNS verification.
```
7 changes: 6 additions & 1 deletion google/cloudrun_polling.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ func (s KnativeStatus) LatestMessage() string {
func (s KnativeStatus) State(res interface{}) string {
for _, condition := range s.Status.Conditions {
if condition.Type == "Ready" {
// DomainMapping can enter a 'terminal' state of waiting for external verification
// of DNS records.
if condition.Reason == "CertificatePending" {
return "Ready:CertificatePending"
}
return fmt.Sprintf("%s:%s", condition.Type, condition.Status)
}
}
Expand All @@ -76,7 +81,7 @@ func (p *CloudRunPolling) PendingStates() []string {
return []string{"Ready:Unknown", "Empty"}
}
func (p *CloudRunPolling) TargetStates() []string {
return []string{"Ready:True"}
return []string{"Ready:True", "Ready:CertificatePending"}
}
func (p *CloudRunPolling) ErrorStates() []string {
return []string{"Ready:False"}
Expand Down

0 comments on commit fb98676

Please sign in to comment.