diff --git a/octopusdeploy/resource_environment.go b/octopusdeploy/resource_environment.go index 66559a19d..68a3f737a 100644 --- a/octopusdeploy/resource_environment.go +++ b/octopusdeploy/resource_environment.go @@ -79,7 +79,7 @@ func resourceEnvironmentUpdate(ctx context.Context, d *schema.ResourceData, m in environment := expandEnvironment(d) client := m.(*client.Client) - updatedEnvironment, err := environments.Update(client, d.Get("space_id").(string), environment) + updatedEnvironment, err := environments.Update(client, environment) if err != nil { return diag.FromErr(err) }