@@ -67,7 +67,7 @@ func (c *ibmCloudCisProviderSolver) Present(ch *v1alpha1.ChallengeRequest) error
6767 }
6868
6969 longestMatchZone := findLongestMatchingZone (myZones , ch .ResolvedFQDN )
70- log .Printf ("Longest matching zone for %s: %s" , ch .ResolvedFQDN , longestMatchZone .Id )
70+ log .Printf ("Longest matching zone for %s: %s" , ch .ResolvedFQDN , longestMatchZone .Name )
7171 if longestMatchZone != nil {
7272 if err := c .createDNSChallengeRecord (crn , longestMatchZone .Id , ch ); err != nil {
7373 return err
@@ -83,7 +83,7 @@ func findLongestMatchingZone(zones []cis.Zone, fqdn string) *cis.Zone {
8383 var longestMatchLength int
8484
8585 for _ , zone := range zones {
86- log .Printf ("zone: %s" , zone .Name )
86+ log .Printf ("zone: %s (id: %s) " , zone .Name , zone . Id )
8787 zoneNameWithDot := zone .Name + "."
8888 if strings .HasSuffix (fqdn , zoneNameWithDot ) && len (zoneNameWithDot ) > longestMatchLength {
8989 longestMatchLength = len (zoneNameWithDot )
@@ -103,6 +103,8 @@ func (c *ibmCloudCisProviderSolver) createDNSChallengeRecord(crn, zoneID string,
103103 Content : ch .Key ,
104104 })
105105
106+ log .Printf ("Creating TXT record %s (content: %s), crn: %s, zoneId: %s" , ch .ResolvedFQDN , ch .Key , crn , zoneID )
107+
106108 if err != nil {
107109 log .WithError (err ).WithFields (log.Fields {"crn" : crn , "zoneID" : zoneID }).Error ("Error creating DNS01 challenge" )
108110 return err
0 commit comments