providers/aws+cloudflare+dnsimple: Increase some verbosity

This commit is contained in:
Clint Shryock 2015-05-18 15:25:03 -05:00
parent db095e2bca
commit f6bcc302d3
3 changed files with 24 additions and 24 deletions

View File

@ -336,7 +336,7 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error {
_, err := elbconn.DeleteLoadBalancerListeners(deleteListenersOpts)
if err != nil {
return fmt.Errorf("Failure removing outdated listeners: %s", err)
return fmt.Errorf("Failure removing outdated ELB listeners: %s", err)
}
}
@ -348,7 +348,7 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error {
_, err := elbconn.CreateLoadBalancerListeners(createListenersOpts)
if err != nil {
return fmt.Errorf("Failure adding new or updated listeners: %s", err)
return fmt.Errorf("Failure adding new or updated ELB listeners: %s", err)
}
}
@ -373,7 +373,7 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error {
_, err := elbconn.RegisterInstancesWithLoadBalancer(&registerInstancesOpts)
if err != nil {
return fmt.Errorf("Failure registering instances: %s", err)
return fmt.Errorf("Failure registering instances with ELB: %s", err)
}
}
if len(remove) > 0 {
@ -384,7 +384,7 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error {
_, err := elbconn.DeregisterInstancesFromLoadBalancer(&deRegisterInstancesOpts)
if err != nil {
return fmt.Errorf("Failure deregistering instances: %s", err)
return fmt.Errorf("Failure deregistering instances from ELB: %s", err)
}
}
@ -406,7 +406,7 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error {
_, err := elbconn.ModifyLoadBalancerAttributes(&attrs)
if err != nil {
return fmt.Errorf("Failure configuring elb attributes: %s", err)
return fmt.Errorf("Failure configuring ELB attributes: %s", err)
}
d.SetPartial("cross_zone_load_balancing")
@ -434,7 +434,7 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error {
_, err := elbconn.ModifyLoadBalancerAttributes(&attrs)
if err != nil {
return fmt.Errorf("Failure configuring elb attributes: %s", err)
return fmt.Errorf("Failure configuring ELB attributes: %s", err)
}
d.SetPartial("connection_draining_timeout")
@ -454,7 +454,7 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error {
_, err := elbconn.ModifyLoadBalancerAttributes(&attrs)
if err != nil {
return fmt.Errorf("Failure configuring elb attributes: %s", err)
return fmt.Errorf("Failure configuring ELB attributes: %s", err)
}
d.SetPartial("connection_draining")
@ -476,7 +476,7 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error {
}
_, err := elbconn.ConfigureHealthCheck(&configureHealthCheckOpts)
if err != nil {
return fmt.Errorf("Failure configuring health check: %s", err)
return fmt.Errorf("Failure configuring health check for ELB: %s", err)
}
d.SetPartial("health_check")
}
@ -492,7 +492,7 @@ func resourceAwsElbUpdate(d *schema.ResourceData, meta interface{}) error {
_, err := elbconn.ApplySecurityGroupsToLoadBalancer(&applySecurityGroupsOpts)
if err != nil {
return fmt.Errorf("Failure applying security groups: %s", err)
return fmt.Errorf("Failure applying security groups to ELB: %s", err)
}
d.SetPartial("security_groups")

View File

@ -72,16 +72,16 @@ func resourceCloudFlareRecordCreate(d *schema.ResourceData, meta interface{}) er
newRecord.Priority = priority.(string)
}
log.Printf("[DEBUG] record create configuration: %#v", newRecord)
log.Printf("[DEBUG] CloudFlare Record create configuration: %#v", newRecord)
rec, err := client.CreateRecord(d.Get("domain").(string), newRecord)
if err != nil {
return fmt.Errorf("Failed to create record: %s", err)
return fmt.Errorf("Failed to create CloudFlare Record: %s", err)
}
d.SetId(rec.Id)
log.Printf("[INFO] record ID: %s", d.Id())
log.Printf("[INFO] CloudFlare Record ID: %s", d.Id())
return resourceCloudFlareRecordRead(d, meta)
}
@ -91,7 +91,7 @@ func resourceCloudFlareRecordRead(d *schema.ResourceData, meta interface{}) erro
rec, err := client.RetrieveRecord(d.Get("domain").(string), d.Id())
if err != nil {
return fmt.Errorf("Couldn't find record ID (%s) for domain (%s): %s", d.Id(), d.Get("domain").(string), err)
return fmt.Errorf("Couldn't find CloudFlare Record ID (%s) for domain (%s): %s", d.Id(), d.Get("domain").(string), err)
}
d.Set("name", rec.Name)
@ -122,11 +122,11 @@ func resourceCloudFlareRecordUpdate(d *schema.ResourceData, meta interface{}) er
updateRecord.Priority = priority.(string)
}
log.Printf("[DEBUG] record update configuration: %#v", updateRecord)
log.Printf("[DEBUG] CloudFlare Record update configuration: %#v", updateRecord)
err := client.UpdateRecord(d.Get("domain").(string), d.Id(), updateRecord)
if err != nil {
return fmt.Errorf("Failed to update record: %s", err)
return fmt.Errorf("Failed to update CloudFlare Record: %s", err)
}
return resourceCloudFlareRecordRead(d, meta)
@ -135,12 +135,12 @@ func resourceCloudFlareRecordUpdate(d *schema.ResourceData, meta interface{}) er
func resourceCloudFlareRecordDelete(d *schema.ResourceData, meta interface{}) error {
client := meta.(*cloudflare.Client)
log.Printf("[INFO] Deleting record: %s, %s", d.Get("domain").(string), d.Id())
log.Printf("[INFO] Deleting CloudFlare Record: %s, %s", d.Get("domain").(string), d.Id())
err := client.DestroyRecord(d.Get("domain").(string), d.Id())
if err != nil {
return fmt.Errorf("Error deleting record: %s", err)
return fmt.Errorf("Error deleting CloudFlare Record: %s", err)
}
return nil

View File

@ -74,12 +74,12 @@ func resourceDNSimpleRecordCreate(d *schema.ResourceData, meta interface{}) erro
newRecord.Ttl = ttl.(string)
}
log.Printf("[DEBUG] record create configuration: %#v", newRecord)
log.Printf("[DEBUG] DNS Simple Record create configuration: %#v", newRecord)
recId, err := client.CreateRecord(d.Get("domain").(string), newRecord)
if err != nil {
return fmt.Errorf("Failed to create record: %s", err)
return fmt.Errorf("Failed to create DNS Simple Record: %s", err)
}
d.SetId(recId)
@ -93,7 +93,7 @@ func resourceDNSimpleRecordRead(d *schema.ResourceData, meta interface{}) error
rec, err := client.RetrieveRecord(d.Get("domain").(string), d.Id())
if err != nil {
return fmt.Errorf("Couldn't find record: %s", err)
return fmt.Errorf("Couldn't find DNS Simple Record: %s", err)
}
d.Set("domain_id", rec.StringDomainId())
@ -133,11 +133,11 @@ func resourceDNSimpleRecordUpdate(d *schema.ResourceData, meta interface{}) erro
updateRecord.Ttl = attr.(string)
}
log.Printf("[DEBUG] record update configuration: %#v", updateRecord)
log.Printf("[DEBUG] DNS Simple Record update configuration: %#v", updateRecord)
_, err := client.UpdateRecord(d.Get("domain").(string), d.Id(), updateRecord)
if err != nil {
return fmt.Errorf("Failed to update record: %s", err)
return fmt.Errorf("Failed to update DNS Simple Record: %s", err)
}
return resourceDNSimpleRecordRead(d, meta)
@ -146,12 +146,12 @@ func resourceDNSimpleRecordUpdate(d *schema.ResourceData, meta interface{}) erro
func resourceDNSimpleRecordDelete(d *schema.ResourceData, meta interface{}) error {
client := meta.(*dnsimple.Client)
log.Printf("[INFO] Deleting record: %s, %s", d.Get("domain").(string), d.Id())
log.Printf("[INFO] Deleting DNS Simple Record: %s, %s", d.Get("domain").(string), d.Id())
err := client.DestroyRecord(d.Get("domain").(string), d.Id())
if err != nil {
return fmt.Errorf("Error deleting record: %s", err)
return fmt.Errorf("Error deleting DNS Simple Record: %s", err)
}
return nil