Skip to content

Commit

Permalink
Merge pull request #146 from eonpatapon/active-status
Browse files Browse the repository at this point in the history
Check for status active on simplehosting instance
  • Loading branch information
nlewo authored Oct 2, 2023
2 parents 0c78aed + 6aebc77 commit e80ecf0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gandi/resource_simplehosting_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ func resourceSimpleHostingInstanceCreate(ctx context.Context, d *schema.Resource
if err != nil {
return resource.NonRetryableError(fmt.Errorf("Error getting instance %s: %s", instanceId, err))
}
if instance.Status != "running" {
return resource.RetryableError(fmt.Errorf("Expected instance %s to be running but was in state %s", instanceId, instance.Status))
if instance.Status != "active" {
return resource.RetryableError(fmt.Errorf("Expected instance %s to be active but was in state %s", instanceId, instance.Status))
}
return nil
})
Expand Down
4 changes: 2 additions & 2 deletions gandi/resource_simplehosting_vhost.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ func resourceSimpleHostingVhostCreate(ctx context.Context, d *schema.ResourceDat
return resource.NonRetryableError(fmt.Errorf("Error getting vhost %s of instance %s: %w", instanceId, fqdn, err))
}

if instance.Status != "running" {
return resource.RetryableError(fmt.Errorf("Expected vhost %s of instance %s to be running but was in state %s", instanceId, fqdn, instance.Status))
if instance.Status != "active" {
return resource.RetryableError(fmt.Errorf("Expected vhost %s of instance %s to be active but was in state %s", instanceId, fqdn, instance.Status))
}
return nil
})
Expand Down

0 comments on commit e80ecf0

Please sign in to comment.